Question: 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?
0
gravatar for Sumit
3.9 years ago by
Sumit0
United States
Sumit0 wrote:

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.

sequence genome • 2.2k views
ADD COMMENTlink modified 3.9 years ago by Biomonika (Noolean)3.0k • written 3.9 years ago by Sumit0
2

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

ADD REPLYlink written 3.9 years ago by Whetting1.5k
4
gravatar for Biomonika (Noolean)
3.9 years ago by
State College, PA, USA
Biomonika (Noolean)3.0k wrote:

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 COMMENTlink written 3.9 years ago by Biomonika (Noolean)3.0k

Alternatively (-l60 to specify fasta line length):

ls *.fasta | sed s,.fasta,, | xargs -i echo seqtk seq -r -l60 {}.fasta \> {}.rev | sh
ADD REPLYlink written 3.9 years ago by lh331k

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

ADD REPLYlink written 3.9 years ago by Sumit0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1033 users visited in the last hour