Commit fa886c30 authored by Alexander, William's avatar Alexander, William
Browse files

Upload New File

parent dd8b583b
Loading
Loading
Loading
Loading

ID_extractor.py

0 → 100644
+18 −0
Original line number Diff line number Diff line
#!/usr/bin/env python

from Bio.SeqIO.QualityIO import FastqGeneralIterator as FqI
import argparse

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Preprocesses data from basecalled fast5 files')
    parser.add_argument('-f', '--fastq', help='path to FASTQ file to extract')
    parser.add_argument('-o', '--output', help='desired path and name of output file')
    args = parser.parse_args()

    with open(args.output, 'w+') as output:
        for title, seq, qual in FqI(args.fastq):
            readID = str(title).split(' ')[0]
            print(readID, file=output)


exit()
 No newline at end of file