Genome Analysis Toolkit

Variant Discovery in High-Throughput Sequencing Data

GATK process banner

Need Help?

Search our documentation

Community Forum

Hi, How can we help?

Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools with a primary focus on variant discovery and genotyping. Its powerful processing engine and high-performance computing features make it capable of taking on projects of any size. Learn more

Mutect2 - Need one or two reads to construct a fragment

0

13 comments

  • Avatar
    Beri

    Hi DB

    For clarification, you are able to run the command posted above manually but when this command is used in a Snakemake workflow script the above error is seen? 

    0
    Comment actions Permalink
  • Avatar
    D B

    That is correct. I wonder if the error message should be of concern although an output was generated.

    0
    Comment actions Permalink
  • Avatar
    Beri

    If that's the case then this might not be a GATK related issue, it could be associated with the Snakemake script where the GATK command is not given the correct arguments. We're more familiar with WDL workflows than Snakemake but some common suggestions would be to use full paths to the desired input files and double check the command Snakemake is actually using when running GATK (this should be written in a log file).

    0
    Comment actions Permalink
  • Avatar
    D B

    I don't think that's true. Examining the log from the GATK run for the problematic chromosome, the arguments are correctly provided since I can observe the lines indicating that the file has been processed. I assume if the arguments were not provided correctly, then the log file would immediately show the error without GATK processing any of the reads.

    For the purpose of this post, I would like some assistance in better understanding the error message "Need one or two reads to construct a fragment" more so than the issue with Snakemake.

    0
    Comment actions Permalink
  • Avatar
    Beri

    Got it, I'll create a ticket for the dev team to investigate. 

    0
    Comment actions Permalink
  • Avatar
    D B

    Thank you! Will I be notified on this post or will I have to follow up in another manner?

    0
    Comment actions Permalink
  • Avatar
    Beri

    You'll be notified on this post

    0
    Comment actions Permalink
  • Avatar
    Beri

    The dev team mentioned this error might be associated with the following Git Pull Request: https://github.com/broadinstitute/gatk/pull/6327 . This has been merged to the GATK master branch but has yet to be released. You can try building GATK locally from the master branch and test it. 

    0
    Comment actions Permalink
  • Avatar
    D B

    Thanks Beri. I thought I might add the full error message as a reference for the dev team or whoever might find useful. The command I run generates a .VCF file, but if you look at it, MuTect2 seems to stop around half point of chromosome 2 and finishes:

    15:42:02.606 INFO ProgressMeter - chr2:108490446 4.7 204560 43411.9
    15:42:12.500 INFO VectorLoglessPairHMM - Time spent in setup for JNI call : 0.263049886
    15:42:12.500 INFO PairHMM - Total compute time in PairHMM computeLogLikelihoods() : 31.062298165
    15:42:12.500 INFO SmithWatermanAligner - Total compute time in java Smith-Waterman : 24.30 sec
    15:42:12.501 INFO Mutect2 - Shutting down engine
    [January 27, 2020 3:42:12 PM EST] org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2 done. Elapsed time: 4.91 minutes.
    Runtime.totalMemory()=2076049408
    java.lang.IllegalArgumentException: Need one or two reads to construct a fragment
    at org.broadinstitute.hellbender.utils.Utils.validateArg(Utils.java:725)
    at org.broadinstitute.hellbender.utils.read.Fragment.create(Fragment.java:43)
    at org.broadinstitute.hellbender.utils.read.Fragment.createAndAvoidFailure(Fragment.java:58)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1376)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.broadinstitute.hellbender.utils.genotyper.AlleleLikelihoods.groupEvidence(AlleleLikelihoods.java:589)
    at org.broadinstitute.hellbender.tools.walkers.mutect.SomaticGenotypingEngine.callMutations(SomaticGenotypingEngine.java:93)
    at org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2Engine.callRegion(Mutect2Engine.java:251)
    at org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2.apply(Mutect2.java:320)
    at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.processReadShard(AssemblyRegionWalker.java:308)
    at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.traverse(AssemblyRegionWalker.java:281)
    at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1048)
    at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:139)
    at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:191)
    at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:210)
    at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:163)
    at org.broadinstitute.hellbender.Main.mainEntry(Main.java:206)
    at org.broadinstitute.hellbender.Main.main(Main.java:292)

    0
    Comment actions Permalink
  • Avatar
    D B

    Hi Beri,

    Just wanted to confirm that pulling from Github repo seemed to have resolved the issue.

    Is it correct to interpret the error message as: during the run, the current release version of MuTect2 gives an exception because there is insufficient number of (primary+supplemental) reads for a specific loci where variant calling is being performed?

    0
    Comment actions Permalink
  • Avatar
    Beri

    The comment from the pull request states "Modified the fragment creation code to not throw an exception in the case that there are more than 2 reads supporting a fragment and they are all supplementary, secondary, and/or duplicates. Instead, it will just pick one of those reads to use." It sounds like it produces an exception when there is more than 2 reads at a specific loci, I can double check with the team if you would like. 

    0
    Comment actions Permalink
  • Avatar
    Jenifer

    Hi!

    Do you think setting --independent-mates as True could help solving this issue?

    0
    Comment actions Permalink
  • Avatar
    David Benjamin

    Jenifer Doing so harms accuracy.  It is preferable to use the latest GATK release.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk