This is a test version of Biostars. For the public version, visit https://www.biostars.org.
fasta header rearrangement

Hi, I want to r arrange header of multifasta file . is there any command (awk,sed) or script (perl,python) for doing this job. please help

input file:

>lcl|NC_025993.1_cds_XP_019709722.1_4 [gene=LOC105045870] [db_xref=GeneID:105045870] [protein=glucan endo-1,3-beta-glucosidase 14 isoform X1] [protein_id=XP_019709722.1] [location=join(18965..19073,19961..21000,30376..30516)] [OIL PALM]
ATGGACGGCGTCGGAGGAGCGGCGGTGTTTTTCTTTTGCGGACCAGGAGGAGCCCATGTGATGCGGGCCTGCCGATGCTT
GTTCATTCTTCTCCTCTTTCTTCACGGCGGCCTTGTGACAGTTGAGGCGTTTACTGGAACCTATGGAATAAACTATGGCA

>lcl|NC_025993.1_cds_XP_019709703.1_5 [gene=LOC105045870] [db_xref=GeneID:105045870] [protein=glucan endo-1,3-beta-glucosidase 14 isoform X2] [protein_id=XP_019709703.1] [location=join(18965..19073,19961..21000,29762..29797)] [OIL PALM]
ATGGACGGCGTCGGAGGAGCGGCGGTGTTTTTCTTTTGCGGACCAGGAGGAGCCCATGTGATGCGGGCCTGCCGATGCTT
GTTCATTCTTCTCCTCTTTCTTCACGGCGGCCTTGTGACAGTTGAGGCGTTTACTGGAACCTATGGAATAAACTATGGCA

out put should be:

 >lcl|NC_025993.1_cds_XP_019709722.1_4 [gene=LOC105045870]  [protein=glucan endo-1,3-beta-glucosidase 14 isoform X1] [protein_id=XP_019709722.1] [OIL PALM]
ATGGACGGCGTCGGAGGAGCGGCGGTGTTTTTCTTTTGCGGACCAGGAGGAGCCCATGTGATGCGGGCCTGCCGATGCTT
GTTCATTCTTCTCCTCTTTCTTCACGGCGGCCTTGTGACAGTTGAGGCGTTTACTGGAACCTATGGAATAAACTATGGCA

 >lcl|NC_025993.1_cds_XP_019709703.1_5 [gene=LOC105045870] [protein=glucan endo-1,3-beta-glucosidase 14 isoform X2] [protein_id=XP_019709703.1] [gbkey=CDS][OIL PALM]
ATGGACGGCGTCGGAGGAGCGGCGGTGTTTTTCTTTTGCGGACCAGGAGGAGCCCATGTGATGCGGGCCTGCCGATGCTT
GTTCATTCTTCTCCTCTTTCTTCACGGCGGCCTTGTGACAGTTGAGGCGTTTACTGGAACCTATGGAATAAACTATGGCA

thank you.

fasta header

is there any command (awk,sed) or script (perl,python) for doing this job

There are many posts on Biostars regarding this. Choose a viable approach, try it, and if doesn't work, come back with an error for help.

Please provide links of such type posts.

thanks

On the right of this page, there is a "Similar Posts" list, listing posts that are similar regarding the tags.

Hello kinggang!

We believe that this post does not fit the main topic of this site.

Please put some effort into searching the site.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

Kindly explain the reason..

Thanks

0 answers

No answers yet.

Log in to answer this question.