genal-python 1.1__tar.gz → 1.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-1.1 → genal_python-1.2}/PKG-INFO +9 -51
- {genal_python-1.1 → genal_python-1.2}/README.md +8 -50
- {genal_python-1.1 → genal_python-1.2}/docs/source/index.rst +1 -1
- {genal_python-1.1 → genal_python-1.2}/docs/source/introduction.rst +5 -43
- {genal_python-1.1 → genal_python-1.2}/genal/Geno.py +145 -117
- {genal_python-1.1 → genal_python-1.2}/genal/MR_tools.py +152 -137
- {genal_python-1.1 → genal_python-1.2}/genal/MRpresso.py +8 -5
- {genal_python-1.1 → genal_python-1.2}/genal/__init__.py +1 -1
- {genal_python-1.1 → genal_python-1.2}/genal/clump.py +10 -4
- {genal_python-1.1 → genal_python-1.2}/genal/extract_prs.py +68 -52
- {genal_python-1.1 → genal_python-1.2}/genal/geno_tools.py +7 -3
- {genal_python-1.1 → genal_python-1.2}/genal/proxy.py +4 -1
- {genal_python-1.1 → genal_python-1.2}/pyproject.toml +1 -1
- {genal_python-1.1 → genal_python-1.2}/.DS_Store +0 -0
- {genal_python-1.1 → genal_python-1.2}/.gitignore +0 -0
- {genal_python-1.1 → genal_python-1.2}/.readthedocs.yaml +0 -0
- {genal_python-1.1 → genal_python-1.2}/Genal_flowchart.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/LICENSE +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/.DS_Store +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/Makefile +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/.DS_Store +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/.buildinfo +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/.doctrees/api.doctree +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/.doctrees/environment.pickle +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/.doctrees/genal.doctree +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/.doctrees/index.doctree +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/.doctrees/introduction.doctree +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/.doctrees/modules.doctree +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_images/MR_plot_SBP_AS.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/Geno.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/MR.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/MR_tools.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/MRpresso.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/association.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/clump.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/extract_prs.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/geno_tools.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/lift.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/proxy.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/snp_query.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/genal/tools.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_modules/index.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_sources/api.rst.txt +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_sources/genal.rst.txt +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_sources/index.rst.txt +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_sources/introduction.rst.txt +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_sources/modules.rst.txt +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/basic.css +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/badge_only.css +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/lato-bold-italic.woff +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/lato-bold.woff +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/lato-bold.woff2 +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/lato-normal-italic.woff +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/lato-normal.woff +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/fonts/lato-normal.woff2 +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/css/theme.css +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/doctools.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/documentation_options.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/file.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/js/badge_only.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/js/html5shiv-printshiv.min.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/js/html5shiv.min.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/js/theme.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/language_data.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/minus.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/plus.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/pygments.css +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/searchtools.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/_static/sphinx_highlight.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/api.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/genal.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/genindex.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/index.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/introduction.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/modules.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/objects.inv +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/py-modindex.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/search.html +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/build/searchindex.js +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/make.bat +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/requirements.txt +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/source/.DS_Store +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/source/Images/Genal_flowchart.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/source/Images/MR_plot_SBP_AS.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/source/Images/genal_logo.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/source/api.rst +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/source/conf.py +0 -0
- {genal_python-1.1 → genal_python-1.2}/docs/source/modules.rst +0 -0
- {genal_python-1.1 → genal_python-1.2}/genal/MR.py +0 -0
- {genal_python-1.1 → genal_python-1.2}/genal/association.py +0 -0
- {genal_python-1.1 → genal_python-1.2}/genal/constants.py +0 -0
- {genal_python-1.1 → genal_python-1.2}/genal/lift.py +0 -0
- {genal_python-1.1 → genal_python-1.2}/genal/snp_query.py +0 -0
- {genal_python-1.1 → genal_python-1.2}/genal/tools.py +0 -0
- {genal_python-1.1 → genal_python-1.2}/genal_logo.png +0 -0
- {genal_python-1.1 → genal_python-1.2}/gitignore +0 -0
- {genal_python-1.1 → genal_python-1.2}/readthedocs.yaml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: genal-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.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.8
|
|
@@ -29,10 +29,6 @@ Project-URL: Home, https://github.com/CypRiv/genal
|
|
|
29
29
|
<center><h1> genal: A Python Toolkit for Genetic Risk Scoring and Mendelian Randomization </h1></center>
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
**This project was developed by Cyprien A. Rivier**
|
|
34
|
-
|
|
35
|
-
|
|
36
32
|
# Table of contents
|
|
37
33
|
1. [Introduction](#introduction)
|
|
38
34
|
2. [Citation](#citation)
|
|
@@ -62,6 +58,7 @@ Genal draws on concepts from well-established R packages such as TwoSampleMR, MR
|
|
|
62
58
|
|
|
63
59
|
Genal flowchart. Created in https://www.BioRender.com
|
|
64
60
|
## Citation <a name="citation"></a>
|
|
61
|
+
This project was developed by Cyprien A. Rivier.
|
|
65
62
|
If you're using genal, please cite the following paper:
|
|
66
63
|
**Genal: A Python Toolkit for Genetic Risk Scoring and Mendelian Randomization.**
|
|
67
64
|
Cyprien A. Rivier, Santiago Clocchiatti-Tuozzo, Shufan Huo, Victor Torres-Lopez, Daniela Renedo, Kevin N. Sheth, Guido J. Falcone, Julian N. Acosta.
|
|
@@ -350,26 +347,7 @@ and the output is:
|
|
|
350
347
|
7(0.455%) duplicated SNPs have been removed. Use keep_dups=True to keep them.
|
|
351
348
|
Extracting SNPs for each chromosome...
|
|
352
349
|
SNPs extracted for chr1.
|
|
353
|
-
|
|
354
|
-
SNPs extracted for chr3.
|
|
355
|
-
SNPs extracted for chr4.
|
|
356
|
-
SNPs extracted for chr5.
|
|
357
|
-
SNPs extracted for chr6.
|
|
358
|
-
SNPs extracted for chr7.
|
|
359
|
-
SNPs extracted for chr8.
|
|
360
|
-
SNPs extracted for chr9.
|
|
361
|
-
SNPs extracted for chr10.
|
|
362
|
-
SNPs extracted for chr11.
|
|
363
|
-
SNPs extracted for chr12.
|
|
364
|
-
SNPs extracted for chr13.
|
|
365
|
-
SNPs extracted for chr14.
|
|
366
|
-
SNPs extracted for chr15.
|
|
367
|
-
SNPs extracted for chr16.
|
|
368
|
-
SNPs extracted for chr17.
|
|
369
|
-
SNPs extracted for chr18.
|
|
370
|
-
SNPs extracted for chr19.
|
|
371
|
-
SNPs extracted for chr20.
|
|
372
|
-
SNPs extracted for chr21.
|
|
350
|
+
...
|
|
373
351
|
SNPs extracted for chr22.
|
|
374
352
|
Merging SNPs extracted from each chromosome...
|
|
375
353
|
Created bed/bim/fam fileset with extracted SNPs: tmp_GENAL/4f4ce6a7_allchr
|
|
@@ -438,7 +416,6 @@ Genal will print how many SNPs were successfully found and extracted from the ou
|
|
|
438
416
|
|
|
439
417
|
|
|
440
418
|
> **Note:**
|
|
441
|
-
>Here as well you have the option to use proxies for the instruments that are not present in the outcome data:
|
|
442
419
|
>
|
|
443
420
|
> Here as well you have the option to use proxies for the instruments that are not present in the outcome data:
|
|
444
421
|
>
|
|
@@ -482,7 +459,7 @@ You can specify several arguments. We refer to the API for a full list, but the
|
|
|
482
459
|
- `action = 2`: Uses effect allele frequencies to attempt to flip them (conservative, default)
|
|
483
460
|
- `action = 3`: Removes all palindromic SNPs (very conservative)
|
|
484
461
|
|
|
485
|
-
|
|
462
|
+
When choosing the option 2 or 3 (recommended), genal will print the list of palindromic SNPs that have been removed from the analysis.
|
|
486
463
|
|
|
487
464
|
By default, only some MR methods (inverse-variance weighted, weighted median, Simple mode, MR-Egger) are going to be run. But if you wish to run a different set of MR methods, you can pass a list of strings to the `methods` argument. The possible strings are:
|
|
488
465
|
- `IVW` for the classical Inverse-Variance Weighted method with random effects
|
|
@@ -499,7 +476,7 @@ By default, only some MR methods (inverse-variance weighted, weighted median, Si
|
|
|
499
476
|
- `Weighted-mode` for the Weighted mode method
|
|
500
477
|
- `all` to run all the above methods
|
|
501
478
|
|
|
502
|
-
For more fine-tuning, such as settings for the number of boostrapping iterations, please refer to the API: [https://genal.readthedocs.io/en/latest/modules.html#id4](MR method).
|
|
479
|
+
For more fine-tuning, such as settings for the number of boostrapping iterations, please refer to the API: [https://genal.readthedocs.io/en/latest/modules.html#id4] (MR method).
|
|
503
480
|
|
|
504
481
|
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:
|
|
505
482
|
|
|
@@ -508,9 +485,9 @@ SBP_clumped.MR_plot(filename="MR_plot_SBP_AS")
|
|
|
508
485
|
```
|
|
509
486
|
|
|
510
487
|

|
|
511
|
-
You can select which MR methods
|
|
488
|
+
You can select which MR methods 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` instance.
|
|
512
489
|
|
|
513
|
-
|
|
490
|
+
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:
|
|
514
491
|
|
|
515
492
|
```python
|
|
516
493
|
SBP_clumped.MR(action = 2, methods = ["Egger","IVW"], exposure_name = "SBP", outcome_name = "Stroke_eur", heterogeneity = True)
|
|
@@ -523,7 +500,7 @@ And that will give:
|
|
|
523
500
|
| SBP | Stroke_eur | Egger Intercept | 1499 | -0.001381 | 0.000813 | 8.935529e-02 | 2959.965136 | 1497 | 1.253763e-98 |
|
|
524
501
|
| SBP | Stroke_eur | Inverse-Variance Weighted| 1499 | 0.023049 | 0.001061 | 1.382645e-104 | 2965.678836 | 1498 | 4.280737e-99 |
|
|
525
502
|
|
|
526
|
-
|
|
503
|
+
To display the coefficients as odds ratios with confidence intervals for a binary outcome trait, you can use the `odds = True` argument:
|
|
527
504
|
|
|
528
505
|
```python
|
|
529
506
|
SBP_clumped.MR(action = 2, methods = ["Egger","IVW"], exposure_name = "SBP", outcome_name = "Stroke_eur", heterogeneity = True, odds = True)
|
|
@@ -589,26 +566,7 @@ Genal will print information regarding the number of individuals used in the tes
|
|
|
589
566
|
CHR/POS columns present: SNPs searched based on genomic positions.
|
|
590
567
|
Extracting SNPs for each chromosome...
|
|
591
568
|
SNPs extracted for chr1.
|
|
592
|
-
|
|
593
|
-
SNPs extracted for chr3.
|
|
594
|
-
SNPs extracted for chr4.
|
|
595
|
-
SNPs extracted for chr5.
|
|
596
|
-
SNPs extracted for chr6.
|
|
597
|
-
SNPs extracted for chr7.
|
|
598
|
-
SNPs extracted for chr8.
|
|
599
|
-
SNPs extracted for chr9.
|
|
600
|
-
SNPs extracted for chr10.
|
|
601
|
-
SNPs extracted for chr11.
|
|
602
|
-
SNPs extracted for chr12.
|
|
603
|
-
SNPs extracted for chr13.
|
|
604
|
-
SNPs extracted for chr14.
|
|
605
|
-
SNPs extracted for chr15.
|
|
606
|
-
SNPs extracted for chr16.
|
|
607
|
-
SNPs extracted for chr17.
|
|
608
|
-
SNPs extracted for chr18.
|
|
609
|
-
SNPs extracted for chr19.
|
|
610
|
-
SNPs extracted for chr20.
|
|
611
|
-
SNPs extracted for chr21.
|
|
569
|
+
...
|
|
612
570
|
SNPs extracted for chr22.
|
|
613
571
|
Merging SNPs extracted from each chromosome...
|
|
614
572
|
Created bed/bim/fam fileset with extracted SNPs: tmp_GENAL/e415aab3_allchr
|
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
<center><h1> genal: A Python Toolkit for Genetic Risk Scoring and Mendelian Randomization </h1></center>
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
**This project was developed by Cyprien A. Rivier**
|
|
10
|
-
|
|
11
|
-
|
|
12
8
|
# Table of contents
|
|
13
9
|
1. [Introduction](#introduction)
|
|
14
10
|
2. [Citation](#citation)
|
|
@@ -38,6 +34,7 @@ Genal draws on concepts from well-established R packages such as TwoSampleMR, MR
|
|
|
38
34
|
|
|
39
35
|
Genal flowchart. Created in https://www.BioRender.com
|
|
40
36
|
## Citation <a name="citation"></a>
|
|
37
|
+
This project was developed by Cyprien A. Rivier.
|
|
41
38
|
If you're using genal, please cite the following paper:
|
|
42
39
|
**Genal: A Python Toolkit for Genetic Risk Scoring and Mendelian Randomization.**
|
|
43
40
|
Cyprien A. Rivier, Santiago Clocchiatti-Tuozzo, Shufan Huo, Victor Torres-Lopez, Daniela Renedo, Kevin N. Sheth, Guido J. Falcone, Julian N. Acosta.
|
|
@@ -326,26 +323,7 @@ and the output is:
|
|
|
326
323
|
7(0.455%) duplicated SNPs have been removed. Use keep_dups=True to keep them.
|
|
327
324
|
Extracting SNPs for each chromosome...
|
|
328
325
|
SNPs extracted for chr1.
|
|
329
|
-
|
|
330
|
-
SNPs extracted for chr3.
|
|
331
|
-
SNPs extracted for chr4.
|
|
332
|
-
SNPs extracted for chr5.
|
|
333
|
-
SNPs extracted for chr6.
|
|
334
|
-
SNPs extracted for chr7.
|
|
335
|
-
SNPs extracted for chr8.
|
|
336
|
-
SNPs extracted for chr9.
|
|
337
|
-
SNPs extracted for chr10.
|
|
338
|
-
SNPs extracted for chr11.
|
|
339
|
-
SNPs extracted for chr12.
|
|
340
|
-
SNPs extracted for chr13.
|
|
341
|
-
SNPs extracted for chr14.
|
|
342
|
-
SNPs extracted for chr15.
|
|
343
|
-
SNPs extracted for chr16.
|
|
344
|
-
SNPs extracted for chr17.
|
|
345
|
-
SNPs extracted for chr18.
|
|
346
|
-
SNPs extracted for chr19.
|
|
347
|
-
SNPs extracted for chr20.
|
|
348
|
-
SNPs extracted for chr21.
|
|
326
|
+
...
|
|
349
327
|
SNPs extracted for chr22.
|
|
350
328
|
Merging SNPs extracted from each chromosome...
|
|
351
329
|
Created bed/bim/fam fileset with extracted SNPs: tmp_GENAL/4f4ce6a7_allchr
|
|
@@ -414,7 +392,6 @@ Genal will print how many SNPs were successfully found and extracted from the ou
|
|
|
414
392
|
|
|
415
393
|
|
|
416
394
|
> **Note:**
|
|
417
|
-
>Here as well you have the option to use proxies for the instruments that are not present in the outcome data:
|
|
418
395
|
>
|
|
419
396
|
> Here as well you have the option to use proxies for the instruments that are not present in the outcome data:
|
|
420
397
|
>
|
|
@@ -458,7 +435,7 @@ You can specify several arguments. We refer to the API for a full list, but the
|
|
|
458
435
|
- `action = 2`: Uses effect allele frequencies to attempt to flip them (conservative, default)
|
|
459
436
|
- `action = 3`: Removes all palindromic SNPs (very conservative)
|
|
460
437
|
|
|
461
|
-
|
|
438
|
+
When choosing the option 2 or 3 (recommended), genal will print the list of palindromic SNPs that have been removed from the analysis.
|
|
462
439
|
|
|
463
440
|
By default, only some MR methods (inverse-variance weighted, weighted median, Simple mode, MR-Egger) are going to be run. But if you wish to run a different set of MR methods, you can pass a list of strings to the `methods` argument. The possible strings are:
|
|
464
441
|
- `IVW` for the classical Inverse-Variance Weighted method with random effects
|
|
@@ -475,7 +452,7 @@ By default, only some MR methods (inverse-variance weighted, weighted median, Si
|
|
|
475
452
|
- `Weighted-mode` for the Weighted mode method
|
|
476
453
|
- `all` to run all the above methods
|
|
477
454
|
|
|
478
|
-
For more fine-tuning, such as settings for the number of boostrapping iterations, please refer to the API: [https://genal.readthedocs.io/en/latest/modules.html#id4](MR method).
|
|
455
|
+
For more fine-tuning, such as settings for the number of boostrapping iterations, please refer to the API: [https://genal.readthedocs.io/en/latest/modules.html#id4] (MR method).
|
|
479
456
|
|
|
480
457
|
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:
|
|
481
458
|
|
|
@@ -484,9 +461,9 @@ SBP_clumped.MR_plot(filename="MR_plot_SBP_AS")
|
|
|
484
461
|
```
|
|
485
462
|
|
|
486
463
|

|
|
487
|
-
You can select which MR methods
|
|
464
|
+
You can select which MR methods 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` instance.
|
|
488
465
|
|
|
489
|
-
|
|
466
|
+
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:
|
|
490
467
|
|
|
491
468
|
```python
|
|
492
469
|
SBP_clumped.MR(action = 2, methods = ["Egger","IVW"], exposure_name = "SBP", outcome_name = "Stroke_eur", heterogeneity = True)
|
|
@@ -499,7 +476,7 @@ And that will give:
|
|
|
499
476
|
| SBP | Stroke_eur | Egger Intercept | 1499 | -0.001381 | 0.000813 | 8.935529e-02 | 2959.965136 | 1497 | 1.253763e-98 |
|
|
500
477
|
| SBP | Stroke_eur | Inverse-Variance Weighted| 1499 | 0.023049 | 0.001061 | 1.382645e-104 | 2965.678836 | 1498 | 4.280737e-99 |
|
|
501
478
|
|
|
502
|
-
|
|
479
|
+
To display the coefficients as odds ratios with confidence intervals for a binary outcome trait, you can use the `odds = True` argument:
|
|
503
480
|
|
|
504
481
|
```python
|
|
505
482
|
SBP_clumped.MR(action = 2, methods = ["Egger","IVW"], exposure_name = "SBP", outcome_name = "Stroke_eur", heterogeneity = True, odds = True)
|
|
@@ -565,26 +542,7 @@ Genal will print information regarding the number of individuals used in the tes
|
|
|
565
542
|
CHR/POS columns present: SNPs searched based on genomic positions.
|
|
566
543
|
Extracting SNPs for each chromosome...
|
|
567
544
|
SNPs extracted for chr1.
|
|
568
|
-
|
|
569
|
-
SNPs extracted for chr3.
|
|
570
|
-
SNPs extracted for chr4.
|
|
571
|
-
SNPs extracted for chr5.
|
|
572
|
-
SNPs extracted for chr6.
|
|
573
|
-
SNPs extracted for chr7.
|
|
574
|
-
SNPs extracted for chr8.
|
|
575
|
-
SNPs extracted for chr9.
|
|
576
|
-
SNPs extracted for chr10.
|
|
577
|
-
SNPs extracted for chr11.
|
|
578
|
-
SNPs extracted for chr12.
|
|
579
|
-
SNPs extracted for chr13.
|
|
580
|
-
SNPs extracted for chr14.
|
|
581
|
-
SNPs extracted for chr15.
|
|
582
|
-
SNPs extracted for chr16.
|
|
583
|
-
SNPs extracted for chr17.
|
|
584
|
-
SNPs extracted for chr18.
|
|
585
|
-
SNPs extracted for chr19.
|
|
586
|
-
SNPs extracted for chr20.
|
|
587
|
-
SNPs extracted for chr21.
|
|
545
|
+
...
|
|
588
546
|
SNPs extracted for chr22.
|
|
589
547
|
Merging SNPs extracted from each chromosome...
|
|
590
548
|
Created bed/bim/fam fileset with extracted SNPs: tmp_GENAL/e415aab3_allchr
|
|
@@ -12,7 +12,7 @@ genal: A Python Toolkit for Genetic Risk Scoring and Mendelian Randomization
|
|
|
12
12
|
|
|
13
13
|
:Author: Cyprien A. Rivier
|
|
14
14
|
:Date: |today|
|
|
15
|
-
:Version: "1.
|
|
15
|
+
:Version: "1.2"
|
|
16
16
|
|
|
17
17
|
Genal is a python module designed to make it easy to run genetic risk scores and mendelian randomization analyses. It integrates a collection of tools that facilitate the cleaning of single nucleotide polymorphism data (usually derived from Genome-Wide Association Studies) and enable the execution of key clinical population genetic workflows. The functionalities provided by genal include clumping, lifting, association testing, polygenic risk scoring, and Mendelian randomization analyses, all within a single Python module.
|
|
18
18
|
|
|
@@ -281,26 +281,7 @@ and the output is::
|
|
|
281
281
|
7(0.455%) duplicated SNPs have been removed. Use keep_dups=True to keep them.
|
|
282
282
|
Extracting SNPs for each chromosome...
|
|
283
283
|
SNPs extracted for chr1.
|
|
284
|
-
|
|
285
|
-
SNPs extracted for chr3.
|
|
286
|
-
SNPs extracted for chr4.
|
|
287
|
-
SNPs extracted for chr5.
|
|
288
|
-
SNPs extracted for chr6.
|
|
289
|
-
SNPs extracted for chr7.
|
|
290
|
-
SNPs extracted for chr8.
|
|
291
|
-
SNPs extracted for chr9.
|
|
292
|
-
SNPs extracted for chr10.
|
|
293
|
-
SNPs extracted for chr11.
|
|
294
|
-
SNPs extracted for chr12.
|
|
295
|
-
SNPs extracted for chr13.
|
|
296
|
-
SNPs extracted for chr14.
|
|
297
|
-
SNPs extracted for chr15.
|
|
298
|
-
SNPs extracted for chr16.
|
|
299
|
-
SNPs extracted for chr17.
|
|
300
|
-
SNPs extracted for chr18.
|
|
301
|
-
SNPs extracted for chr19.
|
|
302
|
-
SNPs extracted for chr20.
|
|
303
|
-
SNPs extracted for chr21.
|
|
284
|
+
...
|
|
304
285
|
SNPs extracted for chr22.
|
|
305
286
|
Merging SNPs extracted from each chromosome...
|
|
306
287
|
Created bed/bim/fam fileset with extracted SNPs: tmp_GENAL/4f4ce6a7_allchr
|
|
@@ -453,9 +434,9 @@ If you want to visualize the obtained MR results, you can use the :meth:`~genal.
|
|
|
453
434
|
.. image:: Images/MR_plot_SBP_AS.png
|
|
454
435
|
:alt: MR plot
|
|
455
436
|
|
|
456
|
-
You can select which MR methods
|
|
437
|
+
You can select which MR methods to plot with the ``methods`` argument. Note that for an MR method to be plotted, they must be included in the latest :meth:`~genal.Geno.MR` call of this :class:`~genal.Geno` instance.
|
|
457
438
|
|
|
458
|
-
|
|
439
|
+
To include the heterogeneity values (Cochran's Q) in the results, you can use the heterogeneity argument in the :meth:`~genal.Geno.MR` call. Here, the heterogeneity for the inverse-variance weighted method:
|
|
459
440
|
|
|
460
441
|
.. code-block:: python
|
|
461
442
|
|
|
@@ -470,7 +451,7 @@ And that will give:
|
|
|
470
451
|
1 SBP Stroke_eur Egger Intercept 1499 -0.001381 0.000813 8.935529e-02 2959.965136 1497 1.253763e-98
|
|
471
452
|
2 SBP Stroke_eur Inverse-Variance Weighted 1499 0.023049 0.001061 1.382645e-104 2965.678836 1498 4.280737e-99
|
|
472
453
|
|
|
473
|
-
|
|
454
|
+
To display the coefficients as odds ratios with confidence intervals for a binary outcome trait, you can use the `odds = True` argument:
|
|
474
455
|
|
|
475
456
|
.. code-block:: python
|
|
476
457
|
|
|
@@ -543,26 +524,7 @@ Genal will print information regarding the number of individuals used in the tes
|
|
|
543
524
|
CHR/POS columns present: SNPs searched based on genomic positions.
|
|
544
525
|
Extracting SNPs for each chromosome...
|
|
545
526
|
SNPs extracted for chr1.
|
|
546
|
-
|
|
547
|
-
SNPs extracted for chr3.
|
|
548
|
-
SNPs extracted for chr4.
|
|
549
|
-
SNPs extracted for chr5.
|
|
550
|
-
SNPs extracted for chr6.
|
|
551
|
-
SNPs extracted for chr7.
|
|
552
|
-
SNPs extracted for chr8.
|
|
553
|
-
SNPs extracted for chr9.
|
|
554
|
-
SNPs extracted for chr10.
|
|
555
|
-
SNPs extracted for chr11.
|
|
556
|
-
SNPs extracted for chr12.
|
|
557
|
-
SNPs extracted for chr13.
|
|
558
|
-
SNPs extracted for chr14.
|
|
559
|
-
SNPs extracted for chr15.
|
|
560
|
-
SNPs extracted for chr16.
|
|
561
|
-
SNPs extracted for chr17.
|
|
562
|
-
SNPs extracted for chr18.
|
|
563
|
-
SNPs extracted for chr19.
|
|
564
|
-
SNPs extracted for chr20.
|
|
565
|
-
SNPs extracted for chr21.
|
|
527
|
+
...
|
|
566
528
|
SNPs extracted for chr22.
|
|
567
529
|
Merging SNPs extracted from each chromosome...
|
|
568
530
|
Created bed/bim/fam fileset with extracted SNPs: tmp_GENAL/e415aab3_allchr
|