This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Change trinity fasta header sequence ID's

Hi all,

I have a trinity fasta file and I want to change sequence ID. I tried sed, but it doesn't work.

The sequences are like this:

>TR1|c0_g1_i1 len=319 path=[347:0-74 348:75-318] [-1, 347, 348, -2]
CCGACAAACAGATTCTTGTCAACTTTTACT.....
>TR1|c0_g2_i1 len=315 path=[345:0-70 346:71-314] [-1, 345, 346, -2]
CAAACAGATTCTTATACTTTTTTATTGAGCG....
......

I want to change them to :

>trinity_c0_g1_i1
CCGACAAACAGATTCTTGTCAACTTTTACT.....
>trinity_c0_g2_i1
CAAACAGATTCTTATACTTTTTTATTGAGCG....
......

Hope someone can help me. Thanks in advance.

Hui

sequence

I tried sed but it doesn't work

What did you try, exactly?

0 answers

No answers yet.

Log in to answer this question.