title: iterate through FASTA entries and rename duplicates
body: <p>I have a FASTA file with a large number of entries. Although all of the DNA sequences are different, some of the FASTA names are identical. If there are multiple copies of a name I would like to append a number so that they become unique names. For example:</p>
  
  <pre><code>&gt;NAME
  ATTTTTGGGGGGTGTGTG
  &gt;NAME
  ATTTTTTTTCGCGCGC
  &gt;NAME
  AAACCCTTTGTG
  </code></pre>
  
  <p>would become:</p>
  
  <pre><code>&gt;NAME_1
  ATTTTTGGGGGGTGTGTG
  &gt;NAME_2
  ATTTTTTTTCGCGCGC
  &gt;NAME_3
  AAACCCTTTGTG
  </code></pre>
  
  <p>thanks.</p>
  
  <p>update. Since I was planning on using this in R anyway I imported the fasta sequence to R and have it as a dataframe, df. I can then rename then as desired by using the following line:</p>
  
  <pre><code>library(plyr)
  ddply(df, Name_Column, transform, Column = paste(Name_Column,seq_along(Name_Column), sep=""))
  </code></pre>
  
  <p>code inspired by this <a href="https://stackoverflow.com/questions/2187448/how-do-i-use-plyr-to-number-rows">post</a> </p>