I'm contributing to a python-based project that uses Biopython
to analyze fastq files. It currently uses SeqIO.parse
, which populates various structures with all of the fastq information (including converting quality scores). There is apparently a faster (lighter-weight) parser called FastqGeneralIterator that doesn't populate all of these items.
I'd like to use FastqGeneralIterator
, but be able to perform some of the functions SeqIO.parse
offers on the fly (not for every sequence). For example, I'd like to convert base quality to PHRED scores for specific sequences, but I don't see that function available.
Is there an easy way to take a tuple output by FastqGeneralIterator
and convert it into a proper Bio.SeqIO
SeqRecord
?
FastqGeneralIterator
, and faster alternatives) in the last part of this answer: https://bioinformatics.stackexchange.com/a/380/292 – bli Jun 23 '17 at 12:02FastqPhredWriter
in Biopython) – bli Jun 23 '17 at 12:07