Sure thing:
The output from samtools flagstat 5842_7#1.bam:
|115834222| |+ ||0| |in total (QC-passed reads + QC-failed reads)|
|||5190523| |+ ||0| |duplicates|
|114011421| |+ ||0| |mapped (||98.43||%:-nan%)|
|115834222| |+ ||0| |paired in sequencing|
|||57917111| |+ ||0| |read1|
|||57917111| |+ ||0| |read2|
|112776930| |+ ||0| |properly paired (||97.36||%:-nan%)|
|112962800| |+ ||0| |with itself and mate mapped|
|||1048621| |+ ||0| |singletons (||0.91||%:-nan%)|
|||148645| |+ ||0| |with mate mapped to a different chr|
|||110386| |+ ||0| |with mate mapped to a different chr (mapQ>=||5||)
|
On 17/09/14 19:17, Tim Fennell wrote:
Can you post the full output of your flagstat command? Flag stat reports the
total number of records in the file. If your file contains any secondary
alignment records or supplementary alignment records these will be included in
flagstat’s count, but excluded by SamToFastq so as not to emit the same read
more than once. That’s my best guess given the information below.
-t
On Sep 17, 2014, at 10:49 AM, Justin P Whalley<[email protected]> wrote:
Hello,
I wish to convert a bam file to a fastq file. However using Picard's
Sam2Fastq, I lost around 19% of the reads:
Using the command:
samtools flagstat 5842_7#1.bam
I found that my bam file had 57917111 paired reads.
Running the command:
java -Xmx4g -jar SamToFastq.jar I=5842_7#1.bam F=5842_7#1.end1.fq
F2=5842_7#1.end2.fq FU=5842_7#1.unpaired.fq
left me with a the end1.fq and end2.fq with 46859131 reads each (and the
unpaired.fq file empty).
Initially I thought that pass filtering may have thrown out the low
quality reads, but using the option to include them:
java -Xmx4g -jar SamToFastq.jar I=5842_7#1.bam F=5842_7#1.end1.fq
F2=5842_7#1.end2.fq FU=5842_7#1.unpaired.fq INCLUDE_NON_PF_READS=true
still results in the same number of reads.
Does anyone know why this happens and if there is a way around this? I
have resorted to using BEDTools, which is roughly three times slower
than Picard, but does keep all the reads.
Thank you in advance for any help,
Justin
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help