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 cannot generate stats file and f1r2.tar.gz file

Answered
0

4 comments

  • Avatar
    Anthony DiCi

    Hi Yi Huang,

    Thank you for writing to the GATK forum! I hope that we can help you sort this out.

    I appreciate that you have included the GATK version and the exact command you used. 

    To accurately identify the issue you are encountering, I'll need to see the entire program log/stack trace. Please include all error messages/exceptions so we may best diagnose the issue and determine the next steps.

    I look forward to hearing from you! If any other questions arise in the meantime, please do not hesitate to include them in your response.

    Best,
    Anthony

    0
    Comment actions Permalink
  • Avatar
    Yi Huang

    My entire program file:

    15:46:33.133 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/home/huangyi/anaconda/share/gatk4-4.2.6.1-1/gatk-package-4.2.6.1-local.jar!/com/intel/gkl/native/libgkl_compression.so
    15:46:38.580 INFO  Mutect2 - ------------------------------------------------------------
    15:46:38.580 INFO  Mutect2 - The Genome Analysis Toolkit (GATK) v4.2.6.1
    15:46:38.580 INFO  Mutect2 - For support and documentation go to https://software.broadinstitute.org/gatk/
    15:46:38.580 INFO  Mutect2 - Executing as huangyi@localhost.localdomain on Linux v3.10.0-1160.el7.x86_64 amd64
    15:46:38.580 INFO  Mutect2 - Java runtime: OpenJDK 64-Bit Server VM v1.8.0_121-b15
    15:46:38.581 INFO  Mutect2 - Start Date/Time: 2022年8月26日 下午03时46分33秒
    15:46:38.581 INFO  Mutect2 - ------------------------------------------------------------
    15:46:38.581 INFO  Mutect2 - ------------------------------------------------------------
    15:46:38.581 INFO  Mutect2 - HTSJDK Version: 2.24.1
    15:46:38.581 INFO  Mutect2 - Picard Version: 2.27.1
    15:46:38.581 INFO  Mutect2 - Built for Spark Version: 2.4.5
    15:46:38.581 INFO  Mutect2 - HTSJDK Defaults.COMPRESSION_LEVEL : 2
    15:46:38.581 INFO  Mutect2 - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
    15:46:38.581 INFO  Mutect2 - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
    15:46:38.581 INFO  Mutect2 - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
    15:46:38.581 INFO  Mutect2 - Deflater: IntelDeflater
    15:46:38.581 INFO  Mutect2 - Inflater: IntelInflater
    15:46:38.581 INFO  Mutect2 - GCS max retries/reopens: 20
    15:46:38.582 INFO  Mutect2 - Requester pays: disabled
    15:46:38.582 INFO  Mutect2 - Initializing engine
    WARNING: BAM index file /home/huangyi/data/recal/W00139_2_recal.bai is older than BAM /home/huangyi/data/recal/W00139_2_recal.bam
    15:46:38.953 INFO  FeatureManager - Using codec VCFCodec to read file file:///home/huangyi/data/somatic-b37_Mutect2-exome-panel.vcf
    15:46:39.026 INFO  FeatureManager - Using codec VCFCodec to read file file:///home/huangyi/data/somatic-b37_af-only-gnomad.raw.sites.vcf
    15:46:40.232 WARN  IndexUtils - Feature file "file:///home/huangyi/data/somatic-b37_af-only-gnomad.raw.sites.vcf" appears to contain no sequence dictionary. Attempting to retrieve a sequence dictionary from the associated index file
    15:46:41.231 WARN  IndexUtils - Index file /home/huangyi/data/somatic-b37_af-only-gnomad.raw.sites.vcf.idx is out of date (index older than input file). Use IndexFeatureFile to make a new index.
    15:46:41.255 INFO  Mutect2 - Done initializing engine
    15:46:41.278 INFO  NativeLibraryLoader - Loading libgkl_utils.so from jar:file:/home/huangyi/anaconda/share/gatk4-4.2.6.1-1/gatk-package-4.2.6.1-local.jar!/com/intel/gkl/native/libgkl_utils.so
    15:46:41.279 INFO  NativeLibraryLoader - Loading libgkl_pairhmm_omp.so from jar:file:/home/huangyi/anaconda/share/gatk4-4.2.6.1-1/gatk-package-4.2.6.1-local.jar!/com/intel/gkl/native/libgkl_pairhmm_omp.so
    15:46:41.309 INFO  IntelPairHmm - Using CPU-supported AVX-512 instructions
    15:46:41.309 INFO  IntelPairHmm - Flush-to-zero (FTZ) is enabled when running PairHMM
    15:46:41.310 INFO  IntelPairHmm - Available threads: 72
    15:46:41.310 INFO  IntelPairHmm - Requested threads: 4
    15:46:41.310 INFO  PairHMM - Using the OpenMP multi-threaded AVX-accelerated native PairHMM implementation
    15:46:41.373 INFO  ProgressMeter - Starting traversal
    15:46:41.374 INFO  ProgressMeter -        Current Locus  Elapsed Minutes     Regions Processed   Regions/Minute
    15:46:51.421 INFO  ProgressMeter -             1:812957              0.2                  3140          18753.7
    15:47:02.204 INFO  ProgressMeter -             1:897406              0.3                  3620          10427.3
    15:47:12.467 INFO  ProgressMeter -             1:951245              0.5                  3910           7545.1
    15:47:23.035 INFO  ProgressMeter -             1:987798              0.7                  4100           5904.8
    15:47:33.099 INFO  ProgressMeter -            1:1119170              0.9                  4750           5509.9
    15:47:43.279 INFO  ProgressMeter -            1:1201347              1.0                  5230           5069.1
    15:47:55.072 INFO  ProgressMeter -            1:1250234              1.2                  5480           4461.5
    15:48:05.846 INFO  ProgressMeter -            1:1278995              1.4                  5610           3984.8
    15:48:16.177 INFO  ProgressMeter -            1:1374120              1.6                  6100           3860.6
    15:48:26.881 INFO  ProgressMeter -            1:1445416              1.8                  6470           3679.4
    15:48:38.241 INFO  ProgressMeter -            1:1563451              1.9                  7090           3640.0

    06:54:13.481 INFO  VectorLoglessPairHMM - Time spent in setup for JNI call : 32.203864026000005
    06:54:13.481 INFO  PairHMM - Total compute time in PairHMM computeLogLikelihoods() : 3106.289570751
    06:54:13.482 INFO  SmithWatermanAligner - Total compute time in java Smith-Waterman : 9328.66 sec
    06:54:13.483 INFO  Mutect2 - Shutting down engine
    [2022年8月27日 上午06时54分13秒] org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2 done. Elapsed time: 907.67 minutes.
    Runtime.totalMemory()=14369685504
    java.nio.BufferUnderflowException
            at java.nio.Buffer.nextGetIndex(Buffer.java:506)
            at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:681)
            at htsjdk.samtools.MemoryMappedFileBuffer.readInteger(MemoryMappedFileBuffer.java:39)
            at htsjdk.samtools.AbstractBAMFileIndex.readInteger(AbstractBAMFileIndex.java:443)
            at htsjdk.samtools.AbstractBAMFileIndex.query(AbstractBAMFileIndex.java:272)
            at htsjdk.samtools.DiskBasedBAMFileIndex.getSpanOverlapping(DiskBasedBAMFileIndex.java:61)
            at htsjdk.samtools.BAMFileReader.getFileSpan(BAMFileReader.java:914)
            at htsjdk.samtools.BAMFileReader.createIndexIterator(BAMFileReader.java:931)
            at htsjdk.samtools.BAMFileReader.query(BAMFileReader.java:612)
            at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.query(SamReader.java:550)
            at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.queryOverlapping(SamReader.java:417)
            at org.broadinstitute.hellbender.utils.iterators.SamReaderQueryingIterator.loadNextIterator(SamReaderQueryingIterator.java:130)
            at org.broadinstitute.hellbender.utils.iterators.SamReaderQueryingIterator.<init>(SamReaderQueryingIterator.java:69)
            at org.broadinstitute.hellbender.engine.ReadsPathDataSource.prepareIteratorsForTraversal(ReadsPathDataSource.java:412)
            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)
    Using GATK jar /home/huangyi/anaconda/share/gatk4-4.2.6.1-1/gatk-package-4.2.6.1-local.jar
    Running:
        java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -jar /home/huangyi/anaconda/share/gatk4-4.2.6.1-1/
    gatk-package-4.2.6.1-local.jar Mutect2 -R /home/huangyi/data/ref/human_g1k_v37.fasta -I /home/huangyi/data/recal/W00139_recal.bam -I /home/huangyi/data/recal/W00139_2_recal.bam -I /home/huangyi/data/blood_bams/bqsr
    /dedup/W00139_b.recal.bam -normal W00139_b --germline-resource /home/huangyi/data/somatic-b37_af-only-gnomad.raw.sites.vcf --panel-of-normals /home/huangyi/data/somatic-b37_Mutect2-exome-panel.vcf --f1r2-tar-gz f1r
    2.tar.gz -O /home/huangyi/data/somatic.vcf.gz

    0
    Comment actions Permalink
  • Avatar
    Anthony DiCi

    Hi Yi Huang,

    Thank you for providing your program log! I appreciate your patience while we worked on this.

    It appears that your code is throwing a BufferUnderflowException. This occurs when the program tries to query the index for one of your bam files. The error therefore implies a problem with your bam file indices. I also see a warning in your program log substantiating this:

    WARNING: BAM index file /home/huangyi/data/recal/W00139_2_recal.bai is older than BAM /home/huangyi/data/recal/W00139_2_recal.bam

    The above suggests that your bam index is out of date. You should re-index all your bam files using --samtoolsindex and try again.

    It appears that your VCF indices are also out of date by this line in your program log:

    IndexUtils - Index file /home/huangyi/data/somatic-b37_af-only-gnomad.raw.sites.vcf.idx is out of date (index older than input file). Use IndexFeatureFile to make a new index.

    You can use GATK’s IndexFeatureFile tool to re-index your VCFs.

    I hope this helps! Please let me know if you have had success after implementing these changes. Please do not hesitate to reach out if you have any other questions in the meantime.

    Best,
    Anthony

    0
    Comment actions Permalink
  • Avatar
    Anthony DiCi

    Hi Yi Huang,

    We haven't heard from you in a while so we're going to close out this ticket. If you still require assistance, simply respond to this email and we'll be happy to pick up where we left off!

    Kind regards,

    Anthony​

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk