Entering edit mode
2.4 years ago
ledba
•
0
Hello everyone,
I have several fasta files and a tab separated text file with names of each file and their id on each line:
exemple he fasta file looks like this: shiroborus—colonus.fasta
>scaffold_1
ACTGCGCGATAGATAGAT
>scaffold_2
ACTGCGCGATAGATAGAT
>scaffold_3
ACTGCGCGATAGATAGAT
The tab separated text file looks like this:
id|124452| shiroborus—colonus
id|124499| tabroborus—virulus
id|1654502| shirus—rhizobus
results fasta file :
>id|124452|shiroborus—colonus|scaffold_1
ACTGCGCGATAGATAGAT
>id|124452|shiroborus—colonus|scaffold_2
ACTGCGCGATAGATAGAT
>id|124452|shiroborus—colonus|scaffold_3
ACTGCGCGATAGATAGAT
I would like to replace each header of each fasta file by the corresponding line of each fasta file. Thanks a lot!
What have you tried?
What is the correspondence between the headers and the scaffolds? Are they guaranteed to be in the right order in the tab file?
hello, i tried and i succeeded
Please add the solution that worked for you as an answer here so it helps some other soul in future. You can accept your own answer to make the thread as complete.