This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filter SNPs for DP using mean + 2*SD

Hello all,

I am trying to filter a SNP file (.vcf) for max depth. Instead of choosing a random number it has been suggested that I could use the mean + (2*SD) as a limit for the amount of depth allowed.

Does anyone know how to carry this out using vcftools or the alike? I know I can filter using -minDP -maxDP -min-meanDP -max-meanDP etc. but how would I apply the calculation instead?

I saw this question but I also get the wrong answer (outputs 0 0). It is also very old so thought it would be best to start another.

Thank you for your help in advance.

snp next-gen filter depth vcftools

One issue with that strategy is that the calculation may be biased. You may be detecting more variants at low frequencies, so your mean may be artificially low.

I see, but this would be controlled for by filtering using -minDP?

If not - how would you set the maximum depth allowance - so its not just an arbitary number? Thank you for your advice

0 answers

No answers yet.

Log in to answer this question.