Is it possible to delete part of the header string?

Is it possible to delete part of the header string?

2

Hi, all.

I would like to remove “locus=” and “gene=” from headers of fasta as following.
I used tr, but the other strings disappeared, too.

Before;

>3R5.1a wormpep=CE24758 gene=WBGene00007065 locus=pot-3 insdc=CAA21777.2 product="POT1PC domain-containing protein"
>2RSSE.1a wormpep=CE32785 gene=WBGene00007064 locus=rga-9 insdc=CCD61138.1 product="Rho-GAP domain-containing protein"
>2L52.1a wormpep=CE32090 gene=WBGene00007063 insdc=CCD61130.1

After;

>3R5.1a wormpep=CE24758 WBGene00007065 pot-3 insdc=CAA21777.2 product="POT1PC domain-containing protein"
>2RSSE.1a wormpep=CE32785 WBGene00007064 rga-9 insdc=CCD61138.1 product="Rho-GAP domain-containing protein"
>2L52.1a wormpep=CE32090 WBGene00007063 insdc=CCD61130.1

Is there a way to delete only a specific string in a non delimited string?
Could you please give me some help.

Thank you very much for your help!


bash


Linux


fasta

• 36 views

updated 1 hour ago by

17k

written 2 hours ago by

▴

60

Read more here: Source link