This is a test version of Biostars. For the public version, visit https://www.biostars.org.
SNPSift countRef() on a VCF with missing values

Hi,

I'd like to use SNPSift Filter for filtering a VCF. I found that missing value for the genotype (GT), i.e., ./., are counted as reference.

Here is a minimal example:

#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  sample
XXX 999 .   A   G   100 .   .   GT:PL:DP:AD:GQ  ./.:0,0,0:1:0,1:127

Here is the filter that I apply: countRef()>0

I would expect that no line passes the filter, but it returns the line although there is no call for the reference (0/0).

Does anybody have an idea?

I used SNPSift version SnpSift 4.3t on my own galaxy server and also tested usegalaxy.eu. Both give the same result.

Best regards,
Jens

snpsift

1 answer

Use

bcftools view -i 'COUNT (GT="RR")>0' in.vcf

Log in to answer this question.