GATK runtime error (READ_MAX_LENGTH must be > 0 but got 0) with 1000g bam

Hi,

I'm trying to build a pon with GATK 3.7-0 to use with mutect2. For that, I've downloaded 80 exome bam files from the 1000g project (GBR, TSI, IBS and CEU populations).
For most of them, when I try to use the artifact_dectection_mode, I get a GATK runtime error saying 'READ_MAX_LENGTH must be > 0 but got 0'.
To try you can, for example, download ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/HG00116/exome_alignment/HG00116.mapped.ILLUMINA.bwa.GBR.exome.20120522.bam
I'm using the b37 reference files from the bundle_gatk_2_8 and the bed file of SureSelect6 from Agilent .

Here the full stack trace and command line :

INFO 09:42:32,040 HelpFormatter - ------------------------------------------------------------------------------------
INFO 09:42:32,045 HelpFormatter - The Genome Analysis Toolkit (GATK) v3.7-0-gcfedb67, Compiled 2016/12/12 11:21:18
INFO 09:42:32,045 HelpFormatter - Copyright (c) 2010-2016 The Broad Institute
INFO 09:42:32,045 HelpFormatter - For support and documentation go to https://software.broadinstitute.org/gatk
INFO 09:42:32,045 HelpFormatter - [Thu Apr 06 09:42:32 GMT 2017] Executing on Linux 2.6.18-275.12.1.el5.573g0000 amd64
INFO 09:42:32,045 HelpFormatter - Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b25
INFO 09:42:32,049 HelpFormatter - Program Args: -T MuTect2 -I:tumor /data/misc/mutect2/pon/1000g_bam/HG00116.mapped.ILLUMINA.bwa.GBR.exome.20120522.bam --db
snp /data/highlander/reference/bundle_gatk_2_8/b37/dbsnp_138.b37.vcf --artifact_detection_mode -L /data/highlander/reference/bundle_gatk_2_8/b37/capture.sureselect6.bed -R /data/highlander/reference/bundle_gatk_2_8/b37/human_g1k_v37.fasta -o /data/misc/mutect2/pon/1000g_vcf_normal/HG00116.vcf.gz
INFO 09:42:32,062 HelpFormatter - Executing as [email protected] on Linux 2.6.18-275.12.1.el5.573g0000 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b25.
INFO 09:42:32,062 HelpFormatter - Date/Time: 2017/04/06 09:42:32
INFO 09:42:32,062 HelpFormatter - ------------------------------------------------------------------------------------
INFO 09:42:32,063 HelpFormatter - ------------------------------------------------------------------------------------

...

ERROR --
ERROR stack trace

java.lang.IllegalArgumentException: READ_MAX_LENGTH must be > 0 but got 0
at org.broadinstitute.gatk.utils.pairhmm.PairHMM.initialize(PairHMM.java:126)
at org.broadinstitute.gatk.utils.pairhmm.N2MemoryPairHMM.initialize(N2MemoryPairHMM.java:60)
at org.broadinstitute.gatk.utils.pairhmm.LoglessPairHMM.initialize(LoglessPairHMM.java:66)
at org.broadinstitute.gatk.utils.pairhmm.PairHMM.initialize(PairHMM.java:159)
at org.broadinstitute.gatk.tools.walkers.haplotypecaller.PairHMMLikelihoodCalculationEngine.initializePairHMM(PairHMMLikelihoodCalculationEngine.java:267)
at org.broadinstitute.gatk.tools.walkers.haplotypecaller.PairHMMLikelihoodCalculationEngine.computeReadLikelihoods(PairHMMLikelihoodCalculationEngine.java:282)
at org.broadinstitute.gatk.tools.walkers.cancer.m2.MuTect2.map(MuTect2.java:644)
at org.broadinstitute.gatk.tools.walkers.cancer.m2.MuTect2.map(MuTect2.java:171)
at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:709)
at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:705)
at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:274)
at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:274)
at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:78)
at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:98)
at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:316)
at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:123)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:256)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:158)
at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:108)

ERROR ------------------------------------------------------------------------------------------
ERROR A GATK RUNTIME ERROR has occurred (version 3.7-0-gcfedb67):
ERROR
ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
ERROR If not, please post the error message, with stack trace, to the GATK forum.
ERROR Visit our website and forum for extensive documentation and answers to
ERROR commonly asked questions https://software.broadinstitute.org/gatk
ERROR
ERROR MESSAGE: READ_MAX_LENGTH must be > 0 but got 0
ERROR ------------------------------------------------------------------------------------------

Am I doing something wrong or is it some kind of bug :-) ?

Thank you in advance for your help

Raphael

Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @RaphaelH
    Hi Raphael,

    Can you try validating the BAM file with ValidateSamFile? Also, please post an example record from the BAM file here.

    Thanks,
    Sheila

  • RaphaelHRaphaelH BrusselsMember

    Hi Sheila,

    ValidateSamFile yields errors:
    ERROR: Record 217703738, Read name SRR099965.100486269, MAPQ should be 0 for unmapped read. ERROR: Record 217703740, Read name SRR099965.115232457, MAPQ should be 0 for unmapped read. ERROR: Record 217703742, Read name SRR099965.43304339, MAPQ should be 0 for unmapped read. ... ERROR: Record 217931432, Read name SRR099965.49982962, MAPQ should be 0 for unmapped read. ERROR: Record 217931456, Read name SRR099965.58007572, MAPQ should be 0 for unmapped read. Maximum output of [100] errors reached.
    The reads for the first error:

    samtools view HG00116.mapped.ILLUMINA.bwa.GBR.exome.20120522.bam | grep SRR099965.100486269 SRR099965.100486269 125 Y 59373560 37 5S7M1I63M = 59373560 0 AGACATCACGATGGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGT ######GC>HDFIGEFJDHHHGEIEDEICJJHABGCEBGIBJDKDAIIIHIJDJEJKDFIKDGGEHGCBFFFC>DC X0:i:1 X1:i:0 XC:i:71 MD:Z:0G2A0T65 RG:Z:SRR099965 AM:i:0 NM:i:4 SM:i:37 XN:i:7 XT:A:U SRR099965.100486269 189 Y 59373560 0 * = 59373560 0 GACCTGTGATCCATCGTGATGTCTTATTTAAGGGGAACGTGTGGGCTATTTAGGCTTTATGACCCTGAAGTAGGAA #?CFBECHCFEFBC>[email protected]> RG:Z:SRR099965

    I tried to redownload the BAM file from 1000g, checked md5sum, but I get always the same results.

    Thanks

    Raphael

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @RaphaelH
    Hi Raphael,

    You can use CleanSam to get rid of those errors.

    -Sheila

  • RaphaelHRaphaelH BrusselsMember

    Hi Sheila,

    I used CleanSam on all 1000G exome bam files, and relaunched ValidateSamFile which now says that everything is OK.

    [Thu May 04 14:19:10 CEST 2017] net.sf.picard.sam.ValidateSamFile INPUT=/data/misc/mutect2/pon/1000g_bam_cleaned/HG00116.bam MODE=VERBOSE MAX_OUTPUT=100 IGNORE_WARNINGS=false VALIDATE_INDEX=true IS_BISULFITE_SEQUENCED=false MAX_OPEN_TEMP_FILES=8000 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
    Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /opt/picard-tools-1.107/libIntelDeflater.so which might have disabled stack guard. The VM will try to fix the stack guard now.
    It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
    [Thu May 04 14:19:10 CEST 2017] Executing as [email protected] on Linux 2.6.18-275.12.1.el5.573g0000 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b25; Picard version: 1.107(1667) IntelDeflater
    INFO 2017-05-04 14:20:27 SamFileValidator Validated Read 10,000,000 records. Elapsed time: 00:01:16s. Time for last 10,000,000: 76s. Last read position: 1:246,498,968
    INFO 2017-05-04 14:21:44 SamFileValidator Validated Read 20,000,000 records. Elapsed time: 00:02:33s. Time for last 10,000,000: 76s. Last read position: 3:99,933,603
    INFO 2017-05-04 14:23:00 SamFileValidator Validated Read 30,000,000 records. Elapsed time: 00:03:49s. Time for last 10,000,000: 76s. Last read position: 5:139,906,749
    INFO 2017-05-04 14:24:16 SamFileValidator Validated Read 40,000,000 records. Elapsed time: 00:05:05s. Time for last 10,000,000: 76s. Last read position: 7:134,620,498
    INFO 2017-05-04 14:25:33 SamFileValidator Validated Read 50,000,000 records. Elapsed time: 00:06:22s. Time for last 10,000,000: 76s. Last read position: 10:76,782,051
    INFO 2017-05-04 14:26:49 SamFileValidator Validated Read 60,000,000 records. Elapsed time: 00:07:37s. Time for last 10,000,000: 75s. Last read position: 12:99,059,413
    INFO 2017-05-04 14:28:05 SamFileValidator Validated Read 70,000,000 records. Elapsed time: 00:08:54s. Time for last 10,000,000: 76s. Last read position: 16:3,433,208
    INFO 2017-05-04 14:29:21 SamFileValidator Validated Read 80,000,000 records. Elapsed time: 00:10:10s. Time for last 10,000,000: 76s. Last read position: 19:11,917,300
    INFO 2017-05-04 14:30:40 SamFileValidator Validated Read 90,000,000 records. Elapsed time: 00:11:29s. Time for last 10,000,000: 79s. Last read position: Y:17,466,931
    No errors found

    Unfortunately, I still get the same error with GATK:

    INFO 04:49:12,808 HelpFormatter - ------------------------------------------------------------------------------------
    INFO 04:49:12,811 HelpFormatter - The Genome Analysis Toolkit (GATK) v3.7-0-gcfedb67, Compiled 2016/12/12 11:21:18
    INFO 04:49:12,811 HelpFormatter - Copyright (c) 2010-2016 The Broad Institute
    INFO 04:49:12,811 HelpFormatter - For support and documentation go to https://software.broadinstitute.org/gatk
    INFO 04:49:12,811 HelpFormatter - [Thu May 04 04:49:12 GMT 2017] Executing on Linux 2.6.18-275.12.1.el5.573g0000 amd64
    INFO 04:49:12,811 HelpFormatter - Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b25
    INFO 04:49:12,815 HelpFormatter - Program Args: -T MuTect2 -I:tumor /data/misc/mutect2/pon/1000g_bam_cleaned/HG00116.bam --dbsnp /data/highlander/reference/
    bundle_gatk_2_8/b37/dbsnp_138.b37.vcf --artifact_detection_mode -L /data/highlander/reference/bundle_gatk_2_8/b37/capture.sureselect6.bed -R /data/highlander
    /reference/bundle_gatk_2_8/b37/human_g1k_v37.fasta -o /data/misc/mutect2/pon/1000g_vcf_normal/HG00116.vcf.gz
    INFO 04:49:12,820 HelpFormatter - Executing as [email protected] on Linux 2.6.18-275.12.1.el5.573g0000 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b25.
    INFO 04:49:12,820 HelpFormatter - Date/Time: 2017/05/04 04:49:12
    INFO 04:49:12,821 HelpFormatter - ------------------------------------------------------------------------------------
    INFO 04:49:12,821 HelpFormatter - ------------------------------------------------------------------------------------
    INFO 04:49:12,837 GenomeAnalysisEngine - Strictness is SILENT
    INFO 04:49:12,933 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE, Target Coverage: 1000
    INFO 04:49:12,940 SAMDataSource$SAMReaders - Initializing SAMRecords in serial
    INFO 04:49:13,022 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.08
    INFO 04:49:16,986 IntervalUtils - Processing 100696230 bp from intervals
    INFO 04:49:17,094 GenomeAnalysisEngine - Preparing for traversal over 1 BAM files
    INFO 04:49:17,403 GenomeAnalysisEngine - Done preparing for traversal
    INFO 04:49:17,404 ProgressMeter - [INITIALIZATION COMPLETE; STARTING PROCESSING]
    INFO 04:49:17,404 ProgressMeter - | processed | time | per 1M | | total | remaining
    INFO 04:49:17,404 ProgressMeter - Location | active regions | elapsed | active regions | completed | runtime | runtime
    INFO 04:49:17,488 MuTect2 - Using global mismapping rate of 45 => -4.5 in log10 likelihood units
    WARN 04:49:18,392 PairHMMLikelihoodCalculationEngine$1 - Failed to load native library for VectorLoglessPairHMM - using Java implementation of LOGLESS_CACHI
    NG
    INFO 04:49:47,457 ProgressMeter - 1:1198932 5712089.0 30.0 s 5.0 s 0.1% 8.3 h 8.3 h
    INFO 04:50:17,468 ProgressMeter - 1:1342613 1.1725505E7 60.0 s 5.0 s 0.1% 11.3 h 11.2 h

    ...

    INFO 10:41:24,533 ProgressMeter - 2:165552411 1.05889674203E11 5.9 h 0.0 s 14.5% 40.3 h 34.5 h
    INFO 10:42:24,552 ProgressMeter - 2:166772053 1.0635087589E11 5.9 h 0.0 s 14.6% 40.3 h 34.4 h

    ERROR --
    ERROR stack trace

    java.lang.IllegalArgumentException: READ_MAX_LENGTH must be > 0 but got 0
    at org.broadinstitute.gatk.utils.pairhmm.PairHMM.initialize(PairHMM.java:126)
    at org.broadinstitute.gatk.utils.pairhmm.N2MemoryPairHMM.initialize(N2MemoryPairHMM.java:60)
    at org.broadinstitute.gatk.utils.pairhmm.LoglessPairHMM.initialize(LoglessPairHMM.java:66)
    at org.broadinstitute.gatk.utils.pairhmm.PairHMM.initialize(PairHMM.java:159)
    at org.broadinstitute.gatk.tools.walkers.haplotypecaller.PairHMMLikelihoodCalculationEngine.initializePairHMM(PairHMMLikelihoodCalculationEngine.java
    :267)
    at org.broadinstitute.gatk.tools.walkers.haplotypecaller.PairHMMLikelihoodCalculationEngine.computeReadLikelihoods(PairHMMLikelihoodCalculationEngine
    .java:282)
    at org.broadinstitute.gatk.tools.walkers.cancer.m2.MuTect2.map(MuTect2.java:644)
    at org.broadinstitute.gatk.tools.walkers.cancer.m2.MuTect2.map(MuTect2.java:171)
    at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:709)
    at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:705)
    at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:274)
    at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
    at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:274)
    at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:78)
    at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:98)
    at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:316)
    at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:123)
    at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:256)
    at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:158)
    at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:108)

    ERROR ------------------------------------------------------------------------------------------
    ERROR A GATK RUNTIME ERROR has occurred (version 3.7-0-gcfedb67):
    ERROR
    ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
    ERROR If not, please post the error message, with stack trace, to the GATK forum.
    ERROR Visit our website and forum for extensive documentation and answers to
    ERROR commonly asked questions https://software.broadinstitute.org/gatk
    ERROR
    ERROR MESSAGE: READ_MAX_LENGTH must be > 0 but got 0
    ERROR ------------------------------------------------------------------------------------------

    If I check the bam file for one of the reads which yield an error before with ValidateSam I get it but some flags have been changed

    samtools view /data/misc/mutect2/pon/1000g_bam_cleaned/HG00116.bam | grep SRR099965.100486269
    SRR099965.100486269 125 Y 59373560 0 5S7M1I63M = 59373560 0 AGACATCACGATGGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGT ######GC>HDFIGEFJDHHHGEIEDEICJJHABGCEBGIBJDKDAIIIHIJDJEJKDFIKDGGEHGCBFFFC>DC X0:i:1 X1:i:0 XC:i:71 MD:Z:0G2A0T65 RG:Z:SRR099965 AM:i:0 NM:i:4 SM:i:37 XN:i:7 XT:A:U
    SRR099965.100486269 189 Y 59373560 0 * = 59373560 0 GACCTGTGATCCATCGTGATGTCTTATTTAAGGGGAACGTGTGGGCTATTTAGGCTTTATGACCCTGAAGTAGGAA #?CFBECHCFEFBC>[email protected]> RG:Z:SRR099965

    Have you any idea of what could still cause the error in GATK ?

    Raphael

    Issue · Github
    by Sheila

    Issue Number
    2033
    State
    closed
    Last Updated
    Assignee
    Array
    Milestone
    Array
    Closed By
    chandrans
  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @RaphaelH
    Hi Raphael,

    I will have to check with the team. But, in the meantime, can you try to narrow down the BAM file to a small section to see where the error is occuring? For example, try running on each chromosome separately to see if at least some chromosomes are valid.

    Thanks,
    Sheila

  • RaphaelHRaphaelH BrusselsMember

    Hi Sheila,

    I ran each chromosome separately for the HG00116 sample and I get the error for every chromosome except 18 and 21 ... so it seems to occur nearly everywhere.
    I downloaded 80 exome samples from 1000G (CEU, GBR, IBS and TSI populations), and I get the problem with more than 70% of those bam files.

    Raphael

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @RaphaelH
    Hi Raphael,

    This may be a bug in MuTect2. The next version is coming out very soon, so I am thinking you may just have to wait and see if the issue is fixed in that version. You can also try out the alpha version in GATK4 here.

    -Sheila

  • RaphaelHRaphaelH BrusselsMember

    Hi Sheila,

    OK, I'll keep you informed if the problem solves itself in the next version and/or with GATK 4.

    Thanks again for you support !

    Raphael

  • SalvatoreSalvatore ItalyMember

    Hi
    Is the bug fixed in GATK4?
    Thanks
    Salvatore

    Issue · Github
    by shlee

    Issue Number
    2306
    State
    closed
    Last Updated
    Assignee
    Array
    Milestone
    Array
    Closed By
    chandrans
  • mark32309mark32309 New HavenMember

    Hi, I am also having this error using GATK 3.7-0-gcfedb67. I am trying to generate a PoN for WGS data. I will give GATK4.0 a try, but please let us know if there are any additional suggestions. Thanks for your help,

  • shleeshlee CambridgeMember, Broadie, Moderator

    Hi @mark32309,

    Yes, please do let us know if you still get the error with GATK4.

  • shleeshlee CambridgeMember, Broadie, Moderator

    @Salvatore, Sheila is away at a workshop and can follow up with you when she is back next week.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @Salvatore
    Hi,

    I have not run into this issue in GATK4. Please test it out and let us know if BAM files that pass ValidateSamFile throw the error in GATK4.

    Thanks,
    Sheila

  • I have similar problem, but it's MuTect2 in GATK v3.8
    Program Args:
    GATK.jar
    java -Xmx4G -jar /home/2.Package/GATK3.8/GenomeAnalysisTK.jar
    -T MuTect2
    -R Hg19All_chr.fa
    -I:tumor NGS17I257-NGS-MMH-3-1-5_S24.bam
    -L chr21
    -nct 20
    -o NGS17I257-NGS-MMH-3-1-5_S24.vcf
    -stand_call_conf 20
    --dontUseSoftClippedBases

    ERROR ------------------------------------------------------------------------------------------
    ERROR A GATK RUNTIME ERROR has occurred (version 3.8-0-ge9d806836):
    ERROR
    ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
    ERROR If not, please post the error message, with stack trace, to the GATK forum.
    ERROR Visit our website and forum for extensive documentation and answers to
    ERROR commonly asked questions https://software.broadinstitute.org/gatk
    ERROR
    ERROR MESSAGE: READ_MAX_LENGTH must be > 0 but got 0
    ERROR ------------------------------------------------------------------------------------------

    However this problem doesn't show in the gatk-4.beta.5
    Program Args:
    gatk-launch \
    --javaOptions "-Xmx4g" Mutect2 \
    -R $ref_fa \
    -I $file \
    -tumor $TumorName \
    -L $chr \
    -threads $core \
    -O $Out \
    -stand_call_conf $Q \
    --dontUseSoftClippedBases >./log/Somatic${chr}-$i.log 2>&1

    My test run of Mutect2 is still running now, I'll feedback when it's done

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @TWIsaac
    Hi,

    Thanks for letting us know.

    -Sheila

  • valerijaarhvalerijaarh Member
    edited October 2017

    Hello,
    could you tell please, what is in result? I have the same problem with mutect2 (version gatk 3.8) and for me it is really important to run it. What shall I do?

    ERROR stack trace

    java.lang.IllegalArgumentException: READ_MAX_LENGTH must be > 0 but got 0
    at org.broadinstitute.gatk.utils.pairhmm.PairHMM.initialize(PairHMM.java:105)
    at org.broadinstitute.gatk.utils.pairhmm.N2MemoryPairHMM.initialize(N2MemoryPairHMM.java:60)
    at org.broadinstitute.gatk.utils.pairhmm.LoglessPairHMM.initialize(LoglessPairHMM.java:66)
    at org.broadinstitute.gatk.utils.pairhmm.PairHMM.initialize(PairHMM.java:138)
    at org.broadinstitute.gatk.tools.walkers.haplotypecaller.PairHMMLikelihoodCalculationEngine.initializePairHMM(PairHMMLikelihoodCalculationEngine.java:276)
    at org.broadinstitute.gatk.tools.walkers.haplotypecaller.PairHMMLikelihoodCalculationEngine.computeReadLikelihoods(PairHMMLikelihoodCalculationEngine.java:291)
    at org.broadinstitute.gatk.tools.walkers.cancer.m2.MuTect2.map(MuTect2.java:648)
    at org.broadinstitute.gatk.tools.walkers.cancer.m2.MuTect2.map(MuTect2.java:175)
    at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:709)
    at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions$TraverseActiveRegionMap.apply(TraverseActiveRegions.java:705)
    at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.executeSingleThreaded(NanoScheduler.java:274)
    at org.broadinstitute.gatk.utils.nanoScheduler.NanoScheduler.execute(NanoScheduler.java:245)
    at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:274)
    at org.broadinstitute.gatk.engine.traversals.TraverseActiveRegions.traverse(TraverseActiveRegions.java:78)
    at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:98)
    at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:323)
    at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:123)
    at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:256)
    at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:158)
    at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:108)

    ERROR ------------------------------------------------------------------------------------------
    ERROR A GATK RUNTIME ERROR has occurred (version 3.8-0-ge9d806836):
    ERROR
    ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
    ERROR If not, please post the error message, with stack trace, to the GATK forum.
    ERROR Visit our website and forum for extensive documentation and answers to
    ERROR commonly asked questions https://software.broadinstitute.org/gatk
    ERROR
    ERROR MESSAGE: READ_MAX_LENGTH must be > 0 but got 0
    ERROR ------------------------------------------------------------------------------------------
  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @valerijaarh
    Hi,

    Have you validated your BAM file? Can you confirm this occurs with GATK4 beta 6?

    Thanks,
    Sheila

  • JulsJuls Member
    edited November 2017

    Hi,
    I also ran into this issue with 3.8. I also need it quite urgently.
    I ran the HC on the same bam file, which ran through...
    Is it fixed with version 4?
    Thank you!

  • JulsJuls Member
    edited November 2017

    On that note, I have run the recalibration on 3.8 - is it ok to use the Mutect2 4 on top of that?
    If it is indeed a bug, it would be great if it could be fixed with 3.8 as well...
    Thanks!

  • I have now run cleanSam on the bam file before feeding it into Mutect2 3.8 and it still threw the error.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @Juls
    Hi,

    What happens if you run ValidateSamFile on your BAM file?

    Can you check GATK4 beta 6? Another user says the issue does not occur in GATK4.

    -Sheila

  • I haven't run ValidateSamFile on the BAM file yet - just cleanSam and the error still occurred with 3.8. It's currently running with GATK4 - it's not yet finished but it ran over the problematic site - so I thinks it's fine. However, I have run everything else on 3.8.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @Juls
    Hi,

    I think that should be fine, as we are recommending Mutect2 in GATK4 over MuTect2 in GATK3. The pre-processing steps should not have changed much from GATK3 to GATK4 (at least not in the algorithms), so you should be okay.

    -Sheila

  • JulsJuls Member

    I got this error now also with GATK 4 ... I am using GATK/4.0b//gatk-package-4.beta.5-local.jar

    02:10:50.070 INFO PairHMM - Total compute time in PairHMM computeLogLikelihoods() : 50651.674885637
    02:10:50.070 INFO Mutect2 - Shutting down engine
    [February 4, 2018 2:10:50 AM CET] org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2 done. Elapsed time: 2,171.97 minutes.
    Runtime.totalMemory()=23542628352
    java.lang.IllegalArgumentException: readMaxLength must be > 0 but got 0

    Is there a bug fix yet?

  • dcampodcampo Los AngelesMember

    @Sheila said:
    @Juls
    Hi,

    I think that should be fine, as we are recommending Mutect2 in GATK4 over MuTect2 in GATK3. The pre-processing steps should not have changed much from GATK3 to GATK4 (at least not in the algorithms), so you should be okay.

    -Sheila

    Hi Sheila,

    Following up on this, is it OK to use a PoN created with MuTect2-GATK3 for somatic variant calling with Mutect2-GATK4?
    Thing is, my entire pipeline for somatic calling with RNAseq is based on STAR-GATK3, but when running MuTect2 I got the error mentioned above (READ_MAX_LENGTH must be > 0 but got 0) in about half of the bam files. I tried then running just the last step (i.e. Mutect2) with GATK4, and it worked. But I used the PoN I had from GATK3, so I am wondering if that's OK, or I need to re-do the PoN with GATK4.

    Thanks!

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @Juls
    Hi,

    Yes, there should be a fix in the very latest version of GATK4 (4.0.1.2).

    -Sheila

  • SheilaSheila Broad InstituteMember, Broadie, Moderator
    edited February 12

    @dcampo
    Hi,

    You should be fine using a PoN created with GATK3, as I don't think much has changed has changed in the actual algorithms (just the tools/workflow).

    -Sheila

    EDIT: Soo Hee pointed out that if you can spare the compute, it would be best to use GATK4 to create the PoN to keep consistency throughout your analysis. I only said you can use the GATK3 PoN since you already had it :smile:

    Post edited by Sheila on
  • JulsJuls Member

    @Sheila
    I just got the error again with the current version (gatk-4.0.5.1):

    01:33:32.792 INFO  PairHMM - Total compute time in PairHMM computeLogLikelihoods() : 116946.11351382501
    01:33:32.793 INFO  SmithWatermanAligner - Total compute time in java Smith-Waterman : 43239.15 sec
    01:33:32.794 INFO  Mutect2 - Shutting down engine
    [June 28, 2018 1:33:32 AM CEST] org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2 done. Elapsed time: 3,502.69 minutes.
    Runtime.totalMemory()=20542128128
    java.lang.IllegalArgumentException: readMaxLength must be > 0 but got 0
    
  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @Juls
    Hi,

    What happens when you run ValidateSamFile?

    -Sheila

Sign In or Register to comment.