This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error : Duplicate allele added to VariantContext GATK

Hello,

I download GnomAD vcf files in GRCh38 (hg19 remap). I want to convert this vcf in a table so i try to use VariantsToTable. But i have this error : The provided VCF file is malformed at approximately line number 10609: Duplicate allele added to VariantContext: C

line 10609 :

10 3101451 rs4881080 C C,T,G 191085017.71 PASS AC=237624,66,1;AF=9.99663e-01,2.77656e-04,4.20691e-06

I agree C is in REF and ALT colum but we can use VariantsToTable without check the integrity of vcf files?

Thanks,

Steven

gatk variantstotable malformed vcf

2 answers

can use VariantsToTable without check the integrity of vcf files?

not GATK uses the htsjdk library and there is no 'boolean flag' to bypass the validation:

https://github.com/samtools/htsjdk/blob/master/src/main/java/htsjdk/variant/variantcontext/VariantContext.java#L1490

if it's not a problem for your analysis, you could use awk to replace all the REF bases to 'N' (?)

Thank you, but I can not change all REF to N. I need REF to annotate deletions

I am getting the error as ERROR MESSAGE: The provided VCF file is malformed at approximately line number 271180: Duplicate allele added to VariantContext: AATTTATATATATATATATATATATATATATATATATATATATATATATATATATATATATAAATT" GATK combine variant. Is it ok to delete the perticulat line from vcf file. I have obtained vcf file from samtools.

Perhaps of interest: I ran into this issue when trying to run SnpSift on the vcf to add additional annotations to a vcf derived from the gnomad vcf. SnpSift throws an exception when trying to dereference a null pointer. I traced down this behavior to the fact that when the snpeff VcfEntry class encounters a case where the alt is the same as a reference, it stores the alt as null. (The SnpSift code can be found here.) My stack trace with this failure looks like:

java.lang.NullPointerException
    at org.snpeff.vcf.VcfEntry.getInfo(VcfEntry.java:634)
    at org.snpsift.annotate.AnnotateVcfDb.findDbInfoAlt(AnnotateVcfDb.java:307)
    at org.snpsift.annotate.AnnotateVcfDb.findDbInfo(AnnotateVcfDb.java:252)
    at org.snpsift.annotate.AnnotateVcfDb.annotate(AnnotateVcfDb.java:100)
    at org.snpsift.SnpSiftCmdAnnotate.annotate(SnpSiftCmdAnnotate.java:128)
    at org.snpsift.SnpSiftCmdAnnotate.annotate(SnpSiftCmdAnnotate.java:90)
    at org.snpsift.SnpSiftCmdAnnotate.run(SnpSiftCmdAnnotate.java:410)
    at org.snpsift.SnpSiftCmdAnnotate.run(SnpSiftCmdAnnotate.java:397)
    at org.snpsift.SnpSift.run(SnpSift.java:588)
    at org.snpsift.SnpSift.main(SnpSift.java:76)

Log in to answer this question.