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

Arguments

exposure_trait

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

outcome_trait

A trait name, e.g. "Coronary heart disease", leaving outcome_trait as NULL will return MR information related to a specific exposure_trait. NOTE: exposure_trait and outcome_trait 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 GET /mr

Examples

# Returns a data frame mr(exposure_trait = "Body mass index", outcome_trait = "Coronary heart disease")
#> # A tibble: 18 x 10 #> exposure.id exposure.trait outcome.id outcome.trait mr.b mr.se mr.pval #> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> #> 1 ieu-a-2 Body mass index ieu-a-7 Coronary hear… 0.464 0.0415 5.46e-29 #> 2 ebi-a-GCST0… Body mass index ieu-a-7 Coronary hear… 0.457 0.0410 3.33e-20 #> 3 ieu-a-974 Body mass index ieu-a-7 Coronary hear… 0.389 0.0493 3.42e-15 #> 4 ieu-a-835 Body mass index ieu-a-7 Coronary hear… 0.417 0.0492 1.00e-11 #> 5 ieu-a-974 Body mass index ieu-a-9 Coronary hear… 0.320 0.0536 2.32e- 9 #> 6 ieu-a-2 Body mass index ieu-a-9 Coronary hear… 0.358 0.0535 5.91e- 9 #> 7 ieu-a-835 Body mass index ieu-a-9 Coronary hear… 0.397 0.0604 1.79e- 8 #> 8 ebi-a-GCST0… Body mass index ieu-a-9 Coronary hear… 0.341 0.0590 1.24e- 7 #> 9 ieu-a-95 Body mass index ieu-a-9 Coronary hear… 0.371 0.0708 1.62e- 7 #> 10 ebi-a-GCST0… Body mass index ieu-a-6 Coronary hear… 0.493 0.0986 5.88e- 7 #> 11 ieu-a-785 Body mass index ieu-a-9 Coronary hear… 0.395 0.0609 1.07e- 6 #> 12 ebi-a-GCST0… Body mass index ebi-a-GCST… Coronary hear… 0.309 0.0648 1.81e- 6 #> 13 ebi-a-GCST0… Body mass index ieu-a-8 Coronary hear… 0.309 0.0648 1.81e- 6 #> 14 ebi-a-GCST0… Body mass index ieu-a-7 Coronary hear… 0.275 0.0514 2.76e- 6 #> 15 ieu-a-95 Body mass index ieu-a-7 Coronary hear… 0.455 0.0971 2.82e- 6 #> 16 ieu-a-2 Body mass index ieu-a-8 Coronary hear… 0.317 0.0686 3.93e- 6 #> 17 ieu-a-2 Body mass index ebi-a-GCST… Coronary hear… 0.312 0.0688 5.86e- 6 #> 18 ieu-a-974 Body mass index ieu-a-8 Coronary hear… 0.328 0.0731 6.97e- 6 #> # … with 3 more variables: mr.method <chr>, mr.selection <chr>, #> # mr.moescore <dbl>
# Returns raw response mr( exposure_trait = "Body mass index", outcome_trait = "Coronary heart disease", mode = "raw" ) %>% str()
#> List of 2 #> $ metadata:List of 3 #> ..$ query : chr "MATCH (exposure:Gwas)-[mr:MR_EVE_MR]->(outcome:Gwas) WHERE exposure.trait = \"Body mass index\" AND outcome.tra"| __truncated__ #> ..$ total_seconds: num 0.0306 #> ..$ empty_results: logi FALSE #> $ results :List of 18 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-2" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-7" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.464 #> .. .. ..$ se : num 0.0415 #> .. .. ..$ pval : num 5.46e-29 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "HF" #> .. .. ..$ moescore : num 0.91 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ebi-a-GCST006368" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-7" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.457 #> .. .. ..$ se : num 0.041 #> .. .. ..$ pval : num 3.33e-20 #> .. .. ..$ method : chr "RE IVW" #> .. .. ..$ selection: chr "DF + HF" #> .. .. ..$ moescore : num 0.92 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-974" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-7" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.389 #> .. .. ..$ se : num 0.0493 #> .. .. ..$ pval : num 3.42e-15 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "DF" #> .. .. ..$ moescore : num 0.89 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-835" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-7" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.417 #> .. .. ..$ se : num 0.0492 #> .. .. ..$ pval : num 1e-11 #> .. .. ..$ method : chr "Simple mean" #> .. .. ..$ selection: chr "HF" #> .. .. ..$ moescore : num 0.96 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-974" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-9" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.32 #> .. .. ..$ se : num 0.0536 #> .. .. ..$ pval : num 2.32e-09 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "DF + HF" #> .. .. ..$ moescore : num 0.86 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-2" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-9" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.358 #> .. .. ..$ se : num 0.0535 #> .. .. ..$ pval : num 5.91e-09 #> .. .. ..$ method : chr "RE IVW" #> .. .. ..$ selection: chr "HF" #> .. .. ..$ moescore : num 0.89 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-835" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-9" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.397 #> .. .. ..$ se : num 0.0604 #> .. .. ..$ pval : num 1.79e-08 #> .. .. ..$ method : chr "RE IVW" #> .. .. ..$ selection: chr "HF" #> .. .. ..$ moescore : num 0.92 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ebi-a-GCST006368" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-9" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.341 #> .. .. ..$ se : num 0.059 #> .. .. ..$ pval : num 1.24e-07 #> .. .. ..$ method : chr "RE IVW" #> .. .. ..$ selection: chr "HF" #> .. .. ..$ moescore : num 0.84 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-95" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-9" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.371 #> .. .. ..$ se : num 0.0708 #> .. .. ..$ pval : num 1.62e-07 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "HF" #> .. .. ..$ moescore : num 0.75 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ebi-a-GCST006368" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-6" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.493 #> .. .. ..$ se : num 0.0986 #> .. .. ..$ pval : num 5.88e-07 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "DF + HF" #> .. .. ..$ moescore : num 0.79 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-785" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-9" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.395 #> .. .. ..$ se : num 0.0609 #> .. .. ..$ pval : num 1.07e-06 #> .. .. ..$ method : chr "RE IVW" #> .. .. ..$ selection: chr "HF" #> .. .. ..$ moescore : num 0.84 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ebi-a-GCST006368" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ebi-a-GCST000998" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.309 #> .. .. ..$ se : num 0.0648 #> .. .. ..$ pval : num 1.81e-06 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "Tophits" #> .. .. ..$ moescore : num 0.82 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ebi-a-GCST006368" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-8" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.309 #> .. .. ..$ se : num 0.0648 #> .. .. ..$ pval : num 1.81e-06 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "Tophits" #> .. .. ..$ moescore : num 0.81 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ebi-a-GCST004904" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-7" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.275 #> .. .. ..$ se : num 0.0514 #> .. .. ..$ pval : num 2.76e-06 #> .. .. ..$ method : chr "RE IVW" #> .. .. ..$ selection: chr "DF + HF" #> .. .. ..$ moescore : num 0.72 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-95" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-7" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.455 #> .. .. ..$ se : num 0.0971 #> .. .. ..$ pval : num 2.82e-06 #> .. .. ..$ method : chr "Penalised median" #> .. .. ..$ selection: chr "DF" #> .. .. ..$ moescore : num 0.78 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-2" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-8" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.317 #> .. .. ..$ se : num 0.0686 #> .. .. ..$ pval : num 3.93e-06 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "DF" #> .. .. ..$ moescore : num 0.75 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-2" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ebi-a-GCST000998" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.312 #> .. .. ..$ se : num 0.0688 #> .. .. ..$ pval : num 5.86e-06 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "DF" #> .. .. ..$ moescore : num 0.76 #> ..$ :List of 3 #> .. ..$ exposure:List of 2 #> .. .. ..$ id : chr "ieu-a-974" #> .. .. ..$ trait: chr "Body mass index" #> .. ..$ outcome :List of 2 #> .. .. ..$ id : chr "ieu-a-8" #> .. .. ..$ trait: chr "Coronary heart disease" #> .. ..$ mr :List of 6 #> .. .. ..$ b : num 0.328 #> .. .. ..$ se : num 0.0731 #> .. .. ..$ pval : num 6.97e-06 #> .. .. ..$ method : chr "FE IVW" #> .. .. ..$ selection: chr "DF" #> .. .. ..$ moescore : num 0.85
# Use a different threshold mr(exposure_trait = "Body mass index", pval_threshold = 1e-8)
#> # A tibble: 2,138 x 10 #> exposure.id exposure.trait outcome.id outcome.trait mr.b mr.se mr.pval #> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> #> 1 ieu-a-974 Body mass index ebi-a-GCS… Fibrinogen lev… 0.193 0.00224 0 #> 2 ebi-a-GCST0… Body mass index ukb-b-2303 Body mass inde… 0.595 0.0153 0 #> 3 ieu-a-835 Body mass index ukb-b-180… Leg fat mass (… 0.608 0.0139 0 #> 4 ieu-a-835 Body mass index ukb-b-128… Arm fat percen… 0.526 0.0130 0 #> 5 ieu-a-835 Body mass index ieu-a-93 Overweight 1.67 0.0341 0 #> 6 ieu-a-835 Body mass index ieu-a-61 Waist circumfe… 0.824 0.0194 0 #> 7 ieu-a-835 Body mass index ieu-a-60 Waist circumfe… 0.820 0.0195 0 #> 8 ieu-a-2 Body mass index ukb-b-4650 Comparative bo… 0.439 0.00989 0 #> 9 ebi-a-GCST0… Body mass index ukb-b-201… Arm fat percen… 0.533 0.0104 0 #> 10 ieu-a-2 Body mass index ukb-b-2303 Body mass inde… 0.674 0.0178 0 #> # … with 2,128 more rows, and 3 more variables: mr.method <chr>, #> # mr.selection <chr>, mr.moescore <dbl>