This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to remove a part of the header from a FASTA file?

Here is an example of the header from the FASTA file

>PSR83604 cdna supercontig:Red5_PS1_1.69.0:ps1sf1427:11608:20559:-1 gene:CEY00_Acc33586 gene_biotype:protein_coding transcript_biotype:protein_coding description:Cysteine-rich receptor-like protein kinase

I want to keep just the 'description' part which contains the protein name and remove rest of them from the header.

I tried using 'sed', but I'm going wrong somewhere.

Can someone help?

Thank you in advance..

fasta fasta genome cdna

1 answer

This question is so often asked. Try searching Biostars externally using google (trim fasta headers site: biostars.org) and you will find plenty of example threads. Here is one.

Thank you very much. I already tried some of the solutions mentioned in Biostars. But still it didn't work. That's why I decided to post up a separate question. I'll look into it more.

But still it didn't work.

Is never a good description of the problem. You need to be specific as to what did not work.

Log in to answer this question.