How can I view and manage the Trinity.fasta by bash
1
0
Entering edit mode
5.9 years ago
kamoltip.lao ▴ 30

Hi everyone,

I'm a beginner and learning to analyze the sequence by practicing. Please give me a suggestion, How can I view and manage the assembly transcriptome from Trinity as Trinity.fasta by bash?

$ less Trinity.fasta 
>TRINITY_DN30765_c0_g1_i1 len=228 path=[0:0-227]
TGGCGAAGTTTAGAGCACGGTGTTATCGGTGCTAAAGCAGGTTTTATGGGTAGCATAGCTAAATCGCATAAATATATGCTACACATATGGCTTTCCATTGCCAACAACATGCTTACCACCTGCACTGGGTTCCACAGAAACTGGGTTCCACAGCTGTGTATTGGTCCAAGTGTTGT
AACATGCTTACCACCTGCACTGGGTTCCACAGAAATATGCAGTGTTATCTCTTTACATGCTTTCTGTGTATTGTGCGCGTTC
>TRINITY_DN30719_c0_g1_i1 len=202 path=[0:0-201]
CGCCGATATAAAAGATGGAGCACCCTGTATATGTATATACGTTCATGTCTTAATACAACTGTTGTTGTATACTTATATAAATACAAATCTGTTAATTCGTGGAATAGCAATTTACCACCCATGAATAAAGTGAATTGTTCTCAGTACCTTTGAAATACGTTTAAGTAATGTAATTTACATAA
>TRINITY_DN30753_c0_g1_i1 len=336 path=[0:0-335]
AAAAAATTAGCTTTATTTTTACTTTATGGTAATAGCTTTGGTGAAATATCGAAATTTTGACTTGAATTGTACCTATCAAACCATCTGAAATCGTACATTAGTACACAAGCAAATCATTTAGACTCTTTCGTCTATCTTCGGAACAAAAACTACCACTGCTTATATGTTTGGTTTTTAATGACGTGCTGGGACCATGTAATAAGGAGTT

I tried to use 'grep' to search for the transcript that specific to 'TTTGGTGAAATATCGAAA' sequence.

grep "TTTGGTGAAATATCGAAA" Trinity.fasta
AAAAAATTAGCTTTATTTTTACTTTATGGTAATAGCTTTGGTGAAATATCGAAATTTTGACTTGAATTGTACCTATCAAACCATCTGAAATCGTACATTAGTACACAAGCAAATCATTTAGACTCTTTCGTCTATCTTCGGAACAAAAACTACCACTGCTTATATGTTTGGTTTTTAATGACGTGCTGGGACCATGTAATAAGGAGTT

But, the output is without transcript ID, How can I view the transcript name and the sequence at the same time?

Or, in the case that I know the transcript ID, How can I view its sequence?

Thank you so much

RNA-Seq • 1.5k views
ADD COMMENT
0
Entering edit mode

try using tools like seqkit:

ADD REPLY
0
Entering edit mode
5.9 years ago
grep -B1 "TTTGGTGAAATATCGAAA" Trinity.fasta

will do the trick , and do

grep -A1 "transcriptID" to get the reverse, id +sequence

Depending on what your goal is, this is likely not the best approach to analyse or manage fasta files (eg. if the pattern you look for is split over two lines you will already miss it).

ADD COMMENT
0
Entering edit mode

Thank you so much, I got it.

ADD REPLY

Login before adding your answer.

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