This is a test version of Biostars. For the public version, visit https://www.biostars.org.
gatk SelectVariants is giving duplicate allele error while extracting SNPs out of vcf file

I am trying to extract snps out of merged vcf file using gatk SelectVariants command but it is giving following error:

htsjdk.tribble.TribbleException: The provided VCF file is malformed at approximately **line number 73**: Duplicate allele added to VariantContext: G, for input source: merged.vcf

This is line 7 of vcf file:

enter image description here

Kindly provide your valuable suggestions to resolve this error.

Many thanks

snp variant-calling gatk

I observed that my reference genomic fasta file contains both lower case and upper case nucleotides. Do I need to convert lower case nucleotides into upper (all nucleotides in one case) before calling variants? I performed variant calling through bbtool callvariants.sh.

1 answer

This is an error in your input vcf file. The REF allele MUST be different from the ALT allele.

Yes Pierre there is lower case g in REF and upper case G in ALT field. My question is that why variant caller is calling opposite case allele as variant when its not and how can I overcome it? I used callvariants.sh for variant calling.

Thanks

Not only opposite case but same case nucleotides are also present in vcf fle.

enter image description here

again, it's a problem with the variant caller, which is ?

Its bbmap tool callvariants.sh. I think you are right because I did not get such error when I called variants through freebayes.

Log in to answer this question.