# 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])
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pypopgenbe",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "Virtual human population generator, Population variability, QIVIVE, PBPK, Reverse dosimetry",
"author": null,
"author_email": "Alex Hogg <the.hoglet@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/0a/c8/1a19a6e37474c87efd9420aea014a1d85154c6119565a910c635b558bfc2/pypopgenbe-1.5.4.tar.gz",
"platform": null,
"description": "# PyPopGenBE\n\nPyPopGenBE 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).\n\n[Try the live app](https://pypopgen.github.io/)\n\n## Getting Started\n\nAfter installing the package, from a Python prompt, try: \n\n``` python\n>>> from pypopgenbe import Dataset, generate_pop\n>>> population, number_of_individuals_discarded = generate_pop(\n population_size=10,\n dataset_name=Dataset.P3M,\n age_range=(18, 60),\n bmi_range=(20, 25),\n height_range=(100, 150),\n prob_of_male=0.5,\n probs_of_ethnicities=(0.3, 0.4, 0.3),\n is_richly_perfused_tissue_discrete=False,\n is_slowly_perfused_tissue_discrete=False,\n seed=42,\n)\n>>> population['Roots']['Names']\n['Age', 'Sex', 'Ethnicity', 'Body Mass', 'Height', 'Cardiac Output']\n>>> ages = population['Roots']['Values'][:,0]\n>>> ages\narray([57.3782846 , 27.47917945, 19.43605721, 53.75596795, 39.95617671, 23.59815825, 36.90688673, 18.39038977, 46.7636573 , 30.27763087])\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Port of PopGen MATLAB backend",
"version": "1.5.4",
"project_urls": {
"Homepage": "https://pypopgen.github.io/",
"Issues": "https://github.com/PyPopGen/PyPopGenBE/issues",
"Literature": "https://doi.org/10.1016/j.tox.2013.07.009",
"Repository": "https://github.com/PyPopGen/PyPopGenBE"
},
"split_keywords": [
"virtual human population generator",
" population variability",
" qivive",
" pbpk",
" reverse dosimetry"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8908a2be2297a373bfd887a5b86403cc4ee9e1ae4457ab6326c580137262b9a4",
"md5": "5c3156200eb6841d8a825c4edf714e4c",
"sha256": "0cf73cecfaa327ce69d605941a6c9616a5aed7c9f79b0bd02c12bf0ab61266c0"
},
"downloads": -1,
"filename": "pypopgenbe-1.5.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5c3156200eb6841d8a825c4edf714e4c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 41582,
"upload_time": "2024-07-27T15:41:40",
"upload_time_iso_8601": "2024-07-27T15:41:40.910434Z",
"url": "https://files.pythonhosted.org/packages/89/08/a2be2297a373bfd887a5b86403cc4ee9e1ae4457ab6326c580137262b9a4/pypopgenbe-1.5.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0ac81a19a6e37474c87efd9420aea014a1d85154c6119565a910c635b558bfc2",
"md5": "b1ff8e01f743566d6736446c39d40b1b",
"sha256": "4c272c1af5a39cacd2b7a7d2df252117d03381a4f5a2b0093cc1ad18fd41a82b"
},
"downloads": -1,
"filename": "pypopgenbe-1.5.4.tar.gz",
"has_sig": false,
"md5_digest": "b1ff8e01f743566d6736446c39d40b1b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 33107,
"upload_time": "2024-07-27T15:41:42",
"upload_time_iso_8601": "2024-07-27T15:41:42.704042Z",
"url": "https://files.pythonhosted.org/packages/0a/c8/1a19a6e37474c87efd9420aea014a1d85154c6119565a910c635b558bfc2/pypopgenbe-1.5.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-27 15:41:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PyPopGen",
"github_project": "PyPopGenBE",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "pypopgenbe"
}