This is a test version of Biostars. For the public version, visit https://www.biostars.org.
replacing fasta headers

Hi,

I would like to modify the fasta headers from a file.

I would like to change:

>A0A0F2M4U6|A0A0F2M4U6_SPOSC Endoplasmic reticulum chaperone BiP OS=Sporothrix schenckii 1099-18 OX=1397361 GN=SPSK_04019 PE=3 SV=1

by

>A0A0F2M4U6

Thanks in advance!

format header fasta

This is a frequently asked question. There are many threads on this topic.

A simple cut -f1 -d "|" your.fa > new.fa should suffice if all fasta headers follow exactly identical pattern.

$ awk -F "|" '{print $1}' test.fa

0 answers

No answers yet.

Log in to answer this question.