Renaming fasta headers based on a list
0
0
Entering edit mode
10 weeks ago
Bertrand • 0

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!

fasta • 390 views
1
Entering edit mode

Can you confirm that your fasta headers look like the following (without the " shown above)? Otherwise the files would not be in fasta format.

>range=chr16:946803-947997

0
Entering edit mode

Yes indeed it is without the (")

1
Entering edit mode

This is the thread you need based on your original question: replace fasta headers with another name in a text file

1
Entering edit mode