Renaming fasta headers based on a list
Hi all,
I would like to rename the headers of my fasta with a list of IDs.
For each sequence I have this type of header .
>range=chr16:946803-947997
In a separated .txt file I have a list of IDs, in the same order than the sequences, that I would like to use as headers. I guess a simple approach based on bash/awk/sed should work, but I couldn't manage to do so.
Cheers!
• 1,925 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Can you confirm that your fasta headers look like the following (without the
"shown above)? Otherwise the files would not be in fasta format.Yes indeed it is without the (")
This is the thread you need based on your original question: replace fasta headers with another name in a text file
this as been asked many times: Renaming fasta headers according to a matching name list ; Replace fasta Header witha a matching text ; Rename fasta file header with name available in the text file ; How To Rename FASTA Headers ; replace fasta headers with another name in a text file ; etc...