Entering edit mode
4.8 years ago
Metaxo
•
0
Hi.
I wanted to rename some 200 fasta files' headers with the file name plus their original headers with seperation in between.
For example, if the file name of a fasta file is DP16D_E2
, and the headers are >NODE_1_length_281463_cov_31.3018
>NODE_2_length_281037_cov_32.253
>NODE_3_length_274463_cov_32.7402
The resulting header names will be >DP16D_E2_NODE_1_length_281463_cov_31.3018
>DP16D_E2_NODE_2_length_281037_cov_32.253
>DP16D_E2_NODE_3_length_274463_cov_32.7402
Is there any code that could help achieve this objective?
Thanks so much.
H.