genal-python 0.0.dev0__tar.gz → 0.2__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.
- genal_python-0.2/.gitignore +4 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/PKG-INFO +25 -12
- {genal_python-0.0.dev0 → genal_python-0.2}/README.md +24 -11
- genal_python-0.2/docs/Images/MR_plot_SBP_AS.png +0 -0
- genal_python-0.2/genal/.ipynb_checkpoints/Geno-checkpoint.py +1140 -0
- genal_python-0.2/genal/.ipynb_checkpoints/MR-checkpoint.py +740 -0
- genal_python-0.2/genal/.ipynb_checkpoints/MRpresso-checkpoint.py +289 -0
- genal_python-0.2/genal/.ipynb_checkpoints/__init__-checkpoint.py +20 -0
- genal_python-0.2/genal/.ipynb_checkpoints/association-checkpoint.py +332 -0
- genal_python-0.2/genal/.ipynb_checkpoints/geno_tools-checkpoint.py +407 -0
- genal_python-0.2/genal/.ipynb_checkpoints/tools-checkpoint.py +291 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/Geno.py +15 -16
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/MR.py +2 -2
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/MRpresso.py +1 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/__init__.py +4 -2
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/association.py +10 -8
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/geno_tools.py +12 -28
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/tools.py +11 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/pyproject.toml +1 -1
- genal_python-0.0.dev0/.gitignore +0 -2
- {genal_python-0.0.dev0 → genal_python-0.2}/LICENSE +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/Makefile +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/doctrees/environment.pickle +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/doctrees/index.doctree +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/doctrees/source/genal.doctree +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/doctrees/source/modules.doctree +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/.buildinfo +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_sources/index.rst.txt +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_sources/source/genal.rst.txt +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_sources/source/modules.rst.txt +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/basic.css +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/badge_only.css +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/lato-bold.woff +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/lato-normal.woff +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/css/theme.css +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/doctools.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/documentation_options.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/file.png +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/jquery.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/js/badge_only.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/js/html5shiv-printshiv.min.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/js/html5shiv.min.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/js/theme.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/language_data.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/minus.png +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/plus.png +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/pygments.css +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/searchtools.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/_static/sphinx_highlight.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/genindex.html +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/index.html +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/objects.inv +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/py-modindex.html +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/search.html +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/searchindex.js +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/source/genal.html +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/_build/html/source/modules.html +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/make.bat +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/requirements.txt +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/source/api.rst +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/source/conf.py +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/source/genal.rst +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/source/index.rst +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/source/introduction.rst +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/docs/source/modules.rst +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/MR_tools.py +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/clump.py +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/constants.py +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/extract_prs.py +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/lift.py +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/genal/proxy.py +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/gitignore +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/readthedocs.yaml +0 -0
- {genal_python-0.0.dev0 → genal_python-0.2}/requirements.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: genal-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2
|
|
4
4
|
Summary: A python toolkit for polygenic risk scoring and mendelian randomization.
|
|
5
5
|
Author-email: Cyprien Rivier <riviercyprien@gmail.com>
|
|
6
6
|
Requires-Python: >=3.7
|
|
@@ -24,7 +24,7 @@ Project-URL: Home, https://github.com/CypRiv/genal
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
**This project was
|
|
27
|
+
**This project was developed by Cyprien A. Rivier**
|
|
28
28
|
|
|
29
29
|
# Table of contents
|
|
30
30
|
1. [Introduction](#introduction)
|
|
@@ -51,7 +51,7 @@ The module prioritizes user-friendliness and intuitive operation, aiming to redu
|
|
|
51
51
|
Genal draws on concepts from well-established R packages such as TwoSampleMR, MR-Presso, MendelianRandomization, and gwasvcf, adapting their proven methodologies to the Python environment. This approach ensures that users have access to tried and tested techniques with the versatility of Python's data science tools.
|
|
52
52
|
|
|
53
53
|
## Requirements for the GENAL module <a name="paragraph1"></a>
|
|
54
|
-
***Python 3.
|
|
54
|
+
***Python 3.9 or later***. https://www.python.org/ <br>
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
## Installation and How to use the GENAL module <a name="paragraph2"></a>
|
|
@@ -60,7 +60,11 @@ Genal draws on concepts from well-established R packages such as TwoSampleMR, MR
|
|
|
60
60
|
|
|
61
61
|
Download and install the package with pip:
|
|
62
62
|
```
|
|
63
|
-
pip install genal
|
|
63
|
+
pip install genal-python
|
|
64
|
+
```
|
|
65
|
+
And it can be imported in a python environment with:
|
|
66
|
+
```python
|
|
67
|
+
import genal
|
|
64
68
|
```
|
|
65
69
|
|
|
66
70
|
The main genal functionalities require a working installation of PLINK v1.9 that can be downloaded here: https://www.cog-genomics.org/plink/
|
|
@@ -81,6 +85,7 @@ For this tutorial, we will build a Polygenic Risk Score (PRS) for systolic blood
|
|
|
81
85
|
- Include risk score calculations with proxies
|
|
82
86
|
- Perform Mendelian Randomization
|
|
83
87
|
- Analyze SBP as an exposure and acute ischemic stroke as an outcome
|
|
88
|
+
- Plot the results
|
|
84
89
|
- Conduct sensitivity analyses using the weighted median, MR-Egger, and MR-PRESSO methods
|
|
85
90
|
- Calibrate SNP-trait weights with individual-level genetic data
|
|
86
91
|
- Execute single-SNP association tests for calibrating SBP genetic instruments
|
|
@@ -155,15 +160,15 @@ Now that we have loaded the data into a `genal.Geno` object, we can begin cleani
|
|
|
155
160
|
Genal can run all the basic cleaning and preprocessing steps in one command:
|
|
156
161
|
|
|
157
162
|
```python
|
|
158
|
-
SBP_Geno.preprocess_data(preprocessing =
|
|
163
|
+
SBP_Geno.preprocess_data(preprocessing = 'Fill_delete')
|
|
159
164
|
```
|
|
160
165
|
|
|
161
166
|
The `preprocessing` argument specifies the global level of preprocessing applied to the data:
|
|
162
|
-
- `preprocessing =
|
|
163
|
-
- `preprocessing =
|
|
164
|
-
- `preprocessing =
|
|
167
|
+
- `preprocessing = 'None'`: The data won't be modified.
|
|
168
|
+
- `preprocessing = 'Fill'`: Missing columns will be added based on reference data and invalid values set to NaN, but no rows will be deleted.
|
|
169
|
+
- `preprocessing = 'Fill_delete'`: Missing columns will be added, and all rows containing missing, duplicated, or invalid values will be deleted. This option is recommended before running genetic methods.
|
|
165
170
|
|
|
166
|
-
By default, and depending on the global preprocessing level (
|
|
171
|
+
By default, and depending on the global preprocessing level ('None', 'Fill', 'Fill_delete') chosen, the `preprocess_data` method of `genal.Geno` will run the following checks:
|
|
167
172
|
- Ensure the CHR (chromosome) and POS (genomic position) columns are integers.
|
|
168
173
|
- Ensure the EA (effect allele) and NEA (non-effect allele) columns are uppercase characters containing A, T, C, G letters. Multiallelic values are set to NaN.
|
|
169
174
|
- Validate the P (p-value) column for proper values.
|
|
@@ -202,7 +207,7 @@ And we see that the SNP column with the rsids has been added based on the refere
|
|
|
202
207
|
You do not need to obtain the 1000 genome reference panel yourself, Genal will download it the first time you use it. By default, the reference panel used is the european (eur) one. You can specify another valid reference panel (afr, eas, sas, amr) with the reference_panel argument:
|
|
203
208
|
|
|
204
209
|
```python
|
|
205
|
-
SBP_Geno.preprocess_data(preprocessing =
|
|
210
|
+
SBP_Geno.preprocess_data(preprocessing = 'Fill_delete', reference_panel = "afr")
|
|
206
211
|
```
|
|
207
212
|
|
|
208
213
|
You can also use a custom reference panel by specifying to the reference_panel argument a path to bed/bim/fam files (without the extension).
|
|
@@ -366,7 +371,7 @@ Stroke_Geno = genal.Geno(stroke_gwas, CHR = "chromosome", POS = "base_pair_locat
|
|
|
366
371
|
We preprocess it as well to put it in the correct format and make sure there is no invalid values:
|
|
367
372
|
|
|
368
373
|
```python
|
|
369
|
-
Stroke_Geno.preprocess_data(preprocessing =
|
|
374
|
+
Stroke_Geno.preprocess_data(preprocessing = 'Fill_delete')
|
|
370
375
|
```
|
|
371
376
|
|
|
372
377
|
Now, we need to extract our instruments (SNPs of the SBP_clumped data) from the outcome data to obtain their association with the outcome trait (stroke). It can be done by calling the `genal.Geno.query_outcome` method:
|
|
@@ -431,8 +436,16 @@ By default, all MR methods (inverse-variance weighted, weighted median, MR-Egger
|
|
|
431
436
|
|
|
432
437
|
For more fine-tuning, such as settings for the number of boostrapping iterations, please refer to the API.
|
|
433
438
|
|
|
434
|
-
If you
|
|
439
|
+
If you want to visualize the obtained MR results, you can use the `genal.Geno.MR_plot` method that will plot each SNP in an effect_on_exposure x effect_on_outcome plane as well as lines corresponding to different MR methods:
|
|
440
|
+
|
|
441
|
+
```python
|
|
442
|
+
SBP_clumped.MR_plot(filename="MR_plot_SBP_AS")
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+

|
|
446
|
+
You can select which MR methods you wish to plot with the 'methods' argument. Note that for an MR method to be plotted, they must be included in the latest `genal.Geno.MR` call of this `genal.Geno` object.
|
|
435
447
|
|
|
448
|
+
If you wish to include the heterogeneity values (Cochran's Q) in the results, you can use the heterogeneity argument in the `genal.Geno.MR` call. Here, the heterogeneity for the inverse-variance weighted method:
|
|
436
449
|
|
|
437
450
|
```python
|
|
438
451
|
SBP_clumped.MR(action = 3, methods = ["IVW"], exposure_name = "SBP", outcome_name = "Stroke_eur", heterogeneity = True)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
**This project was
|
|
5
|
+
**This project was developed by Cyprien A. Rivier**
|
|
6
6
|
|
|
7
7
|
# Table of contents
|
|
8
8
|
1. [Introduction](#introduction)
|
|
@@ -29,7 +29,7 @@ The module prioritizes user-friendliness and intuitive operation, aiming to redu
|
|
|
29
29
|
Genal draws on concepts from well-established R packages such as TwoSampleMR, MR-Presso, MendelianRandomization, and gwasvcf, adapting their proven methodologies to the Python environment. This approach ensures that users have access to tried and tested techniques with the versatility of Python's data science tools.
|
|
30
30
|
|
|
31
31
|
## Requirements for the GENAL module <a name="paragraph1"></a>
|
|
32
|
-
***Python 3.
|
|
32
|
+
***Python 3.9 or later***. https://www.python.org/ <br>
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
## Installation and How to use the GENAL module <a name="paragraph2"></a>
|
|
@@ -38,7 +38,11 @@ Genal draws on concepts from well-established R packages such as TwoSampleMR, MR
|
|
|
38
38
|
|
|
39
39
|
Download and install the package with pip:
|
|
40
40
|
```
|
|
41
|
-
pip install genal
|
|
41
|
+
pip install genal-python
|
|
42
|
+
```
|
|
43
|
+
And it can be imported in a python environment with:
|
|
44
|
+
```python
|
|
45
|
+
import genal
|
|
42
46
|
```
|
|
43
47
|
|
|
44
48
|
The main genal functionalities require a working installation of PLINK v1.9 that can be downloaded here: https://www.cog-genomics.org/plink/
|
|
@@ -59,6 +63,7 @@ For this tutorial, we will build a Polygenic Risk Score (PRS) for systolic blood
|
|
|
59
63
|
- Include risk score calculations with proxies
|
|
60
64
|
- Perform Mendelian Randomization
|
|
61
65
|
- Analyze SBP as an exposure and acute ischemic stroke as an outcome
|
|
66
|
+
- Plot the results
|
|
62
67
|
- Conduct sensitivity analyses using the weighted median, MR-Egger, and MR-PRESSO methods
|
|
63
68
|
- Calibrate SNP-trait weights with individual-level genetic data
|
|
64
69
|
- Execute single-SNP association tests for calibrating SBP genetic instruments
|
|
@@ -133,15 +138,15 @@ Now that we have loaded the data into a `genal.Geno` object, we can begin cleani
|
|
|
133
138
|
Genal can run all the basic cleaning and preprocessing steps in one command:
|
|
134
139
|
|
|
135
140
|
```python
|
|
136
|
-
SBP_Geno.preprocess_data(preprocessing =
|
|
141
|
+
SBP_Geno.preprocess_data(preprocessing = 'Fill_delete')
|
|
137
142
|
```
|
|
138
143
|
|
|
139
144
|
The `preprocessing` argument specifies the global level of preprocessing applied to the data:
|
|
140
|
-
- `preprocessing =
|
|
141
|
-
- `preprocessing =
|
|
142
|
-
- `preprocessing =
|
|
145
|
+
- `preprocessing = 'None'`: The data won't be modified.
|
|
146
|
+
- `preprocessing = 'Fill'`: Missing columns will be added based on reference data and invalid values set to NaN, but no rows will be deleted.
|
|
147
|
+
- `preprocessing = 'Fill_delete'`: Missing columns will be added, and all rows containing missing, duplicated, or invalid values will be deleted. This option is recommended before running genetic methods.
|
|
143
148
|
|
|
144
|
-
By default, and depending on the global preprocessing level (
|
|
149
|
+
By default, and depending on the global preprocessing level ('None', 'Fill', 'Fill_delete') chosen, the `preprocess_data` method of `genal.Geno` will run the following checks:
|
|
145
150
|
- Ensure the CHR (chromosome) and POS (genomic position) columns are integers.
|
|
146
151
|
- Ensure the EA (effect allele) and NEA (non-effect allele) columns are uppercase characters containing A, T, C, G letters. Multiallelic values are set to NaN.
|
|
147
152
|
- Validate the P (p-value) column for proper values.
|
|
@@ -180,7 +185,7 @@ And we see that the SNP column with the rsids has been added based on the refere
|
|
|
180
185
|
You do not need to obtain the 1000 genome reference panel yourself, Genal will download it the first time you use it. By default, the reference panel used is the european (eur) one. You can specify another valid reference panel (afr, eas, sas, amr) with the reference_panel argument:
|
|
181
186
|
|
|
182
187
|
```python
|
|
183
|
-
SBP_Geno.preprocess_data(preprocessing =
|
|
188
|
+
SBP_Geno.preprocess_data(preprocessing = 'Fill_delete', reference_panel = "afr")
|
|
184
189
|
```
|
|
185
190
|
|
|
186
191
|
You can also use a custom reference panel by specifying to the reference_panel argument a path to bed/bim/fam files (without the extension).
|
|
@@ -344,7 +349,7 @@ Stroke_Geno = genal.Geno(stroke_gwas, CHR = "chromosome", POS = "base_pair_locat
|
|
|
344
349
|
We preprocess it as well to put it in the correct format and make sure there is no invalid values:
|
|
345
350
|
|
|
346
351
|
```python
|
|
347
|
-
Stroke_Geno.preprocess_data(preprocessing =
|
|
352
|
+
Stroke_Geno.preprocess_data(preprocessing = 'Fill_delete')
|
|
348
353
|
```
|
|
349
354
|
|
|
350
355
|
Now, we need to extract our instruments (SNPs of the SBP_clumped data) from the outcome data to obtain their association with the outcome trait (stroke). It can be done by calling the `genal.Geno.query_outcome` method:
|
|
@@ -409,8 +414,16 @@ By default, all MR methods (inverse-variance weighted, weighted median, MR-Egger
|
|
|
409
414
|
|
|
410
415
|
For more fine-tuning, such as settings for the number of boostrapping iterations, please refer to the API.
|
|
411
416
|
|
|
412
|
-
If you
|
|
417
|
+
If you want to visualize the obtained MR results, you can use the `genal.Geno.MR_plot` method that will plot each SNP in an effect_on_exposure x effect_on_outcome plane as well as lines corresponding to different MR methods:
|
|
418
|
+
|
|
419
|
+
```python
|
|
420
|
+
SBP_clumped.MR_plot(filename="MR_plot_SBP_AS")
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+

|
|
424
|
+
You can select which MR methods you wish to plot with the 'methods' argument. Note that for an MR method to be plotted, they must be included in the latest `genal.Geno.MR` call of this `genal.Geno` object.
|
|
413
425
|
|
|
426
|
+
If you wish to include the heterogeneity values (Cochran's Q) in the results, you can use the heterogeneity argument in the `genal.Geno.MR` call. Here, the heterogeneity for the inverse-variance weighted method:
|
|
414
427
|
|
|
415
428
|
```python
|
|
416
429
|
SBP_clumped.MR(action = 3, methods = ["IVW"], exposure_name = "SBP", outcome_name = "Stroke_eur", heterogeneity = True)
|
|
Binary file
|