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

CollectVariantCallingMetrics (Picard) Follow

1 comment

  • Avatar
    Saeed Farajzadeh Valilou


    I am trying to get metrics table for a GVCF file using CollectVariantCallingMetrics and I am getting the following error message at the end of run and does not generate metrics table. I was wondering how can I solve this issue.

    I did UpdateVcfSequenceDictionary for dbsnp VCF file and updated the dbsnp contigs based on hg38 reference genome. In the dbsnp VCF header I see the ##contig lines. However, I still have the error in CollectVariantCallingMetrics. Also, chromosome notations in dbSNP VCF and my GVCF are the same (i.e. "chr1, chr2, ...").

    INFO    2024-03-01 13:12:55     CollectVariantCallingMetrics    Read    60,600,000 variants.  Elapsed time: 00:03:20s.  Time for last 100,000:    0s.  Last read position: chrY:14,159,655
    [Fri Mar 01 13:12:55 EST 2024] picard.vcf.CollectVariantCallingMetrics done. Elapsed time: 3.35 minutes.
    To get help, see
    java.lang.NullPointerException: Cannot invoke "htsjdk.samtools.SAMSequenceRecord.getSequenceLength()" because the return value of "htsjdk.samtools.SAMSequenceDictionary.getSequence(String)" is null
            at picard.util.DbSnpBitSetUtil.loadVcf(
            at picard.util.DbSnpBitSetUtil.createSnpAndIndelBitSets(
            at picard.vcf.CollectVariantCallingMetrics.doWork(
            at picard.cmdline.CommandLineProgram.instanceMain(
            at org.broadinstitute.hellbender.cmdline.PicardCommandLineProgramExecutor.instanceMain(
            at org.broadinstitute.hellbender.Main.runCommandLineProgram(
            at org.broadinstitute.hellbender.Main.mainEntry(
            at org.broadinstitute.hellbender.Main.main(

    I use the followind command: 

    /home/gatk- CollectVariantCallingMetrics \
    --DBSNP /home/Homo_sapiens_assembly38.dbsnp138_Updated_Dict.vcf \
    --INPUT /home/sample.g.vcf.gz \
    --OUTPUT /home/CollectVariantCallingMetrics/sample.table \
    --GVCF_INPUT true
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk