This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to filter a multisample VCF based on individual sample depth?

I have a fairly large (800< sample) VCF file that I would like to filter based on the depth of individual aligned samples. I initially attempted to filter based on the DP field, but this seems to be the total depth at a given site, rather than the depth of an individual at that site. Does anyone know how I could accomplish this?

Thanks

samtools mpileup vcf gbs

1 answer

use GATK VariantFiltration

    -select 'vc.getGenotype("SAMPLENAME").getDP() > 10'

or vcffilterjs e.g: Filtering vcf file by DP

What about changing the genotypes of this sample (below 10) to missing instead of removing the sites completely?

Log in to answer this question.