Observational correlations between traits

obs_cor(trait, pval_threshold = 1e-05, mode = c("table", "raw"))

Arguments

trait

name of the trait, e.g. "body mass index"

pval_threshold

pvalue 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 /obs_cor

Examples

obs_cor(trait = "Body mass index (BMI)") %>% dplyr::glimpse()
#> Observations: 39 #> Variables: 6 #> $ trait_id <chr> "UKB-b:19953", "UKB-b:19953", "UKB-b:19953", "UKB-b:… #> $ trait_name <chr> "Body mass index (BMI)", "Body mass index (BMI)", "B… #> $ cor <dbl> 0.8667976, 0.8509821, 0.6404578, 0.8656913, 0.504887… #> $ pval <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… #> $ assoc_trait_id <chr> "UKB-b:8338", "UKB-b:20044", "UKB-b:16407", "UKB-b:6… #> $ assoc_trait_name <chr> "Arm fat mass (left)", "Trunk fat mass", "Trunk fat …
# Use a different threshold obs_cor(trait = "Body mass index (BMI)", pval_threshold = 1e-8) %>% dplyr::glimpse()
#> Observations: 39 #> Variables: 6 #> $ trait_id <chr> "UKB-b:19953", "UKB-b:19953", "UKB-b:19953", "UKB-b:… #> $ trait_name <chr> "Body mass index (BMI)", "Body mass index (BMI)", "B… #> $ cor <dbl> 0.8667976, 0.8509821, 0.6404578, 0.8656913, 0.504887… #> $ pval <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… #> $ assoc_trait_id <chr> "UKB-b:8338", "UKB-b:20044", "UKB-b:16407", "UKB-b:6… #> $ assoc_trait_name <chr> "Arm fat mass (left)", "Trunk fat mass", "Trunk fat …