This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to find out the reverse complement of DNA from each FASTA formated sequence file in a directory and generate a new reverse complement FASTA formated files for each of the input files?

I have total 2000+ genome sequence files in a directory. I need reverse complement sequence for each of the files and want to generate FASTA formated reverse complement sequence file for each files in the directory.

genome sequence

Hi, welcome to Biostars. Look into Biopython, Bioperl etc.

1 answer

for file in *.fasta; do seqtk seq -r ${file} > ${file}_revC; done;

not tested, should work, please install seqtk: https://github.com/lh3/seqtk

Alternatively (-l60 to specify fasta line length):

ls *.fasta | sed s,.fasta,, | xargs -i echo seqtk seq -r -l60 {}.fasta \> {}.rev | sh

I am grateful to you for your help.. Its work....

Log in to answer this question.