Question: Modify Fasta headers
0
gravatar for utkarsh.sood
4.5 years ago by
utkarsh.sood30
India
utkarsh.sood30 wrote:

can I modify the following headers

>gi|392981410|ref|NC_018080|pseudocap|273_483_2027_+

>gi|392981410|ref|NC_018080|pseudocap|273_2056_3159_+

so on

to

>protein 1 [Pseudomonas aeruginosa 19BR]

>protien 2 [Pseudomonas aeruginosa 19BR]

so on 

sequence • 1.3k views
ADD COMMENTlink modified 4.5 years ago by geek_y11k • written 4.5 years ago by utkarsh.sood30
3
gravatar for geek_y
4.5 years ago by
geek_y11k
Barcelona
geek_y11k wrote:
awk 'BEGIN{counts=1} { if ($0 ~ /^>/)  { print ">protein "counts" [Pseudomonas aeruginosa 19BR]"; counts++ } else { print }}' <input_file>
ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by geek_y11k
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: 1005 users visited in the last hour