samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
640 stars 241 forks source link

How can bcftools filter samples with large fraction of missing site? #2112

Closed Neo-xbx-00 closed 4 months ago

Neo-xbx-00 commented 4 months ago

Hi, I'd like to use bcftools to filter my SNP dataset, and I wonder how bcftools remove samples with large fraction of missing site?

pd3 commented 4 months ago

If I understand the query correctly, it is asking how to remove sites with large number of missing genotypes.

Something like this should work:

bcftools view -e 'F_PASS(GT=="mis") > 0.9'