SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   bam2fastq discarded reads (http://seqanswers.com/forums/showthread.php?t=26488)

Derek-C 01-14-2013 03:31 AM

bam2fastq discarded reads
 
Hi all,

I've been using bam2fastq on my tophat output and it's been great, runs really quickly, except for the number of reads being discarded. For example this was for one of my output files from tophat

This looks like paired data from lane 239.
Output will be in x_1.fastq and x_2.fastq
60465861 sequences in the BAM file
60465861 sequences exported
WARNING: 6585459 reads could not be matched to a mate and were not exported

That's 10% of the reads being discarded, and in other files it's even more (I ran it on another file just now and 17% of the reads were discarded). What I don't understand is that the PE files which were put into tophat were quality filtered with software to directly handle PEs and so both files have the same number of reads and all the reads have mates and both PE files are the same order (tophat freaks out otherwise) so why is bam2fastq discarding these reads? If any reads didn't have a mate then tophat would have returned an error.

marcowanger 01-14-2013 03:50 AM

I remember Bam2fastq only export read pair. So, all singleton mapped will be discarded. In your case, it may be better to write a small script to parse the singleton out

Derek-C 01-14-2013 06:01 AM

Quote:

Originally Posted by marcowanger (Post 93660)
I remember Bam2fastq only export read pair. So, all singleton mapped will be discarded. In your case, it may be better to write a small script to parse the singleton out

Are you certain about the singletons thing? It would make sense, butl I just did some checking there with samtools flagstat and according to the numbers I'm looking at for this one accepted_hits.bam file from tophat there were more singleton reads then there were reads discarded by bam2fastq (~3 million more). So if bam2fastq doesn't export singletons, what happened to those 3 million reads.

Actually there are options in tophat for setting it so that there should be no singletons, hopefully that'll fix this.


All times are GMT -8. The time now is 01:02 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.