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

# \dontrun{
drugs_risk_factors(trait = "Body mass index")
#> # A tibble: 39,072 × 13
#>    trait.id  trait.trait assoc_trait.id assoc_trait.trait variant.name gene.name
#>    <chr>     <chr>       <chr>          <chr>             <chr>        <chr>    
#>  1 ieu-a-974 Body mass … ukb-a-63       Non-cancer illne… rs7412       APOE     
#>  2 ieu-a-974 Body mass … ukb-a-63       Non-cancer illne… rs11617955   COL4A1   
#>  3 ieu-a-974 Body mass … ukb-a-63       Non-cancer illne… rs11617955   COL4A1   
#>  4 ieu-a-974 Body mass … ukb-a-63       Non-cancer illne… rs55730499   LPA      
#>  5 ieu-a-95  Body mass … ukb-a-104      Non-cancer illne… rs149717632  HLA-DRB1 
#>  6 ieu-a-95  Body mass … ukb-a-104      Non-cancer illne… rs149717632  HLA-DRB1 
#>  7 ieu-a-95  Body mass … ukb-a-104      Non-cancer illne… rs149717632  HLA-DRB1 
#>  8 ieu-a-95  Body mass … ukb-a-104      Non-cancer illne… rs149717632  HLA-DRB1 
#>  9 ebi-a-GC… Body mass … ukb-a-249      Weight            rs35850753   TP53     
#> 10 ebi-a-GC… Body mass … ukb-a-249      Weight            rs35850753   TP53     
#> # … with 39,062 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>
# }