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
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to