From GWAS to Causal Inference: A Beginner’s Guide to Mendelian Randomization with Code Examples
Preprint
- 9 April 2026
- preprint
- Published by MDPI AG in Preprints.org
Abstract
Background: Mendelian randomization (MR) is a powerful approach for assessing causal relationships between risk factors and health outcomes using genetic variants as instrumental variables (IVs). The increasing availability of large genome-wide association study (GWAS) summary statistics from resources such as UK Biobank, FinnGen, and other population-based cohorts has made MR analyses more accessible than ever. However, many available guidelines and tutorials remain highly technical, requiring advanced knowledge of statistical genetics and R programming. Objective: This paper aims to provide a clear, step-by-step guide for conducting MR analyses using GWAS summary statistics, designed specifically for non-technical researchers. Methods: We outline a structured workflow covering key stages of MR analysis, including dataset selection, quality control, IVs selection, harmonization, and causal estimation. The workflow integrates online tools for quality control and demonstrates the use of commonly applied R packages such as TwoSampleMR. Each step is illustrated with example code and practical guidance to promote reproducibility. Results and Conclusion: The proposed workflow supports the process of conducting MR analyses, bridging the gap between theoretical guidelines and hands-on implementation. By offering an accessible and reproducible framework, this tutorial aims to help applied researchers, clinicians, and early-career scientists confidently perform MR analyses and interpret causal findings using publicly available GWAS summary data.Keywords
All Related Versions
This publication has 24 references indexed in Scilit:
- Mind the gap: Characterizing bias due to population mismatch in two-sample Mendelian randomizationThe American Journal of Human Genetics, 2026
- Bias correction for inverse variance weighting Mendelian randomizationGenetic Epidemiology, 2023
- FinnGen provides genetic insights from a well-phenotyped isolated populationNature, 2023
- Power calculation for the general two‐sample Mendelian randomization analysisGenetic Epidemiology, 2020
- Variants in the fetal genome near pro-inflammatory cytokine genes on 2q13 associate with gestational durationNature Communications, 2019
- The UK Biobank resource with deep phenotyping and genomic dataNature, 2018
- A tutorial on conducting genome‐wide association studies: Quality control and statistical analysisInternational Journal of Methods in Psychiatric Research, 2018
- Semiparametric methods for estimation of a nonlinear exposure‐outcome relationship using instrumental variables with application to Mendelian randomizationGenetic Epidemiology, 2017
- Genome-wide associations for birth weight and correlations with adult diseaseNature, 2016
- Bias due to participant overlap in two‐sample Mendelian randomizationGenetic Epidemiology, 2016