/MRsimplify

TwosampleMR and MultivariableMR perform with simple commands without prior knowledge or having to go through lengthy boring protocols

Primary LanguageRMIT LicenseMIT

MRsimplify

TwosampleMR and MultivariableMR, perform all steps with simple command(s) without prior knowledge or having to go through lengthy boring protocols

Internal steps in MRsimplify

A: exposure data: (i) read exposure data, (ii) perform SNP clumping and (iii) store data.

B: outcome data: (i) read outcome data, (ii) get proxy SNP(s)

C: harmonise

D: MR

E: sensitivity tests (heterogeneity, pleiotropy, singlesnp, leaveoneout, MR-PRESSO)

F: visualization (scatter plots and funnel plots)

G: compile all results into a file.

Step-1: installation..

Install required R library: TwoSampleMR, stringr, tidyverse, LDlinkR, ggplot2, ieugwasr, dplyr, gwasvcf.

Download and install:

  • R codes (stepOne.r and stepTwo.r) and before running add the path to local LD reference panel on line-12 and line-28, respectively.
  • The LD reference panel can be downloaded from here (currently supporting GRCh37/hg19 genome built).
  • The LD reference panel contains information of 5 super-populations (EUR = European; EAS = East Asian; AMR = Admixed American; SAS = South Asian; AFR = African).

Download full gwas summary stat:

  • From either GWASCatalog or individual publications with necessary information: SNP, CHR, POS, A1 (effect_allele), A2 (other_allele), BETA, SE, Phenotype, Pval, EAF (effect_allele Freq), samplesize. (NOTE: all data must have GRCh37 coordinates for smooth processing and reliable results.)
  • In case genomic coordinates change required, MungeSumstats can be used.

Step-2: formate data..

  • Filter exposure data with above mentioned columns by pval (<5e-08) whereas outcome data should be full length summary stats files without pval threshold.
  • Note: To save time, (it is recommended to) include data of different exposure(s) into one file, however in all TwosampleMR subsequent steps each exposure-outcome MR is computed separately.

Step-3: read exposure data..

(internal step: A)

Rscript --vanilla stepOne.r exposure file

Step-4: read outcome data and perform TwosampleMR..

(internal steps: B - G)

Rscript --vanilla stepTwo.r outcome file


citation: If you find repo useful please cite the link while manuscript is in preparation.

contact: ahmed.arslan@ulb.be or leave comments in issues page.