Name | adnex JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | ADNEX model for predicting malignancy in adnexal masses. |
upload_time | 2024-12-25 16:05:57 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
ai
ultrasound
ovarian cancer
diagnostics
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Assessment of Different NEoplasias in the adneXa(ADNEX) model
<a href="https://github.com/psf/black/actions"><img alt="Actions Status" src="https://github.com/psf/black/workflows/Test/badge.svg"></a>
<a href="https://coveralls.io/github/psf/black?branch=main"><img alt="Coverage Status" src="https://s3.amazonaws.com/assets.coveralls.io/badges/coveralls_100.svg"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
## Table of Contents
- [Assessment of Different NEoplasias in the adneXa(ADNEX) model](#assessment-of-different-neoplasias-in-the-adnexaadnex-model)
- [Table of Contents](#table-of-contents)
- [Dependencies](#dependencies)
- [Description](#description)
- [Installation](#installation)
- [Usage](#usage)
- [References](#references)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)
## Dependencies
- Python 3.8+
- pandas
- numpy
## Description
This is an unofficial Python implementation of the **Assessment of Different NEoplasias in the adneXa (ADNEX)** model developed by the **International Ovarian Tumor Analysis (IOTA) group** for the preoperative assessment of adnexal masses ([Van Calster et al. (2014)](https://doi.org/10.1136/bmj.g5920)).
The model is used to predict the risk of malignancy, as well as to differentiate between benign, borderline, early and advanced stage invasive, and secondary metastatic tumours.
The model is based on logistic regression and uses the following ultrasound and clinical variables:
- [A] **age** (years)
- [B] **serum CA-125** (U/ml)
- [C] **maximal lesion diameter** (mm)
- [D] **maximal diameter of largest solid component** (mm)
- [E] **more than 10 cyst locules** (1 for yes, 0 for no)
- [F] **number of papillary projections** (0, 1, 2, 3, or 4, where 4 indicates > 3)
- [G] **acoustic shadows** (1 for yes, 0 for no)
- [H] **ascites** (1 for yes, 0 for no)
- [I] **type of centre** (1 for oncology centre, 0 for other)
The model is available in two versions, with and without CA-125. If CA-125 is available and not 'NaN', the model uses the version with CA-125. Otherwise, it uses the version without CA-125.
The model provides the predicted probabilities of the different types of neoplasias (Benign, Borderline, Stage I, Stage II-IV, Metastatic) and the predicted risk of malignancy (Borderline + Stage I + Stage II-IV + Metastatic).
## Installation
You can install the package using `pip`:
```bash
pip install adnex
```
Alternatively, install it from the source:
```bash
git clone https://github.com/filipchristiansen/adnex.git
cd adnex
pip install -e .
```
## Usage
The package provides two functions:
1. `predict_risks`: A function that takes a pandas Series containing the ADNEX variables as input and returns a pandas Series with the predicted probabilities of the different types of neoplasias (Benign, Borderline, Stage I, Stage II-IV, Metastatic).
2. `predict_risk_of_cancer`: A function that takes a pandas Series containing the ADNEX variables as input and returns the predicted risk of malignancy (Borderline + Stage I + Stage II-IV + Metastatic).
Here is an example of how to use the `predict_risks` function:
```python
import pandas as pd
import adnex
# Create a pandas Series with the ADNEX variables
data = pd.Series(
{
'age': 46,
's_ca_125': 68,
'max_lesion_diameter': 88,
'max_solid_component': 50,
'more_than_10_locules': 0,
'number_of_papillary_projections': 2,
'acoustic_shadows_present': 1,
'ascites_present': 1,
'is_oncology_center': 0,
}
)
# Get the predicted probabilities
probs = adnex.predict_risks(data)
print(probs)
```
Output:
``` bash
Benign 0.612881
Borderline 0.081589
Stage I cancer 0.111828
Stage II-IV cancer 0.168236
Metastatic cancer 0.025466
dtype: float64
```
Here is an example of how to use the `predict_risk_of_cancer` function:
```python
import pandas as pd
import adnex
data = ... # Create a pandas Series with the ADNEX variables (see above)
risk = adnex.predict_risk_of_cancer(data)
print(risk)
```
Output:
```bash
0.387119
```
## References
- [Van Calster B, et al. *BMJ* (2014)](https://doi.org/10.1136/bmj.g5920)
- [Landolfo C, et al. *Ultrasound Obstet Gynecol* (2022)](https://doi.org/10.1002/uog.26080)
## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contact
For questions or support, please contact the author at [filip.christiansen.2@ki.se](mailto:filip.christiansen.2@ki.se) with the subject line "GitHub adnex: [Your Subject]".
Raw data
{
"_id": null,
"home_page": null,
"name": "adnex",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "AI, ultrasound, ovarian cancer, diagnostics",
"author": null,
"author_email": "Filip Christiansen <filip.christiansen.2@ki.se>",
"download_url": "https://files.pythonhosted.org/packages/0f/c7/a4b04ad2a0829b1245118456fad3fbca43b7f859a85b544e275e1eb6a604/adnex-0.1.0.tar.gz",
"platform": null,
"description": "# Assessment of Different NEoplasias in the adneXa(ADNEX) model\n\n<a href=\"https://github.com/psf/black/actions\"><img alt=\"Actions Status\" src=\"https://github.com/psf/black/workflows/Test/badge.svg\"></a>\n<a href=\"https://coveralls.io/github/psf/black?branch=main\"><img alt=\"Coverage Status\" src=\"https://s3.amazonaws.com/assets.coveralls.io/badges/coveralls_100.svg\"></a>\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\n\n## Table of Contents\n\n- [Assessment of Different NEoplasias in the adneXa(ADNEX) model](#assessment-of-different-neoplasias-in-the-adnexaadnex-model)\n - [Table of Contents](#table-of-contents)\n - [Dependencies](#dependencies)\n - [Description](#description)\n - [Installation](#installation)\n - [Usage](#usage)\n - [References](#references)\n - [Contributing](#contributing)\n - [License](#license)\n - [Contact](#contact)\n\n## Dependencies\n\n- Python 3.8+\n- pandas\n- numpy\n\n## Description\n\nThis is an unofficial Python implementation of the **Assessment of Different NEoplasias in the adneXa (ADNEX)** model developed by the **International Ovarian Tumor Analysis (IOTA) group** for the preoperative assessment of adnexal masses ([Van Calster et al. (2014)](https://doi.org/10.1136/bmj.g5920)).\n\nThe model is used to predict the risk of malignancy, as well as to differentiate between benign, borderline, early and advanced stage invasive, and secondary metastatic tumours.\n\nThe model is based on logistic regression and uses the following ultrasound and clinical variables:\n\n- [A] **age** (years)\n- [B] **serum CA-125** (U/ml)\n- [C] **maximal lesion diameter** (mm)\n- [D] **maximal diameter of largest solid component** (mm)\n- [E] **more than 10 cyst locules** (1 for yes, 0 for no)\n- [F] **number of papillary projections** (0, 1, 2, 3, or 4, where 4 indicates > 3)\n- [G] **acoustic shadows** (1 for yes, 0 for no)\n- [H] **ascites** (1 for yes, 0 for no)\n- [I] **type of centre** (1 for oncology centre, 0 for other)\n\nThe model is available in two versions, with and without CA-125. If CA-125 is available and not 'NaN', the model uses the version with CA-125. Otherwise, it uses the version without CA-125.\n\nThe model provides the predicted probabilities of the different types of neoplasias (Benign, Borderline, Stage I, Stage II-IV, Metastatic) and the predicted risk of malignancy (Borderline + Stage I + Stage II-IV + Metastatic).\n\n## Installation\n\nYou can install the package using `pip`:\n\n```bash\npip install adnex\n```\n\nAlternatively, install it from the source:\n\n```bash\ngit clone https://github.com/filipchristiansen/adnex.git\ncd adnex\npip install -e .\n```\n\n## Usage\n\nThe package provides two functions:\n\n1. `predict_risks`: A function that takes a pandas Series containing the ADNEX variables as input and returns a pandas Series with the predicted probabilities of the different types of neoplasias (Benign, Borderline, Stage I, Stage II-IV, Metastatic).\n\n2. `predict_risk_of_cancer`: A function that takes a pandas Series containing the ADNEX variables as input and returns the predicted risk of malignancy (Borderline + Stage I + Stage II-IV + Metastatic).\n\nHere is an example of how to use the `predict_risks` function:\n\n```python\nimport pandas as pd\nimport adnex\n\n# Create a pandas Series with the ADNEX variables\ndata = pd.Series(\n {\n 'age': 46,\n 's_ca_125': 68,\n 'max_lesion_diameter': 88,\n 'max_solid_component': 50,\n 'more_than_10_locules': 0,\n 'number_of_papillary_projections': 2,\n 'acoustic_shadows_present': 1,\n 'ascites_present': 1,\n 'is_oncology_center': 0,\n }\n )\n\n# Get the predicted probabilities\nprobs = adnex.predict_risks(data)\nprint(probs)\n```\n\nOutput:\n\n``` bash\nBenign 0.612881\nBorderline 0.081589\nStage I cancer 0.111828\nStage II-IV cancer 0.168236\nMetastatic cancer 0.025466\ndtype: float64\n```\n\nHere is an example of how to use the `predict_risk_of_cancer` function:\n\n```python\nimport pandas as pd\nimport adnex\n\ndata = ... # Create a pandas Series with the ADNEX variables (see above)\n\nrisk = adnex.predict_risk_of_cancer(data)\n\nprint(risk)\n```\n\nOutput:\n\n```bash\n0.387119\n```\n\n## References\n\n- [Van Calster B, et al. *BMJ* (2014)](https://doi.org/10.1136/bmj.g5920)\n- [Landolfo C, et al. *Ultrasound Obstet Gynecol* (2022)](https://doi.org/10.1002/uog.26080)\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions or support, please contact the author at [filip.christiansen.2@ki.se](mailto:filip.christiansen.2@ki.se) with the subject line \"GitHub adnex: [Your Subject]\".\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "ADNEX model for predicting malignancy in adnexal masses.",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"ai",
" ultrasound",
" ovarian cancer",
" diagnostics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f6b1d97c020cceee3f39efafd794cf68a0ceaab7c2b1e2949965c78367cd2608",
"md5": "93721d51f84b4acb273676416c3df0df",
"sha256": "df95ce70a7a69331ee54bb7f85018aa00e91c7751b24b55d7d652fbac37fc396"
},
"downloads": -1,
"filename": "adnex-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "93721d51f84b4acb273676416c3df0df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 12083,
"upload_time": "2024-12-25T16:05:56",
"upload_time_iso_8601": "2024-12-25T16:05:56.400544Z",
"url": "https://files.pythonhosted.org/packages/f6/b1/d97c020cceee3f39efafd794cf68a0ceaab7c2b1e2949965c78367cd2608/adnex-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0fc7a4b04ad2a0829b1245118456fad3fbca43b7f859a85b544e275e1eb6a604",
"md5": "52375e9e4f87e9b94ca5bcbc51e2afd2",
"sha256": "95e2cd69c2e6e2f0d9d863a9ca5a05c180577e66c4ee2c273eb8e6d4b9e50e08"
},
"downloads": -1,
"filename": "adnex-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "52375e9e4f87e9b94ca5bcbc51e2afd2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 13187,
"upload_time": "2024-12-25T16:05:57",
"upload_time_iso_8601": "2024-12-25T16:05:57.749066Z",
"url": "https://files.pythonhosted.org/packages/0f/c7/a4b04ad2a0829b1245118456fad3fbca43b7f859a85b544e275e1eb6a604/adnex-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-25 16:05:57",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "adnex"
}