SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
tophat problem: no accepted_hits.bam generated RNAer Bioinformatics 9 08-30-2013 09:41 AM
Are there any good ways to use SAMtools java API to convert .bam file into .txt file? alextree Bioinformatics 8 01-24-2012 09:20 AM
Single end RNAseq- no BAM file generated ibn.adam RNA Sequencing 0 10-28-2011 06:53 AM
tophat problem: no accepted_hits.bam generated RNAer Bioinformatics 0 07-19-2011 12:18 PM
Picard MarkDuplicates - How to identify duplicates in generated BAM file makarovv Bioinformatics 6 11-10-2010 08:02 AM

Reply
 
Thread Tools
Old 12-13-2010, 07:00 PM   #1
rg_gis
Junior Member
 
Location: Singapore

Join Date: Mar 2010
Posts: 2
Default Samtools flagstat on Tophat generated .bam file

Hi,

On running the samtools flagstat command on the accepted_hits.bam file generated by tophat, I get the following output:

13414556 in total
0 QC failure
0 duplicates
13414556 mapped (100.00%)
0 paired in sequencing
0 read1
0 read2
0 properly paired (nan%)
0 with itself and mate mapped
0 singletons (nan%)
0 with mate mapped to a different chr
0 with mate mapped to a different chr (mapQ>=5)


I am not sure why the duplicates are 0, as this run of tophat allws upto 40 mismatches and there are reads which are mapped to several location on the genome.

Could someone tell me if there is an alternate way to find out the number of unique reads and the distribution of multi mapped reads from the bam file?

Thanks you.
rg_gis is offline   Reply With Quote
Old 12-14-2010, 06:15 AM   #2
kmcarr
Senior Member
 
Location: USA, Midwest

Join Date: May 2008
Posts: 1,177
Default

Samtools flagstat does not inspect the alignments itself when it reports these statistics, it only reads the status flag value associated with each alignment and summarizes that. The flag has a bit which indicates whether or not a read is a duplicate (x0400, or 1024 in decimal). This flag would need to have been set by some other tool which analyzes the S/BAM file for duplicates, e.g. Picard's markDuplicates.

Also, it seems you are misunderstanding what is meant by a duplicate in NGS mapping experiments. A duplicate does not mean a read which maps to multiple location on the genome. Duplicates refer to multiple reads which map to the identical location on the genome.
kmcarr is offline   Reply With Quote
Old 12-14-2010, 07:10 AM   #3
rg_gis
Junior Member
 
Location: Singapore

Join Date: Mar 2010
Posts: 2
Default

Thank you for the reply.. I did misunderstand the meaning of duplicates..

As far as I have understood, The NH tag of a .sam file is what determines how many locations the read has mapped to ..
rg_gis is offline   Reply With Quote
Old 03-11-2011, 05:15 AM   #4
telos
Member
 
Location: London

Join Date: Jan 2010
Posts: 11
Default

Any idea why every single read appears as mapped? Is TopHat not outputting unaligned reads to the bam?
telos is offline   Reply With Quote
Old 03-11-2011, 05:25 AM   #5
Jon_Keats
Senior Member
 
Location: Phoenix, AZ

Join Date: Mar 2010
Posts: 279
Default

Yes Tophat only output the alignments. You can do a line count of your input fastq file "wc -l sequences.fastq" to get total number of reads. Remember to divide the line by 4, as each read is encoded in four lines (read ID, Read Sequence, read ID, Quality values). The fun thing with single end reads is when you end up with 120% mapped! Love the fact that tophat prints the same read multiple times at different locations if the read maps to multiple locations.
Jon_Keats is offline   Reply With Quote
Old 03-14-2011, 03:03 AM   #6
DavidMatthewsBristol
Junior Member
 
Location: Bristol, UK

Join Date: Aug 2010
Posts: 7
Default

Hi all,

I've been worrying about multihit reads as well. I've put up a workflow on Galaxy that attempts to deal with this by separating the multi hit reads form the unique ones - hope it helps.

David
DavidMatthewsBristol is offline   Reply With Quote
Old 02-27-2015, 09:35 PM   #7
archana2287
Junior Member
 
Location: INDIA

Join Date: Feb 2015
Posts: 5
Thumbs up

Quote:
Originally Posted by DavidMatthewsBristol View Post
Hi all,

I've been worrying about multihit reads as well. I've put up a workflow on Galaxy that attempts to deal with this by separating the multi hit reads form the unique ones - hope it helps.

David

please share link (workflow on galaxy ), that separates the multi hit reads form the unique ones.

waiting for reply
archana2287 is offline   Reply With Quote
Reply

Tags
samtools, tophat

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 07:32 AM.


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