Metadata-Version: 2.1
Name: pypopgenbe
Version: 1.5.4
Summary: Port of PopGen MATLAB backend
Author-email: Alex Hogg <the.hoglet@gmail.com>
Project-URL: Homepage, https://pypopgen.github.io/
Project-URL: Repository, https://github.com/PyPopGen/PyPopGenBE
Project-URL: Issues, https://github.com/PyPopGen/PyPopGenBE/issues
Project-URL: Literature, https://doi.org/10.1016/j.tox.2013.07.009
Keywords: Virtual human population generator,Population variability,QIVIVE,PBPK,Reverse dosimetry
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: scipy >=1.12.0

# PyPopGenBE

PyPopGenBE is a port of the [PopGen MATLAB backend](https://xnet.hsl.gov.uk/Popgen/) reported in [McNally et al., 2014](https://doi.org/10.1016/j.tox.2013.07.009).

[Try the live app](https://pypopgen.github.io/)

## Getting Started

After installing the package, from a Python prompt, try: 

``` python
>>> from pypopgenbe import Dataset, generate_pop
>>> population, number_of_individuals_discarded = generate_pop(
    population_size=10,
    dataset_name=Dataset.P3M,
    age_range=(18, 60),
    bmi_range=(20, 25),
    height_range=(100, 150),
    prob_of_male=0.5,
    probs_of_ethnicities=(0.3, 0.4, 0.3),
    is_richly_perfused_tissue_discrete=False,
    is_slowly_perfused_tissue_discrete=False,
    seed=42,
)
>>> population['Roots']['Names']
['Age', 'Sex', 'Ethnicity', 'Body Mass', 'Height', 'Cardiac Output']
>>> ages = population['Roots']['Values'][:,0]
>>> ages
array([57.3782846 , 27.47917945, 19.43605721, 53.75596795, 39.95617671, 23.59815825, 36.90688673, 18.39038977, 46.7636573 , 30.27763087])
```
