MRZhou simplify the mendelian randomization analysis
MRZhou
This R package is designed for the convenience of medical professionals, aiming to further simplify the analysis methods of Mendelian randomization (MR). It is integrated based on the TwosampleMR, MRpresso, and coloc packages. Therefore, whether it is the online data of the IEU GWAS database or local GWAS data (such as FinnGen database), this package can be conveniently executed. This package also includes: GSMR analysis, SMR analysis methods, etc. TWAS/Fusion analysis function method is under development.
When using this MRZhou package, it is recommended to first learn the basic syntax of TwosampleMR.
Installation
You can install the development version of MRZhou from GitHub with:
1 | # install.packages("devtools") |
Example
This is a basic example which shows you how to solve a common problem:
1.Exposure and Outcome
Let’s identify the instrumental variables (IVs) for BMI and extract the BMI-associated SNPs from the CAD (coronary artery disease) outcome GWAS data.
1 | library(MRZhou) |
The above two functions are based on the TwosampleMR package, and detailed information can be found in the tutorial.
If you would like to use the FinnGen database, you can follow: exposure:
1 | library(MRZhou) |
2. IVW analysis (main analysis method)
1 | dat <- harmonise_data(exp, out) |
The resall dataframe is all of the MR methods results (including: MRpresso), Heterogeneity statistics and Horizontal pleiotropy results
3.Plot
1 | ## Not include MRpresso method results |
4.Other Visualization
- Volcano plot
1 | volcano_plot <- volcano_plot(result) |
- Circle plot
1 | circle_plot <- circle_plot(result) |