We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

How can I get a common variant of several samples from multi-sample VCF after joint genotyping ?

javisjavis Member
edited April 2019 in Ask the GATK team

Here's a previous similar thread but I can' t find the resolution.
I’m studying about sequencing data analysis followed GATK Best practices for Germline SNP & Indel Discovery. Through the series of analysis, finally I get multi-sample VCF file from joint genotyping(GenotypeGVCFs). After this, I'm looking for sites where the three samples are variant,how can I use “SelectVariants” to get the common variant.
I tried this command to get the result but nothing output.
gatk SelectVariants -V P_14-18.HC.vcf -select 'set == "Intersection";' -O P_14-18.HC.select.vcf

Maybe I should call each sample and get vcf file one by one, then use some other method to get a common variant, however, joint calling is recommended in this thread.

Answers

  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    Hi @javis

    Try this gatk SelectVariants \ -V gs://gatk-tutorials/workshop_1702/variant_discovery/data/inputVcfs/trio.vcf.gz \ -select 'vc.getGenotype("NA12878").isHomRef()' -select 'vc.getGenotype("NA12877").isHomRef()' -select 'vc.getGenotype("NA12882").isHomRef()' \ --invertSelect true \ -O /home/jupyter-user/motherSNP.vcf.gz

Sign In or Register to comment.