drugs_risk_factors(trait, pval_threshold = 1e-08, mode = c("table", "raw"))

Arguments

trait

A trait name

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 /drugs/risk-factors

Examples

drugs_risk_factors(trait = "Body mass index")
#> # A tibble: 6,684 x 13 #> trait.id trait.trait assoc_trait.id assoc_trait.tra… variant.name gene.name #> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 ieu-a-2 Body mass … ukb-a-344 Difficulty not … rs8040868 CHRNA3 #> 2 ieu-a-2 Body mass … ukb-a-344 Difficulty not … rs8040868 CHRNA3 #> 3 ieu-a-2 Body mass … ukb-a-344 Difficulty not … rs8040868 CHRNA3 #> 4 ieu-a-2 Body mass … ukb-a-344 Difficulty not … rs8040868 CHRNA3 #> 5 ieu-a-2 Body mass … ukb-a-344 Difficulty not … rs8040868 CHRNA3 #> 6 ieu-a-2 Body mass … ukb-a-344 Difficulty not … rs8040868 CHRNA3 #> 7 ieu-a-2 Body mass … ieu-a-60 Waist circumfer… rs7903146 TCF7L2 #> 8 ieu-a-7… Body mass … ukb-a-323 Age started ora… rs9311507 CACNA1D #> 9 ieu-a-7… Body mass … ukb-a-323 Age started ora… rs9311507 CACNA1D #> 10 ieu-a-7… Body mass … ukb-a-323 Age started ora… rs9311507 CACNA1D #> # … with 6,674 more rows, and 7 more variables: drug.label <chr>, mr.b <dbl>, #> # mr.se <dbl>, mr.pval <dbl>, mr.method <chr>, mr.selection <chr>, #> # mr.moescore <dbl>