select intersection, merged VCF files

NobuhikoNobuhiko Member
edited October 2018 in Ask the GATK team


I am using GATK3 and trying to compare two samples. I have a merged vcf file of two samples.
I tried running below protocol.

java -jar GenomeAnalysisTK.jar -T SelectVariants \
-R hg19.fasta \
-V C01.vcf \
-select 'set == "Intersection";’ \
-o C01._invertselect.vcf \

I got invertselect files, but it detected not only the difference of genotype. It detected the difference of filtered depth, too.

For example,

chr1    12783   .   G   A   341.69  PASS    AC=4;AF=1;AN=4;DP=304;FS=0;MQ=12.58;MQRankSum=1.953;QD=1.12;ReadPosRankSum=2.964;SOR=2.584  GT:AD:AF:DP:GP:GQ:PL    

How can i detect the difference of only genotype ?
I do appreciate your help.

Post edited by shlee on


  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Hi @Nobuhiko,

    It sounds like you want to get only those genotypes that differ between two samples. I think I went through this exercise two years ago and it is not straight-forward with GATK. I would recommend using the external RTG-Tools vcfeval. Be sure to NOT use the --squash-ploidy option to match the genotype identically. Using the --squash-ploidy option allows you to match on the variant allele without regard to zygosity. This is useful if your caller isn't great at differentiating het versus hom-var.

Sign In or Register to comment.