gatk icon indicating copy to clipboard operation
gatk copied to clipboard

Mutect2 error ComparableSamRecordIterator

Open ashakru opened this issue 3 years ago • 1 comments

Bug Report

Affected tool(s) or class(es)

Mutect2 in tumour-normal mode

Affected version(s)

  • 4.2.6.1
  • 4.2.0.0

Description

Mutect2 crashes with an error:

16:53:19.984 INFO  Mutect2 - Shutting down engine
[25 May 2022 16:53:19 BST] org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2 done. Elapsed time: 0.04 minutes.
Runtime.totalMemory()=1632632832
java.lang.NullPointerException
	at htsjdk.samtools.ComparableSamRecordIterator.compareTo(ComparableSamRecordIterator.java:68)
	at htsjdk.samtools.ComparableSamRecordIterator.compareTo(ComparableSamRecordIterator.java:36)
	at java.util.PriorityQueue.siftUpComparable(PriorityQueue.java:656)
	at java.util.PriorityQueue.siftUp(PriorityQueue.java:647)
	at java.util.PriorityQueue.offer(PriorityQueue.java:344)
	at htsjdk.samtools.MergingSamRecordIterator.addIfNotEmpty(MergingSamRecordIterator.java:161)
	at htsjdk.samtools.MergingSamRecordIterator.<init>(MergingSamRecordIterator.java:94)
	at org.broadinstitute.hellbender.engine.ReadsPathDataSource.prepareIteratorsForTraversal(ReadsPathDataSource.java:429)
	at org.broadinstitute.hellbender.engine.ReadsPathDataSource.iterator(ReadsPathDataSource.java:336)
	at org.broadinstitute.hellbender.engine.MultiIntervalLocalReadShard.iterator(MultiIntervalLocalReadShard.java:134)
	at org.broadinstitute.hellbender.engine.AssemblyRegionIterator.<init>(AssemblyRegionIterator.java:86)
	at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.processReadShard(AssemblyRegionWalker.java:188)
	at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.traverse(AssemblyRegionWalker.java:173)
	at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1085)
	at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:140)
	at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:192)
	at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:211)
	at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160)
	at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203)
	at org.broadinstitute.hellbender.Main.main(Main.java:289)

Steps to reproduce

The error occurs when running a command:

gatk Mutect2 -R /home/genome/gatk.hg38/Homo_sapiens_assembly38.fasta -L panel_collapsed.bed -I bam/tumour_recalibrated.bam -I bam/normal_recalibrated.bam -tumor tumour -normal normal -germline-resource /home/genome/gatk.hg38/af-only-gnomad.hg38.vcf.gz -pon /home/genome/pon/PON_B1.vcf --genotype-pon-sites --f1r2-tar-gz results/learnOrientation/tumour_lo.tar.gz -O results/Mutect2/tumour.s.vcf.gz -bamout bam/tumour.mutect2.bam --disable-read-filter MateOnSameContigOrNoMappedMateReadFilter --af-of-alleles-not-in-resource 0.000001

Expected behavior

Mutect2 producing outputs

Actual behavior

Full log: Mutect2_error.txt


I would be grateful if you could help me to investigate the cause of this error. I couldn't find any clues when googling it and tried picard ValidateSamFile but it returns no errors or warnings. Many thanks!

ashakru avatar May 25 '22 16:05 ashakru

@ashakru Could you please check the first line in the headers for your BAM/SAM/CRAM file(s) and report what the SO (Sort Order) field is set to? The relevant line looks like this:

@HD     VN:1.5  GO:none SO:coordinate

droazen avatar Jun 06 '22 19:06 droazen