I have a series of cram files that I want to merge without converting to bam. When I try samtools merge out.cram in1.cram in2.cram in3.cram
I get the following error: [bam_header_read] EOF marker is absent. The input is probably truncated. [bam_header_read] invalid BAM binary header (this is not a BAM file). [bam_header_read] EOF marker is absent. The input is probably truncated. [bam_header_read] invalid BAM binary header (this is not a BAM file). /tmp/1460051111.1957878: line 8: 18355 Segmentation fault
Is there any specification I can add to the merge command to make it work? None of the options seem to do the trick.
Also, can I then pass the cram file to Picard tools BamToFastq?
Thanks
What version of samtools do you have?
BTW, there's an
--input-fmt-option
that you can use.It's 0.1.18; doesn't work with that option. I'll update and try again. Thanks!
0.1.18 was written before CRAM was invented...
You should upgrade to the latest. That is a fairly old version of samtools.