Dear All, I have a jointly GenotypeGVCF file (one vcf file) for 100 cattle samples. As cattle are not a model animal, I am planning to use hard filtering instead of VQSR. Therefore, am I supposed to extract SNPs and INDELs in a separate file to apply hard filtering? or Is there a mechanism to apply a hard filter for SNPs and INDELs sequentially using a single (having both SNPs and INDELs) vcf file? I read https://gatk.broadinstitute.org/hc/en-us/articles/9570403488667-VariantFiltration#--filter-expression.However, I did not get any clue about what I am asking here. Thank you in advance for your valuable suggestions.
1 answer
it's a JEXL expression: https://gatk.broadinstitute.org/hc/en-us/articles/360035891011-JEXL-filtering-expressions you can use boolean expression like
--filter-expression "vc.isSNP() && AB < 0.2" \
(vc is a VariantContext object: https://samtools.github.io/htsjdk/javadoc/htsjdk/htsjdk/variant/variantcontext/VariantContext.html )
Log in to answer this question.