This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Median depth across samples from multi-sample VCF

Hi folks,

I am trying to extract median DP values, across samples, from each line of a multi-sample VCF. (The DP for each individual sample is given in the FORMAT columns. There are ~400,000 samples for most sites)

I know I can filter on the median DP values, (e.g. with bcftools query -i MEDIAN(DP)>30)

But I can't find a way to actually extract and print the median value.

I thought I would be able to do this with something like: bcftools query -f MEDIAN(DP)

But no dice!

I'd be grateful for any suggestions.

Alex

bcftools

0 answers

No answers yet.

Log in to answer this question.