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

A USER ERROR has occurred: Bad input: Sample R-HT77.merged.sorted.bam is not in BAM header: [R-HT72, R-HT72-P2, R-HT72-at-diagnosis-FFPE, R-HT72-p0, R-HT72-p1, R-HT77, R-HT77-P3, R-HT77-P3-Cell-line, R-HT77-p0, R-HT77-p1, R-HT77-p2]

0

7 comments

  • Avatar
    Genevieve Brandt (she/her)

    Hi Asha, GATK is particular about read groups and consistent naming, so that could explain why you were able to run these BAM files with other tools. This issue does not seem to be a problem though with the BAM files, but with the consistency of the naming. 

    Check out our documentation on read groups: https://gatk.broadinstitute.org/hc/en-us/articles/360035890671-Read-groups

    It looks like Mutect2 is looking for the sample name R-HT77.merged.sorted which is not appearing in the BAM header.

    1
    Comment actions Permalink
  • Avatar
    Asha

    Hi Genevieve,

    Thank you for your response.

    I realized that the BAM filenames and the headers did not match so, I fixed it. However,  I still get the same error.

    The BAM file/s I'm using is a merged one. Meaning, it resulted from multiple BAMs which came from multiple FASTQs with different read groups, for a single sample:

    samtools view -H R-HT74_DEDUPED_REALIGNED.bam | grep '@RG'

    @RG ID:H52Y5DSXX SM:R-HT74 PL:ILLUMINA

    @RG ID:H52Y5DSXX-6DCD294F SM:R-HT74 PL:ILLUMINA

    @RG ID:H52Y5DSXX-1DD2D000 SM:R-HT74 PL:ILLUMINA

    @RG ID:H52Y5DSXX-3987063F SM:R-HT74 PL:ILLUMINA

    @RG ID:HF2C7DMXX SM:R-HT74 PL:ILLUMINA

    @RG ID:HF2C7DMXX-3B162E1B SM:R-HT74 PL:ILLUMINA

     

    Here's my command:

    gatk Mutect2 -R reference/hg38.fa -I R-HT74-p2_DEDUPED_REALIGNED.bam -I R-HT74-p0_DEDUPED_REALIGNED.bam -I R-HT74_DEDUPED_REALIGNED.bam -normal R-HT74_DEDUPED_REALIGNED.bam --germline-resource af-only-gnomad.hg38.vcf.gz --panel-of-normals M2PoN_4.0_WGS_for_public.vcf -O HT74-somatic.vcf.gz

     

    Error:

    Using GATK jar /geode2/soft/hps/rhel7/gatk/4.1.7.0/gatk-package-4.1.7.0-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 /geode2/soft/hps/rhel7/gatk/4.1.7.0/gatk-package-4.1.7.0-local.jar Mutect2 -R ../../../reference/hg38.fa -I R-HT74-p2_DEDUPED_REALIGNED.bam -I R-HT74-p0_DEDUPED_REALIGNED.bam -I R-HT74_DEDUPED_REALIGNED.bam -normal R-HT74_DEDUPED_REALIGNED.bam --germline-resource af-only-gnomad.hg38.vcf.gz --panel-of-normals M2PoN_4.0_WGS_for_public.vcf -O HT74-somatic.vcf.gz

    16:33:15.606 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/geode2/soft/hps/rhel7/gatk/4.1.7.0/gatk-package-4.1.7.0-local.jar!/com/intel/gkl/native/libgkl_compression.so

    Oct 08, 2020 4:33:15 PM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine

    INFO: Failed to detect whether we are running on Google Compute Engine.

    16:33:15.833 INFO  Mutect2 - ------------------------------------------------------------

    16:33:15.833 INFO  Mutect2 - The Genome Analysis Toolkit (GATK) v4.1.7.0

    16:33:15.833 INFO  Mutect2 - For support and documentation go to https://software.broadinstitute.org/gatk/

    16:33:15.833 INFO  Mutect2 - Executing as asjannu@som9.carbonate.uits.iu.edu on Linux v3.10.0-1127.19.1.el7.x86_64 amd64

    16:33:15.833 INFO  Mutect2 - Java runtime: OpenJDK 64-Bit Server VM v1.8.0_262-b10

    16:33:15.834 INFO  Mutect2 - Start Date/Time: October 8, 2020 4:33:15 PM EDT

    16:33:15.834 INFO  Mutect2 - ------------------------------------------------------------

    16:33:15.834 INFO  Mutect2 - ------------------------------------------------------------

    16:33:15.834 INFO  Mutect2 - HTSJDK Version: 2.21.2

    16:33:15.834 INFO  Mutect2 - Picard Version: 2.21.9

    16:33:15.834 INFO  Mutect2 - HTSJDK Defaults.COMPRESSION_LEVEL : 2

    16:33:15.834 INFO  Mutect2 - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false

    16:33:15.834 INFO  Mutect2 - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true

    16:33:15.834 INFO  Mutect2 - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false

    16:33:15.834 INFO  Mutect2 - Deflater: IntelDeflater

    16:33:15.834 INFO  Mutect2 - Inflater: IntelInflater

    16:33:15.834 INFO  Mutect2 - GCS max retries/reopens: 20

    16:33:15.835 INFO  Mutect2 - Requester pays: disabled

    16:33:15.835 INFO  Mutect2 - Initializing engine

    16:33:16.752 INFO  FeatureManager - Using codec VCFCodec to read file file:///N/project/phi_nygcpdx/PON/new/M2PoN_4.0_WGS_for_public.vcf

    16:33:17.071 INFO  FeatureManager - Using codec VCFCodec to read file file:///N/project/phi_nygcpdx/PON/new/af-only-gnomad.hg38.vcf.gz

    16:33:17.437 INFO  Mutect2 - Done initializing engine

    16:33:17.455 INFO  Mutect2 - Shutting down engine

    [October 8, 2020 4:33:17 PM EDT] org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2 done. Elapsed time: 0.03 minutes.

    Runtime.totalMemory()=2052587520

    ***********************************************************************

     

    A USER ERROR has occurred: Bad input: Sample /N/project/phi_nygcpdx/WGS_results/Sentieon_VariantCalling/align/DEDUP_REALIGN/R-HT74_DEDUPED_REALIGNED.bam is not in BAM header: [R-HT74, R-HT74-p0, R-HT74-p2]

     

    ***********************************************************************

     

     

    Where am I doing wrong? Any suggestions would be greatly appreciated.

     

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Genevieve Brandt (she/her)

    Please check your sample with our tool ValidateSamFile and follow this tutorial.

    0
    Comment actions Permalink
  • Avatar
    Hongwei Tang

    Those are not true and incorrect!  

    Reason:

    Single normal sample ran in gatk Mutect2, but not for pair-mode as:

    gatk Mutect2 \
    -R reference.fa \
    -I tumor.bam \
    -I normal.bam \
    -normal normal_sample_name \
    -O somatic.vcf.gz

    So the normal sample is okay regardless of error message (misleading!!!)

    So the solution is remove the term " -normal ", then it ran. 

    Or try to use other good somatic calling tools!

    0
    Comment actions Permalink
  • Avatar
    Pamela Bretscher

    Hi Hongwei Tang,

    Thank you for your response on this thread. I'm not sure what you mean by the misleading error message as I believe the above user's issue was caused by incompatible headers in their bam files. However, I'm glad to hear that removing the "-normal" term was successful in your case. Please let me know if you have any questions or need help with anything else.

    Kind regards,

    Pamela

    0
    Comment actions Permalink
  • Avatar
    Asha

    Thank you, Pamela! 

    May be I should post the right command that worked for me, after validating my BAM files:

     

    gatk Mutect2 -R hg38.fa -I HT72-p0_DEDUPED_REALIGNED.bam -I HT72-p1_DEDUPED_REALIGNED.bam -I HT72-p2_DEDUPED_REALIGNED.bam -I HT77-p0_DEDUPED_REALIGNED.bam -I HT77-p1_DEDUPED_REALIGNED.bam -I HT77-p2_DEDUPED_REALIGNED.bam -I HT77-p3_DEDUPED_REALIGNED.bam -I HT77-p3-cellline.merge_DEDUPED_REALIGNED.bam -I HT72-FFPE_DEDUPED_REALIGNED.bam -I HT77-germline_DEDUPED_REALIGNED.bam -I HT72-germline_DEDUPED_REALIGNED.bam -normal R-HT72 -normal R-HT77 --germline-resource af-only-gnomad.hg38.vcf.gz --panel-of-normals M2PoN_4.0_WGS_for_public.vcf -L chr14 -O chr14_HT72-77_qsubtest_somatic.vcf.gz

     

    The mistake in my previous code was that I mentioned the normal sample filename instead of just using "sample name" itself at '-normal' option.

    Thanks again, everyone for your inputs!

    0
    Comment actions Permalink
  • Avatar
    Pamela Bretscher

    Hi Asha,

    Thank you for the clarification and for providing the solution that worked for you as it will likely be helpful to other users!

    Kind regards,

    Pamela

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk