pyicare 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyicare-1.0.0/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
pyicare-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyicare
3
+ Version: 1.0.0
4
+ Summary: A Python distribution of iCARE, a tool for individualized Coherent Absolute Risk Estimation.
5
+ Author-email: Jeya Balaji Balasubramanian <jeyabbalas@gmail.com>
6
+ License: MIT License
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
25
+ Project-URL: Homepage, https://github.com/jeyabbalas/py-icare
26
+ Keywords: gwas,webassembly,survival-analysis,cox-proportional-hazard,genome-wide-association-studies,absolute-risk
27
+ Classifier: License :: OSI Approved :: MIT License
28
+ Classifier: Programming Language :: Python
29
+ Classifier: Programming Language :: Python :: 3
30
+ Classifier: Environment :: WebAssembly
31
+ Classifier: Topic :: Scientific/Engineering
32
+ Requires-Python: >=3.9
33
+ Description-Content-Type: text/markdown
34
+ Provides-Extra: demo
35
+ Provides-Extra: dev
36
+ License-File: LICENSE
37
+
38
+ # Py-iCARE
39
+
40
+ **Py-iCARE** is a Python distribution of iCARE, a tool for **i**ndividualized **C**oherent **A**bsolute **R**isk **E**stimation. iCARE allows users to build, validate, and apply absolute risk models. [Absolute risk](https://www.cancer.gov/publications/dictionaries/cancer-terms/def/absolute-risk) quantifies the chance of an event occurring. For example, the likelihood that a healthy individual, of a given age and a risk factor profile, will develop the disease of interest over a specified time interval.
41
+
42
+ The original iCARE was written in R and its archived version (1.26.0) is available via Bioconductor at: https://www.bioconductor.org/packages/release/bioc/html/iCARE.html.
43
+
44
+ ## Motivation
45
+ The main motivation of porting iCARE from R to Python was to enable its use as a [WebAssembly](https://webassembly.org/) module (via [Pyodide](https://pyodide.org/en/latest/index.html)) for the proliferation of portable and privacy-preserving web applications that can build, validate, and apply absolute risk models. Python also enables researchers to leverage its rapidly evolving data science ecosystem— including [TensorFlow](https://www.tensorflow.org/), [PyTorch](https://pytorch.org/), [statsmodels](https://www.statsmodels.org/stable/index.html), and [scikit-learn](https://scikit-learn.org/stable/)— to explore novel absolute risk models that can incorporate evidence from wider sources of data.
46
+
47
+ ## Installation
48
+
49
+ This repository contains a Python package. It can be installed via PyPI as shown below. It is also compiled into WebAssembly via Pyodide. The wrapper JavaScript library, as ES6 modules, is also distributed in this repository at GitHub Pages. It can be accessed by any JavaScript runtime environment, including Node.js, web browsers, and Quarto notebooks in RStudio (to interface with R, Julia, and/or Python). Specifically, the steps to access it via JavaScript and R are also shown below.
50
+
51
+ ### Python
52
+
53
+ If you want to access iCARE from a purely Python runtime environment, you can install it via PyPI:
54
+
55
+ ```bash
56
+ pip install pyicare
57
+ ```
58
+
59
+ iCARE is supported on Python 3.7 and above.
60
+
61
+ ### JavaScript
62
+ ES6 import JS SDK via GitHub Pages.
63
+
64
+ ### R
65
+ ES6 import JS SDK via Quarto.
66
+
67
+ ## Usage
68
+
69
+ Once installed, Py-iCARE can be imported into your Python scripts as follows:
70
+
71
+ ```python
72
+ import icare
73
+ ```
74
+
75
+ Py-iCARE is a library with three main functions: 1) `compute_absolute_risk()`, a method to build and apply absolute risk models; 2) `compute_absolute_risk_split_interval()`, a method to build and apply absolute risk models that relaxes the proportional hazard assumption to some extent by allowing you to specify different model parameters before and after a cut-point in time; and 3) `validate_absolute_risk_model()`, a method to validate absolute risk models on an independent cohort study data or a case-control study nested within a cohort.
76
+
77
+ Example usages of these functions are shown in Jupyter notebooks at the [examples/Python](https://github.com/jeyabbalas/py-icare/tree/master/examples/Python) directory.
78
+
79
+ ### R
80
+ Quarto
81
+
82
+ ### JavaScript
83
+ ES6 import into script
84
+
85
+ ## License
86
+ Py-iCARE is open-source licensed under the MIT License.
87
+
88
+ ## References
89
+ 1. [Pal Choudhury, Parichoy, Paige Maas, Amber Wilcox, William Wheeler, Mark Brook, David Check, Montserrat Garcia-Closas, and Nilanjan Chatterjee. "iCARE: an R package to build, validate and apply absolute risk models." PloS one 15, no. 2 (2020): e0228198.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7001949/)
@@ -0,0 +1,52 @@
1
+ # Py-iCARE
2
+
3
+ **Py-iCARE** is a Python distribution of iCARE, a tool for **i**ndividualized **C**oherent **A**bsolute **R**isk **E**stimation. iCARE allows users to build, validate, and apply absolute risk models. [Absolute risk](https://www.cancer.gov/publications/dictionaries/cancer-terms/def/absolute-risk) quantifies the chance of an event occurring. For example, the likelihood that a healthy individual, of a given age and a risk factor profile, will develop the disease of interest over a specified time interval.
4
+
5
+ The original iCARE was written in R and its archived version (1.26.0) is available via Bioconductor at: https://www.bioconductor.org/packages/release/bioc/html/iCARE.html.
6
+
7
+ ## Motivation
8
+ The main motivation of porting iCARE from R to Python was to enable its use as a [WebAssembly](https://webassembly.org/) module (via [Pyodide](https://pyodide.org/en/latest/index.html)) for the proliferation of portable and privacy-preserving web applications that can build, validate, and apply absolute risk models. Python also enables researchers to leverage its rapidly evolving data science ecosystem— including [TensorFlow](https://www.tensorflow.org/), [PyTorch](https://pytorch.org/), [statsmodels](https://www.statsmodels.org/stable/index.html), and [scikit-learn](https://scikit-learn.org/stable/)— to explore novel absolute risk models that can incorporate evidence from wider sources of data.
9
+
10
+ ## Installation
11
+
12
+ This repository contains a Python package. It can be installed via PyPI as shown below. It is also compiled into WebAssembly via Pyodide. The wrapper JavaScript library, as ES6 modules, is also distributed in this repository at GitHub Pages. It can be accessed by any JavaScript runtime environment, including Node.js, web browsers, and Quarto notebooks in RStudio (to interface with R, Julia, and/or Python). Specifically, the steps to access it via JavaScript and R are also shown below.
13
+
14
+ ### Python
15
+
16
+ If you want to access iCARE from a purely Python runtime environment, you can install it via PyPI:
17
+
18
+ ```bash
19
+ pip install pyicare
20
+ ```
21
+
22
+ iCARE is supported on Python 3.7 and above.
23
+
24
+ ### JavaScript
25
+ ES6 import JS SDK via GitHub Pages.
26
+
27
+ ### R
28
+ ES6 import JS SDK via Quarto.
29
+
30
+ ## Usage
31
+
32
+ Once installed, Py-iCARE can be imported into your Python scripts as follows:
33
+
34
+ ```python
35
+ import icare
36
+ ```
37
+
38
+ Py-iCARE is a library with three main functions: 1) `compute_absolute_risk()`, a method to build and apply absolute risk models; 2) `compute_absolute_risk_split_interval()`, a method to build and apply absolute risk models that relaxes the proportional hazard assumption to some extent by allowing you to specify different model parameters before and after a cut-point in time; and 3) `validate_absolute_risk_model()`, a method to validate absolute risk models on an independent cohort study data or a case-control study nested within a cohort.
39
+
40
+ Example usages of these functions are shown in Jupyter notebooks at the [examples/Python](https://github.com/jeyabbalas/py-icare/tree/master/examples/Python) directory.
41
+
42
+ ### R
43
+ Quarto
44
+
45
+ ### JavaScript
46
+ ES6 import into script
47
+
48
+ ## License
49
+ Py-iCARE is open-source licensed under the MIT License.
50
+
51
+ ## References
52
+ 1. [Pal Choudhury, Parichoy, Paige Maas, Amber Wilcox, William Wheeler, Mark Brook, David Check, Montserrat Garcia-Closas, and Nilanjan Chatterjee. "iCARE: an R package to build, validate and apply absolute risk models." PloS one 15, no. 2 (2020): e0228198.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7001949/)
@@ -0,0 +1,4 @@
1
+ from icare.absolute_risk_main import compute_absolute_risk, compute_absolute_risk_split_interval, \
2
+ validate_absolute_risk_model
3
+
4
+ __version__ = "1.0.0"