Answers.Body: <p>Reverse complement FASTA/Q:</p>
  <pre><code>seqtk seq -r in.fa &gt; out.fa
  </code></pre>
  <p><a href="https://github.com/lh3/seqtk" rel="noreferrer">https://github.com/lh3/seqtk</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-01T14:30:59.010Z
Answers.LastActivityDate: 2020-10-01T14:30:59.010Z
Answers.UserDisplayName: user9619
Answers.Body: <p>You may either install the emboss package (<a href="http://emboss.sourceforge.net/download/" rel="nofollow noreferrer">http://emboss.sourceforge.net/download/</a>) and use the revseq program.
  It contains many useful command-line programs such as the pairwise alignment tool needle.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-29T09:02:25.250Z
Answers.LastActivityDate: 2020-04-29T09:02:25.250Z
Answers.UserDisplayName: thomas duge de bernonville
Answers.Body: <p>Thanks to <a href="http://manutamminen.info/posts/unix_tricks/" rel="noreferrer">Manu Tamminen</a> for this solution:</p>
  
  <pre><code>echo ACCTTGAAA | tr ACGTacgt TGCAtgca | rev
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-06T09:44:26.933Z
Answers.Text: And if I want to put it into a variable instead of echo it?
Answers.UserDisplayName: Adi Ro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-06T11:35:19.027Z
Answers.Text: I would enclose the code in $() and assign to a variable assuming you are using a recent version of bash.
Answers.UserDisplayName: winni2k
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-09T09:29:17.983Z
Answers.Text: that works thanks!
Answers.UserDisplayName: Adi Ro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-15T09:46:12.963Z
Answers.LastActivityDate: 2019-04-15T14:03:06.827Z
Answers.LastEditDate: 2019-04-15T14:03:06.827Z
Answers.UserDisplayName: winni2k
Body: <p>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?</p>
  
Tags: <sequence-analysis><phylogenetics><bash>
Title: What is a quick way to find the reverse complement in bash
ThreadText: # What is a quick way to find the reverse complement in bash
  
  (Asked by: username_0 on 2019-04-15)
  
  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?
  
  **Tags:** sequence-analysis, phylogenetics, bash
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2019-04-15. Score: 32 | Accepted answer
  
  Thanks to [Manu Tamminen](http://manutamminen.info/posts/unix_tricks/) for this solution:
  
  ```
  echo ACCTTGAAA | tr ACGTacgt TGCAtgca | rev
  
  ```
  
  > **Comments:**
  > **username_3**: And if I want to put it into a variable instead of echo it?  
  > **username_0**: I would enclose the code in $() and assign to a variable assuming you are using a recent version of bash.  
  > **username_3**: that works thanks!  
  
  ---
  
  ### Answer by username_1 on 2020-10-01. Score: 7
  
  Reverse complement FASTA/Q:
  
  ```
  seqtk seq -r in.fa > out.fa
  
  ```
  
  <https://github.com/lh3/seqtk>
  
  
  ---
  
  ### Answer by username_2 on 2020-04-29. Score: 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.
  
  
  ---
  
  