Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

Error in SortVcf

I have been going through this problem. Is this very common and is there any solution to this error.

Exception in thread "main" java.lang.IllegalStateException: Key . found in VariantContext field INFO at 10:153837 but this key isn't defined in the VCFHeader. We require all VCFs to have complete VCF headers by default.
at htsjdk.variant.vcf.VCFEncoder.fieldIsMissingFromHeaderError(VCFEncoder.java:173)
at htsjdk.variant.vcf.VCFEncoder.encode(VCFEncoder.java:112)
at htsjdk.variant.variantcontext.writer.VCFWriter.add(VCFWriter.java:224)
at picard.vcf.SortVcf.writeSortedOutput(SortVcf.java:187)
at picard.vcf.SortVcf.doWork(SortVcf.java:105)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:268)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)

Tagged:

Answers

  • SheilaSheila Broad InstituteMember, Broadie admin

    @abiskargyawali
    Hi,

    Have a look at this thread. Are you using the latest version of GATK3?

    Thanks,
    Sheila

  • Hi Sheila
    I have been using GATK3. Here is what i did

    java -Xmx100g -jar picard.jar SortVcf
    I=Input.vcf
    O=sorted.vcf
    SEQUENCE_DICTIONARY=Zea_mays.AGPv3.28.dna.genome.dict

    This is the error that i got

    Exception in thread "main" java.lang.IllegalStateException: Key . found in VariantContext field INFO at 10:153837 but this key isn't defined in the VCFHeader. We require all VCFs to have complete VCF headers by default.
    at htsjdk.variant.vcf.VCFEncoder.fieldIsMissingFromHeaderError(VCFEncoder.java:173)
    at htsjdk.variant.vcf.VCFEncoder.encode(VCFEncoder.java:112)
    at htsjdk.variant.variantcontext.writer.VCFWriter.add(VCFWriter.java:224)
    at picard.vcf.SortVcf.writeSortedOutput(SortVcf.java:187)
    at picard.vcf.SortVcf.doWork(SortVcf.java:105)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:268)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)

    Looking at the position 10:153837, i did not find any thing different from other sites.

    fileformat=VCFv4.0

    Tassel=<ID=GenotypeTable,Version=5,Description="Reference allele is not known. The major allele was used as reference allele">

    FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">

    FORMAT=<ID=AD,Number=.,Type=Integer,Description="Allelic depths for the reference and alternate alleles in the order listed">

    FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth (only filtered reads used for calling)">

    FORMAT=<ID=GQ,Number=1,Type=Float,Description="Genotype Quality">

    FORMAT=<ID=PL,Number=.,Type=Float,Description="Normalized, Phred-scaled likelihoods for AA,AB,BB genotypes where A=ref and B=alt; not applicable if site is not biallelic">

    INFO=<ID=NS,Number=1,Type=Integer,Description="Number of Samples With Data">

    INFO=<ID=DP,Number=1,Type=Integer,Description="Total Depth">

    INFO=<ID=AF,Number=.,Type=Float,Description="Allele Frequency">

    CHROM POS ID REF ALT QUAL FILTER INFO FORMAT

    10 153837 S10_153837 G A . PASS .;DP=3672 GT:AD:DP:GQ:PL

    I dont know what is going on over here. Any help would be appreciated.

    Thanks
    Abi

  • SheilaSheila Broad InstituteMember, Broadie admin

    @abiskargyawali
    Hi Abi,

    How did you produce the input VCF? Did you use HaplotypeCaller? If so, do you still get the error if you use version 3.8?

    Thanks,
    Sheila

Sign In or Register to comment.