This is a test version of Biostars. For the public version, visit https://www.biostars.org.
number of homozygotes with phenotype

I have individuals with plink-formatted genotypes, and a phenotype file containing many binary phenotypes. I want to know how many people have the phenotype and are also homozygous for the alt allele. I know that in PLINK I can easily find the minor allele frequencies of the case/controls with --assoc

plink --bfile <input>  --assoc --pheno <phenotype> --all-pheno --out <output> 

However, since I'm interested in running a recessive association test (using plink --glm recessive) I want to filter my SNPs to only those that have some threshold of recessive individuals with the phenotype. Is there any way to do this natively within PLINK or is this something I will have to do with python or R?

plink gwas

1 answer

plink2 --bfile <input> --pheno <phenotype> --keep-if "<phenotype> == case" --geno-counts --out <output>

should generate a genotype-count report (https://www.cog-genomics.org/plink/2.0/formats#gcount ), where the TWO_ALT_GENO_CTS column should contain the number of homozygous-minor genotypes.

amazing, thanks!!

Log in to answer this question.