This is a test version of Biostars. For the public version, visit https://www.biostars.org.
combineVariants error for merging two vcf files

Hi I have 2 vcf files vcf1 from WGS data vcf2 from genotype data I am trying to merge these two files using combinevariants

GenomeAnalysisTK_jar=gatk/3.5-0/GenomeAnalysisTK.jar
java -jar $GenomeAnalysisTK_jar -T CombineVariants -R $REF --variant $vcf1 --variant $vcf2 -o $outputfile

I am getting this error

MESSAGE: The provided variant file(s) have inconsistent references for the same position(s) at 21:11098723, T* vs. A*

ERROR ------------------------------------------------------------------------------------------

when i grep these position in vcf1

21 11098723 . T C

21 11098724 . G A

vcf2

21 11098723 exm1562347 A G

how can i fix this error?

snp gatk combinevariants

you cannot have two differents alleles at the same position at 11098723. It looks more like a bug in your upstream worklow (working with two different builds ?).

how can i fix this error?

grep out the bad lines, or replace the reference allele ?

You could try updating all REF alleles t match a particular reference genome by using bcftools norm with the following command-line parameters:

--check-ref <e|w|x>
-f, --fasta-ref <file>

...although it rarely appears to function.

Thanks, yeah this works :)

0 answers

No answers yet.

Log in to answer this question.