I have a multisample vcf that I would like to filter based on read depth. More precisely, I would like to modify the vcf so that a snp that is detected where the read depth is more than the average read depth at the sample will change to the reference allele. I know how to filter snps where read depth is higher than a certain value with
However, the value applied to the maxDP parameter would change depending on the sample.
Is there any tool or trick that could help me do this?
Many thanks for your help,