I would like to filter VCF files with a maximum depth filter, so removing variants with a coverage more than a threshold (in this case d+3*sqrt(d), d=mean coverage of the file), as suggested in Heng Li's paper from 2014. I was thinking about a custom script, including something like sambamba/samtools depth, but maybe there is an implementation somewhere that I missed which can do this task much more efficiently? Any ideas?
That would've been my next step ^^
Probably fetching a subsample of the WGS file, maybe all promoters, and then running any depth tool on it should be sufficient to get a solid estimate ov average depth.
Thanks! What about mean depth of the entire WGS BAM instead of the mean of the DPs? Any ideas about that?
use whatever you want.
That would've been my next step ^^ Probably fetching a subsample of the WGS file, maybe all promoters, and then running any depth tool on it should be sufficient to get a solid estimate ov average depth.