Hello! I have a data set of various fastq files, all of these are forward readings:
ERS1355434.fq ERS1355435.fq ERS1355436.fq ERS1355437.fq ERS1355439.fq ERS1355440.fq ERS1355442.fq
I want to get the reverse complement for these fastq sequences.
I am using biopython to do this, so for one fastq I am doing the following:
from Bio import SeqIO records=(rec.reverse_complement(id="rc_"+rec.id, description='reverse complement') for rec in SeqIO.parse('ERS1355454.fq','fastq')) SeqIO.write(records,seq_record.id + "R2.fastq",'fastq')
And this works, but now I am struggling with figuring out a way to do the same on all the fastq files. I am thinking on either run a loop or write a function and loop it through all the files. I am at beginning stage and not sure how to approach it, if someone has any suggestions on how to do this it will help a lot!