SEQanswers

Go Back   SEQanswers > Applications Forums > RNA Sequencing



Similar Threads
Thread Thread Starter Forum Replies Last Post
View TopHat output xiaohua Bioinformatics 2 04-11-2012 05:11 PM
strand of the tophat output liuxq Bioinformatics 0 05-17-2011 05:27 AM
Tophat output - Questions makost Bioinformatics 1 02-21-2011 09:41 AM
TopHat output rururara Bioinformatics 6 02-10-2011 07:52 AM
Cannot understand Tophat output... Help! gen2prot Bioinformatics 4 05-20-2010 07:05 AM

Reply
 
Thread Tools
Old 03-27-2011, 05:30 AM   #1
stonerc
Junior Member
 
Location: USA

Join Date: Dec 2010
Posts: 1
Default TopHat output

Hi,
I ran TopHat on my RNA-Seq data and I am trying to get a sense of the total number of reads that aligned to anywhere in my reference sequence. Does the accepted_hits.sam file that is part of the TopHat output also report the alignments from the de novo junction discovery? In other words, in order to obtain the total number of mapped reads, can I just use the alignment statistics from the SAM file, or do I also need to add to that the junction counts from the junctions.bed file (5th column reporting the number of alignments spanning each junction)?
Thanks.
stonerc is offline   Reply With Quote
Old 03-27-2011, 08:19 PM   #2
Jon_Keats
Senior Member
 
Location: Phoenix, AZ

Join Date: Mar 2010
Posts: 279
Default

The SAM file contains all the alignments. Just be careful as reads that map to multiple locations get printed at each location so you can get 100+% aligment. But if you filter by read ID you can get the actual percentage of aligned reads.
Jon_Keats is offline   Reply With Quote
Old 03-31-2011, 07:14 PM   #3
lazap
Junior Member
 
Location: Melbourne, Australia

Join Date: Mar 2011
Posts: 1
Default

I'm just starting out with TopHat and it would be great if I could get an idea of how many reads aligned for comparing different options etc.

Can anyone suggest some code for filtering a SAM/BAM file so there is only one alignment for each read and then counting them?

I have tried using
awk '{if (a[$1]++ == 0) print $0; }'
and counting the number of lines in the resulting file but I always get half what is in the SAM/BAM file which is still way above the number of reads I had to start with.
lazap is offline   Reply With Quote
Old 11-07-2011, 12:38 PM   #4
jgarbe
Member
 
Location: Saint Paul, MN

Join Date: Mar 2010
Posts: 13
Default

Here's what you need to run:
samtools view accepted_hits.bam | cut -f 1 | sort | uniq | wc -l

From http://vallandingham.me/RNA_seq_diff...xpression.html
jgarbe is offline   Reply With Quote
Reply

Tags
tophat counts

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 08:46 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO