Return information related to Mendelian Randomisation

mr(exposure = NULL, outcome = NULL, pval_threshold = 1e-05,
  mode = c("table", "raw"))

Arguments

exposure

A trait name, eg. "Body mass index", leaving exposure as NULL will return MR information related to a specific outcome. NOTE: exposure and outcome cannot be both NULL.

outcome

A trait name, eg. "Coronary heart disease", leaving outcome as NULL will return MR information related to a specific exposure. NOTE: exposure and outcome cannot be both NULL.

pval_threshold

P-value threshold

mode

If mode = "table", returns a data frame (a tibble as per tidyverse convention). If mode = "raw", returns a raw response from EpiGraphDB API with minimal parsing done by httr.

Value

Data from /mr

Examples

# Returns a data frame mr(exposure = "Body mass index", outcome = "Coronary heart disease")
#> # A tibble: 6 x 12 #> exposure_id exposure_name outcome_id outcome_name estimate se p #> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> #> 1 974 Body mass in… 7 Coronary he… 0.389 0.0493 3.42e-15 #> 2 2 Body mass in… 7 Coronary he… 0.397 0.0727 4.79e- 8 #> 3 95 Body mass in… 7 Coronary he… 0.455 0.0931 1.02e- 6 #> 4 2 Body mass in… 8 Coronary he… 0.331 0.0684 1.31e- 6 #> 5 835 Body mass in… 7 Coronary he… 0.360 0.0756 1.94e- 6 #> 6 974 Body mass in… 8 Coronary he… 0.328 0.0731 6.97e- 6 #> # … with 5 more variables: ci_upp <dbl>, ci_low <dbl>, selection <chr>, #> # method <chr>, moescore <dbl>
# Returns raw response mr( exposure = "Body mass index", outcome = "Coronary heart disease", mode = "raw" ) %>% str()
#> List of 2 #> $ query : chr "MATCH (t1:Gwas)-[r:MR]->(t2:Gwas) WHERE t1.trait = \"Body mass index\" AND t2.trait = \"Coronary heart disease\"| __truncated__ #> $ results:List of 6 #> ..$ :List of 12 #> .. ..$ exposure_id : chr "974" #> .. ..$ exposure_name: chr "Body mass index" #> .. ..$ outcome_id : chr "7" #> .. ..$ outcome_name : chr "Coronary heart disease" #> .. ..$ estimate : num 0.389 #> .. ..$ se : num 0.0493 #> .. ..$ p : num 3.42e-15 #> .. ..$ ci_upp : num 0.498 #> .. ..$ ci_low : num 0.279 #> .. ..$ selection : chr "DF" #> .. ..$ method : chr "FE IVW" #> .. ..$ moescore : num 0.89 #> ..$ :List of 12 #> .. ..$ exposure_id : chr "2" #> .. ..$ exposure_name: chr "Body mass index" #> .. ..$ outcome_id : chr "7" #> .. ..$ outcome_name : chr "Coronary heart disease" #> .. ..$ estimate : num 0.397 #> .. ..$ se : num 0.0727 #> .. ..$ p : num 4.79e-08 #> .. ..$ ci_upp : num 0.54 #> .. ..$ ci_low : num 0.255 #> .. ..$ selection : chr "HF" #> .. ..$ method : chr "Simple median" #> .. ..$ moescore : num 0.92 #> ..$ :List of 12 #> .. ..$ exposure_id : chr "95" #> .. ..$ exposure_name: chr "Body mass index" #> .. ..$ outcome_id : chr "7" #> .. ..$ outcome_name : chr "Coronary heart disease" #> .. ..$ estimate : num 0.455 #> .. ..$ se : num 0.0931 #> .. ..$ p : num 1.02e-06 #> .. ..$ ci_upp : num 0.637 #> .. ..$ ci_low : num 0.273 #> .. ..$ selection : chr "DF" #> .. ..$ method : chr "Penalised median" #> .. ..$ moescore : num 0.78 #> ..$ :List of 12 #> .. ..$ exposure_id : chr "2" #> .. ..$ exposure_name: chr "Body mass index" #> .. ..$ outcome_id : chr "8" #> .. ..$ outcome_name : chr "Coronary heart disease" #> .. ..$ estimate : num 0.331 #> .. ..$ se : num 0.0684 #> .. ..$ p : num 1.31e-06 #> .. ..$ ci_upp : num 0.472 #> .. ..$ ci_low : num 0.19 #> .. ..$ selection : chr "DF" #> .. ..$ method : chr "FE IVW" #> .. ..$ moescore : num 0.75 #> ..$ :List of 12 #> .. ..$ exposure_id : chr "835" #> .. ..$ exposure_name: chr "Body mass index" #> .. ..$ outcome_id : chr "7" #> .. ..$ outcome_name : chr "Coronary heart disease" #> .. ..$ estimate : num 0.36 #> .. ..$ se : num 0.0756 #> .. ..$ p : num 1.94e-06 #> .. ..$ ci_upp : num 0.508 #> .. ..$ ci_low : num 0.212 #> .. ..$ selection : chr "Tophits" #> .. ..$ method : chr "Simple median" #> .. ..$ moescore : num 0.91 #> ..$ :List of 12 #> .. ..$ exposure_id : chr "974" #> .. ..$ exposure_name: chr "Body mass index" #> .. ..$ outcome_id : chr "8" #> .. ..$ outcome_name : chr "Coronary heart disease" #> .. ..$ estimate : num 0.328 #> .. ..$ se : num 0.0731 #> .. ..$ p : num 6.97e-06 #> .. ..$ ci_upp : num 0.495 #> .. ..$ ci_low : num 0.162 #> .. ..$ selection : chr "DF" #> .. ..$ method : chr "FE IVW" #> .. ..$ moescore : num 0.85
# Use a different threshold mr(exposure = "Body mass index", pval_threshold = 1e-8)
#> # A tibble: 609 x 12 #> exposure_id exposure_name outcome_id outcome_name estimate se p #> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> #> 1 2 Body mass in… 85 Extreme bod… 3.82 0.0911 0. #> 2 2 Body mass in… UKB-a:282 Arm fat per… 0.526 0.0123 0. #> 3 2 Body mass in… 48 Hip circumf… 0.828 0.0149 0. #> 4 2 Body mass in… 65 Waist circu… 0.779 0.0191 0. #> 5 835 Body mass in… 93 Overweight 1.67 0.0341 0. #> 6 835 Body mass in… 60 Waist circu… 0.820 0.0195 0. #> 7 835 Body mass in… 61 Waist circu… 0.824 0.0194 0. #> 8 835 Body mass in… 64 Waist circu… 0.783 0.0193 0. #> 9 94 Body mass in… 1017 Immunoglobu… -101. 1.37 0. #> 10 835 Body mass in… 50 Hip circumf… 0.836 0.0230 6.20e-290 #> # … with 599 more rows, and 5 more variables: ci_upp <dbl>, ci_low <dbl>, #> # selection <chr>, method <chr>, moescore <dbl>