modify header of sequences file
1
0
Entering edit mode
6.3 years ago
Jason ▴ 10

Hello everybody, I am not and expert with sed and I am sure that someone will do this work faster and better than me.

I would like to edit multiple fasta header from this format.

input file :

 >sp|O35215|DOPD_MOUSE D-dopachrome decarboxylase OS=Mus musculus GN=Ddt PE=1 SV=3
MPFVELETNLPASRIPAGLENRLCAATATILDKPEDRVSVTIRPGMTLLMNKSTEPCAHL
LVSSIGVVGTAEQNRTHSASFFKFLTEELSLDQDRIVIRFFPLEAWQIGKKGTVMTFL

Result should be like below:

>O35215 DOPD_MOUSE D-dopachrome decarboxylase OS=Mus musculus GN=Ddt PE=1 SV=3
MPFVELETNLPASRIPAGLENRLCAATATILDKPEDRVSVTIRPGMTLLMNKSTEPCAHL
LVSSIGVVGTAEQNRTHSASFFKFLTEELSLDQDRIVIRFFPLEAWQIGKKGTVMTFL
sequencing • 1.0k views
ADD COMMENT
2
Entering edit mode
6.3 years ago
`sed 's/^>[^|]*|/>/;/^>/s/|/ /g'` in.fasta
ADD COMMENT

Login before adding your answer.

Traffic: 2223 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6