epiomics provides a collection of fast and flexible functions for the analysis of omics data in observational studies.
You can install epiomics from CRAN with:
You can download the developmental version of epiomics from GitHub with:
The basis of many omics analysis in epidemiology begin with an omics wide association study. The function owas()
implements an omics wide association study with the option of using the ’omics data as either the dependent variable (i.e., for performing an exposure –> ’omics analysis) or using the ’omics as the independent variable (i.e., for performing an ’omics –> outcome analysis). owas()
provides the option to adjust for covariates, and allows for either continuous or dichotomous outcomes. owas()
can also handle multiple variables of interest (ie, multiple exposures or multiple traits).
Start with loading example data:
# Load Example Data
data("example_data")
# Get names of omics
colnames_omic_fts <- colnames(example_data)[grep("feature_",
colnames(example_data))][1:10]
# Get names of traits
trait_nms = c("disease1", "disease2")
owas(df = example_data,
var = "exposure1",
omics = colnames_omic_fts,
covars = c("age", "sex"),
var_exposure_or_outcome = "exposure",
family = "gaussian")
# Equivalent:
owas(df = example_data,
var = "exposure1",
omics = colnames_omic_fts,
covars = c("age", "sex"),
var_exposure_or_outcome = "exposure")
owas(df = example_data,
var = "disease1",
omics = colnames_omic_fts,
covars = c("age", "sex"),
var_exposure_or_outcome = "outcome",
family = "binomial")
# Get names of exposures
expnms = c("exposure1", "exposure2", "exposure3")
owas(df = example_data,
var = expnms,
omics = colnames_omic_fts,
covars = c("age", "sex"),
var_exposure_or_outcome = "exposure",
family = "gaussian")
The function meet_in_middle()
conducts meet in the middle screening between an exposure, omics, and an outcome, as described by Cadiou et al., 2021. This function provides the option to adjust for covariates, and allows for either continuous or dichotomous outcomes. Examples are based on the simulated data created above.
res <- meet_in_middle(df = example_data,
exposure = "exposure1",
outcome = "disease1",
omics = colnames_omic_fts,
covars = c("age", "sex"),
outcome_family = "binomial")
res
res <- meet_in_middle(df = example_data,
exposure = "exposure1",
outcome = "weight",
omics = colnames_omic_fts,
covars = c("age", "sex"),
outcome_family = "gaussian")
res <- meet_in_middle(df = example_data,
exposure = "exposure1",
outcome = "weight",
omics = colnames_omic_fts,
outcome_family = "gaussian")
The owas_qgcomp()
function implements an omics wide association study using quantile-based g-Computation (as described by Keil et al., (2019) doi:10.1289/EHP5838) to examine associations of exposure mixtures with each individual ’omics feature as an outcome ’omics data as either the dependent variable. This function allows for either continuous or dichotomous outcomes, and provides the option to adjust for covariates.