This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filter vcf file by position AND alternative allele

I am filtering a vcf file this way:

bcftools view -R file.pLoF.tsv -Oz -o filtered.pLoF.vcf.gz c12.vcf.gz

However this filters by position, regardless of which ALT allele. How can I enforce this to keep this:

chr12:20875274:G:GT

and leave out this:

chr12:20875274:G:C
bcftools vcf filter

1 answer

use bcftools isec

Log in to answer this question.