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

GatherVcfs ( version 4.1.8.1 ) with INPUT.java.lang.NullPointerException

0

3 comments

  • Avatar
    Genevieve Brandt (she/her)

    Hi QIANxiaobo, could you check if your VCF files are properly sorted? We have a tool, SortVcf, that does this. Also, what do you mean about changing the header? What command did you use?

    0
    Comment actions Permalink
  • Avatar
    Yangyxt

    Dear Brandt,

    I ran into the same issue and then trying to use SortVcf to sort every input before using GatherVcfs to concat them.

    Then I hit this error ( I added the java option -DGATK_STACKTRACE_ON_USER_EXCEPTION=true ):

    java.lang.NullPointerException
    at htsjdk.variant.variantcontext.VariantContextComparator.compare(VariantContextComparator.java:87)
    at htsjdk.variant.variantcontext.VariantContextComparator.compare(VariantContextComparator.java:22)
    at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
    at java.base/java.util.TimSort.sort(TimSort.java:234)
    at java.base/java.util.ArraysParallelSortHelpers$FJObject$Sorter.compute(ArraysParallelSortHelpers.java:145)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408)
    at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736)
    at java.base/java.util.Arrays.parallelSort(Arrays.java:1183)
    at htsjdk.samtools.util.SortingCollection.spillToDisk(SortingCollection.java:247)
    at htsjdk.samtools.util.SortingCollection.add(SortingCollection.java:182)
    at picard.vcf.SortVcf.sortInputs(SortVcf.java:165)
    at picard.vcf.SortVcf.doWork(SortVcf.java:98)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:305)
    at org.broadinstitute.hellbender.cmdline.PicardCommandLineProgramExecutor.instanceMain(PicardCommandLineProgramExecutor.java:25)
    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)
     
    The GATK version I used is: 4.1.8.1
     
    What could be wrong with my vcf file ?
     
    0
    Comment actions Permalink
  • Avatar
    Genevieve Brandt (she/her)

    Hi Yangyxt,

    What are you trying to combine here? GatherVcfs only works on VCFs that have exactly the same set of samples and totally discrete sets of loci. 

    You can check your VCFs for any other issues with ValidateVariants.

    Best,

    Genevieve

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk