Trim fasta sequence names
1
0
Entering edit mode
8.5 years ago
dvorikus • 0

Dear all,

I have bunch of fasta files with following sequence names format:

>gi|113476179|ref|YP_722240.1| hypothetical protein Tery_2568 [Trichodesmium erythraeum IMS101]

Do you have any script, which would help me to change it to something like this:

>Trichodesmium erythraeum IMS101

Thank you in advance!

Petr

fasta • 2.2k views
ADD COMMENT
1
Entering edit mode
8.5 years ago
cat input.txt | sed 's/.*\[/>/' | sed 's/\]//'
ADD COMMENT
0
Entering edit mode

It did exactly, what I needed. Thank you Noolean!

ADD REPLY
0
Entering edit mode

Glad to help! Please also upvote my answer by clicking on the thumbs up green icon:)

ADD REPLY

Login before adding your answer.

Traffic: 2567 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