Hello,
I have alleles that have a beta and a p-value for a given risk allele, which has the number of patients, and number of risk and non-risk alleles.
How can I calculate the number of samples needed, and the statistical power?
I have so far considered https://www.statsmodels.org/dev/generated/statsmodels.stats.power.TTestIndPower.power.html#statsmodels.stats.power.TTestIndPower.power but I don't know if this will work for genetic data.
I have also looked at Quanto, but I can't run that on mac or Linux. I have seen online calculators, but those are not usuable if I'm going to run this hundreds, even thousands of times, so a python/perl library would be best.
https://csg.sph.umich.edu/abecasis/gas_power_calculator/ looks great.... but it cannot be scripted, and manually running that 680 times is both tedious and error-prone. I'm really surprised that this is so difficult to find.
How can I calculate the statistical power for risk and non-risk alleles?
is there a formula that I could script myself?