Hello, biostars community!
I have been struggling lately with bcftools to add a customized tag to my vcf header so I can then filter using it. I've read the bcftools manual many times and I've found this information:
TAG=func(TAG) Number:1 Type:Integer .. Experimental support for user-defined expressions such as "DP=sum(DP)". This is currently very basic, to be extended
Therefore, I'm trying to add the average variant level DP calculated from the per-sample DP using the example provided in the manual. So far I've tried
bcftools +fill-tags in.vcf.gz -Oz -o out.AVGDP.vcf.gz -- -t 'VD=AVG(DP)'
where VD= variant depth. I'm getting this error
Error: the expression not recognised: VD=AVG(DP)
I have tried replacing VD=AVG(DP)
for VD=MEAN(DP)
, VD=avg(DP)
, VD=AVG(FMT/DP)
but none of these syntax is working for me. I was able to calculate this VD=sum(DP)
but so far it is the only function working. I've also tried min, max...etc.
I would appreciate some thoughts or recommendations on this issue. Thank you
dc
It sounds like it's an experimental option - perhaps your version doesn't support it? What version of bcftools are you using?
I'm using the latest version bcftools 1.12