This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Selecting Heterozygote Calls Using Selectvariants

Hey, I want to select heterozygotes of one sample from a variant VCF file

for the homozygote selection, we used the follows,

$ java -Xmx4g -jar GenomeAnalysisTK.jar -T SelectVariants -R reference.fa --mysnp.vcf -select 'vc.getGenotype("sampleID").isHomVar()' -o output.vcf &

however, I use the commands as follows for heterozygote, it did not work

$ java -Xmx4g -jar GenomeAnalysisTK.jar -T SelectVariants -R genome.fa --variant 417snp.vcf -select 'vc.getGenotype("M895_417").isHerVar()' -o 417het.vcf

Did i miss something? I can not find the documents how to select heterozygotes.

Thanks

gatk

1 answer

I think the JEXL expression is isHet == 1. Not sure if a isHet() method exists, though.

Sources:

  1. https://www.broadinstitute.org/gatk/guide/article?id=1255
  2. https://www.broadinstitute.org/gatk/guide/article?id=51

Log in to answer this question.