Hi,
Looks like samtools fastq is broken:
I've just run the following:
$ /.../samtools-1.3.1/samtools fastq -F 2304 -0 query/0.fastq -1 query/1.fastq
-2 query/2.fastq -s query/s.fastq 13565_1#1.cram
[M::bam2fq_mainloop_singletontrack] discarded 41679610 singletons
[M::bam2fq_mainloop_singletontrack] processed 46712744 reads
$ echo $?
0
$ ls -lh query/
total 8.2G
-rw-r----- 1 xxxxxxx cancer 0 Feb 8 15:44 0.fastq
-rw-r----- 1 xxxxxxx cancer 448M Feb 8 15:45 1.fastq
-rw-r----- 1 xxxxxxx cancer 448M Feb 8 15:45 2.fastq
-rw-r----- 1 xxxxxxx cancer 7.3G Feb 8 15:45 s.fastq
Checked the first record in the singleton file:
$ head -n 1 query/s.fastq
@HS11_13565:1:1202:7470:78064#1
Searched the original cram for the record:
$ /.../samtools-1.3.1/samtools view 13565_1#1.cram | grep -F
'HS11_13565:1:1202:7470:78064#1'
HS11_13565:1:1202:7470:78064#1 99 1 10033 0 75M =
10193 234 ...
HS11_13565:1:1202:7470:78064#1 147 1 10193 37 49M1I25M
= 10033 -234 ...
$ grep -F 'HS11_13565:1:1202:7470:78064#1' query/1.fastq query/2.fastq
<NO OUTPUT>
The results from bamtofastq (biobambam2) are more like I'd expect:
$ bamtofastq filename=13565_1#1.cram inputformat=cram outputdir=query_b2fq
outputperreadgroup=1
[V] 1 21.4993MB/s 119604
...
[V] 44 33.424MB/s 185945
[V] 46712744
[V] MemUsage(size=72.6211,rss=12.168,peak=677.504) wall clock time
04:32:53794399
$ ls -lh query_b2fq/
total 8.2G
-rw-r----- 1 cgppipe cancer 4.1G Feb 8 16:05 1#1_1.fq
-rw-r----- 1 cgppipe cancer 4.1G Feb 8 16:05 1#1_2.fq
I can transfer this to GitHub but thought it should be raised here as a
priority to make people aware
Regards,
Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute
[email protected]
Tel:+44 (0)1223 834244 Ext: 4983
Office: H104
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help