replacing fasta headers
0
0
Entering edit mode
6 weeks ago

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 • 193 views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode
$ awk -F "|" '{print $1}' test.fa
ADD REPLY

Login before adding your answer.

Traffic: 2009 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6