I’m trying to make this into a loop because I have many files, I’m using Biopython but I’m not sure if it’s possible.
good_reads = (
rec
for rec in SeqIO.parse(rec1, "fastq")
if max(rec.letter_annotations["phred_quality"]) >= 30
)
count = SeqIO.write(good_reads, "rec1.fastq", "fastq")
Given that I have rec1, rec2, etc
New contributor
Alejandra Diaz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.