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.
• 1,383 views
•
link
0 answers
No answers yet.
Log in to answer this question.
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.
Yes, you are right, googling can be a daunting task.
https://stackoverflow.com/questions/28680828/retaining-text-after-delimiter-in-fasta-headers-using-awk
https://github.com/stephenturner/oneliners
You may have a look at SEDA (http://www.sing-group.org/seda/), which as an option to rearrange or "reformat" sequence headers. See section 3.8 of the manual (http://www.sing-group.org/seda/downloads/manuals/seda-user-manual-1.0.0.pdf) for more information. Regards.
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
Please see the responses you've received. Also read: http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202#s7 - #6: Do your homework