broadinstitute / genetic-prevalence-estimator

https://genie.broadinstitute.org/
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Add new genetic prevalence model #172

Closed sambaxter closed 4 months ago

sambaxter commented 12 months ago

We need to add one more genetic prevalence model which can be calculated as: R

af <- c(0.01, 0.05, 0.1)
(1-prod(1-af))^2

python

import numpy
af = [0.01, 0.05, 0.1]
(1-numpy.prod([1-i for i in af]))**2

# note could define one_minus_af and put that into the prod
# one_minus_af = [1-i for i in af]
# (1-numpy.prod(one_minus_af))**2

The mock up for adding this model can be found here