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?
1
0
Entering edit mode
9.1 years ago
Sumit ▴ 20

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 • 4.3k views
ADD COMMENT
2
Entering edit mode

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

ADD REPLY
4
Entering edit mode
9.1 years ago
for file in *.fasta; do seqtk seq -r ${file} > ${file}_revC; done;

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

ADD COMMENT
0
Entering edit mode

Alternatively (-l60 to specify fasta line length):

ls *.fasta | sed s,.fasta,, | xargs -i echo seqtk seq -r -l60 {}.fasta \> {}.rev | sh
ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1415 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6