This is a test version of Biostars. For the public version, visit https://www.biostars.org.
change duplicate headers to unique headers in multifasta

I have a multi-fasta where many sequences have the same header. Something like this:

>Jerry_seinfeld
GCGCGCGCCG
>Jerry_seinfeld
GCGCATATATA
>Jerry_seinfeld
GCGCGATAAA

What I want to do is change the header every time it appears in duplicate, so I get something like this:

>Jerry_seinfeld_1
GCGCGCGCCG
>Jerry_seinfeld_2
GCGCATATATA
>Jerry_seinfeld_3
GCGCGATAAA

Any help is appreciated.

sequence

2 answers

See: Add count numbers to headers in a fasta file

Please browse biostars, e.g.

Add count numbers to headers in a fasta file or

Fasta header unique sequence or with a bit of imagination you can tweak this one

How do I add ">" symbol to FASTA headers?

Log in to answer this question.