{"action":"created","issue":{"url":"https://api.github.com/repos/vcftools/vcftools/issues/28","repository_url":"https://api.github.com/repos/vcftools/vcftools","labels_url":"https://api.github.com/repos/vcftools/vcftools/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/vcftools/vcftools/issues/28/comments","events_url":"https://api.github.com/repos/vcftools/vcftools/issues/28/events","html_url":"https://github.com/vcftools/vcftools/issues/28","id":130975252,"number":28,"title":"Issue with max-missing and max-missing-count options","user":{"login":"aureliecobat","id":17043081,"avatar_url":"https://avatars.githubusercontent.com/u/17043081?v=3","gravatar_id":"","url":"https://api.github.com/users/aureliecobat","html_url":"https://github.com/aureliecobat","followers_url":"https://api.github.com/users/aureliecobat/followers","following_url":"https://api.github.com/users/aureliecobat/following{/other_user}","gists_url":"https://api.github.com/users/aureliecobat/gists{/gist_id}","starred_url":"https://api.github.com/users/aureliecobat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aureliecobat/subscriptions","organizations_url":"https://api.github.com/users/aureliecobat/orgs","repos_url":"https://api.github.com/users/aureliecobat/repos","events_url":"https://api.github.com/users/aureliecobat/events{/privacy}","received_events_url":"https://api.github.com/users/aureliecobat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-03T09:58:53Z","updated_at":"2016-02-16T11:15:29Z","closed_at":"2016-02-16T11:15:28Z","body":"Hi,\r\n\r\nI have a vcf file with 158 individuals. After applying some hard filters on GQ and DP, I would like to filter out variants with 100% missing genotypes.\r\nI tried to use --max-missing 0.007 (1/158 = 0.0063 and 2/158 = 0.012) and --max-missing-count 157 and I don't have the same results with the max-missing-count option removing much more snps than the max-missing option. When looking at the snps excluded with max-missing-count 157 option, I realized that SNPs with non-missing genotypes in 3 individuals were excluded (while they should not be!). \r\nEven setting --max-missing-count to 159 (one more than my number of individuals in the vcf) exclude variants... I don't understand how it is possible...\r\n\r\nI checked only the first excluded variants but when setting --max-missing to 0.007, it seems that sites with 157 or 158 missing genotypes are excluded (while I'd like to exclude only sites with 158 missing genotypes). Setting the value of max-missing at 0.006 should give the same results as 0 but it doesn't. Some variant sites are excluded...\r\n\r\nAny idea on what is going on there?  I'm not sure I can trust any of max-missing or max-missing-count options.\r\n\r\nThanks a lot for you help.\r\nAll the best\r\nAurélie Cobat "},"comment":{"url":"https://api.github.com/repos/vcftools/vcftools/issues/comments/184635148","html_url":"https://github.com/vcftools/vcftools/issues/28#issuecomment-184635148","issue_url":"https://api.github.com/repos/vcftools/vcftools/issues/28","id":184635148,"user":{"login":"aureliecobat","id":17043081,"avatar_url":"https://avatars.githubusercontent.com/u/17043081?v=3","gravatar_id":"","url":"https://api.github.com/users/aureliecobat","html_url":"https://github.com/aureliecobat","followers_url":"https://api.github.com/users/aureliecobat/followers","following_url":"https://api.github.com/users/aureliecobat/following{/other_user}","gists_url":"https://api.github.com/users/aureliecobat/gists{/gist_id}","starred_url":"https://api.github.com/users/aureliecobat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aureliecobat/subscriptions","organizations_url":"https://api.github.com/users/aureliecobat/orgs","repos_url":"https://api.github.com/users/aureliecobat/repos","events_url":"https://api.github.com/users/aureliecobat/events{/privacy}","received_events_url":"https://api.github.com/users/aureliecobat/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T11:15:28Z","updated_at":"2016-02-16T11:15:28Z","body":"Hi all,\r\n\r\nI figured out what was happening. \r\nFor max-missing-count option, vcftools refers to the number of missing alleles and not the number of missing genotypes. To exclude variants with 100% missing genotypes I need to set max-missing-count at 314 (i.e. 157 individuals x 2 alleles).\r\nFor max-missing option it was my mistake. I got confused with the threshold effect. Max-missing is the minimum call-rate allowed so obviously any value greater than 0 wil remove variants and max-missing 0.006 can not give the same results than max-missing 0.\r\n\r\nEverything is now consistent!\r\nAll the best\r\nAurélie Cobat\r\n\r\n\r\n"}}