title: how to rename fasta file headers using sed
body: <p>i know this is pretty easy but i can't get it to work. I am trying to rename the header using sed and evnethough the reg experssion works but i can't rename the fasta header. Here is  an small example. I have a multi sequence fasta file something like below </p>
  
  <pre><code>&gt;Bra000001
  CTTATTTTCTCCTTCACCACCGTACCACAGAAAAAAACTGTGATTTTAAA
  AGCCACATTTACTTCTTTTTTTGTTGGGTCTAAATGTTAAAATAACATGT
  &gt;Bra000002
  TTTATGTAGTACTGGACTAATCGGGTAGGGAAACAATCTTGATTTAGCAA
  TACAGTGTAATAACTAATAATCATATTCATATTCCATAAATCCAAATGTT
  </code></pre>
  
  <p>Now i just want to add "Brassica rapa" at the end of fasta header like this</p>
  
  <pre><code>&gt;Bra000001 Brassica rapa
  CTTATTTTCTCCTTCACCACCGTACCACAGAAAAAAACTGTGATTTTAAA
  AGCCACATTTACTTCTTTTTTTGTTGGGTCTAAATGTTAAAATAACATGT
  &gt;Bra000002 Brassica rapa
  TTTATGTAGTACTGGACTAATCGGGTAGGGAAACAATCTTGATTTAGCAA
  TACAGTGTAATAACTAATAATCATATTCATATTCCATAAATCCAAATGTT
  </code></pre>
  
  <p>I am doing this for making it work</p>
  
  <pre><code>grep "&gt;" in.fa | sed 's/$/ Brassica rapa/' &gt; out.fa
  </code></pre>
  
  <p>However by doing this i can only change the headers but no sequence info here. Ideally i want to both change the header and keep the sequence as it is.</p>