literature_gwas(trait, semmed_predicate = NULL, mode = c("table", "raw"))
A trait name
Either NULL which returns entries from all predicates, or a SemMed predicate e.g. "DIAGNOSES" or "ASSOCIATED_WITH"
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
.
Data from GET /literature/gwas
# \dontrun{
literature_gwas(trait = "Body mass index")
#> # A tibble: 50 × 8
#> gwas.id gwas.trait gs.pval gs.localCount triple.id triple.name
#> <chr> <chr> <dbl> <int> <chr> <chr>
#> 1 ieu-a-1089 Body mass index 0.000759 2 C0002453:CO… Amenorrhea CO…
#> 2 ieu-a-1089 Body mass index 0.000759 2 C0012798:AU… Diuretics AUG…
#> 3 ieu-a-1089 Body mass index 0.000759 2 C0026832:DI… Muscle Protei…
#> 4 ieu-a-1089 Body mass index 0.000759 2 C0026832:DI… Muscle Protei…
#> 5 ieu-a-1089 Body mass index 0.000759 2 C0025598:IN… Metformin INH…
#> 6 ieu-a-1089 Body mass index 0.000759 2 C0032120:NE… Plasma Protei…
#> 7 ieu-a-1089 Body mass index 0.000759 2 C0005330:DI… Bezafibrate D…
#> 8 ieu-a-1089 Body mass index 0.000759 2 C0250604:AU… Eotaxin AUGME…
#> 9 ieu-a-1089 Body mass index 0.000759 2 10076:INHIB… PTPRU INHIBIT…
#> 10 ieu-a-1089 Body mass index 0.000759 2 C0608070:PR… dicarboxydine…
#> # … with 40 more rows, and 2 more variables: triple.predicate <chr>,
#> # lit.id <chr>
# }