This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filter SNPs in multiple-sample vcf based on the snps of two samples

Hello all,

I have a .vcf file with ~96 samples which were called using freebayes.

This .vcf file contains a family, i.e. a mother, father and offspring. I would like to filter the SNPs of the offspring based on the parental polymorphisms (those found in the mother and father).

Is there a relatively simple way to do this? I am very new to SNP filtering and .vcf files.

Thank you in advance for your help! Eve

vcf snp filter bash linux

thank you both for your suggestions :D

2 answers

Check Gemini to pedigree analysis.

use

bcftools view with option '-i' (see manual)

use gatk SelectVariants with a jexl expression https://gatk.broadinstitute.org/hc/en-us/articles/360036362532-SelectVariants

use jvarkit http://lindenb.github.io/jvarkit/VcfFilterJdk.html

Log in to answer this question.