Question: modify header of sequences file
0
gravatar for Jason
2.4 years ago by
Jason0
Jason0 wrote:

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 • 608 views
ADD COMMENTlink modified 2.4 years ago by Pierre Lindenbaum129k • written 2.4 years ago by Jason0
2
gravatar for Pierre Lindenbaum
2.4 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum129k wrote:
`sed 's/^>[^|]*|/>/;/^>/s/|/ /g'` in.fasta
ADD COMMENTlink modified 2.4 years ago by genomax85k • written 2.4 years ago by Pierre Lindenbaum129k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1001 users visited in the last hour