14

I have a DNA sequence for which I would like to quickly find the reverse complement. Is there a quick way of doing this on the bash command line using only GNU tools?

winni2k
  • 2,266
  • 11
  • 28

3 Answers3

32

Thanks to Manu Tamminen for this solution:

echo ACCTTGAAA | tr ACGTacgt TGCAtgca | rev
Chris_Rands
  • 3,948
  • 12
  • 31
winni2k
  • 2,266
  • 11
  • 28
7

Reverse complement FASTA/Q:

seqtk seq -r in.fa > out.fa

https://github.com/lh3/seqtk

user9619
  • 79
  • 1
  • 1
2

You may either install the emboss package (http://emboss.sourceforge.net/download/) and use the revseq program. It contains many useful command-line programs such as the pairwise alignment tool needle.