Performs multi-omics integration using one of several available methods:
MOFA, MCIA, RGCCA, or DIABLO. This function takes a MultiAssayExperiment
object with two or more assays and computes shared latent factors
across omics layers.
Usage
run_multiomics_integration(
expomicset,
method = "MCIA",
n_factors = 10,
scale = TRUE,
outcome = NULL,
action = "add"
)Arguments
- expomicset
A
MultiAssayExperimentobject with at least two assays.- method
Character. Integration method to use. Options are
"MOFA","MCIA","RGCCA", or"DIABLO".- n_factors
Integer. Number of latent factors/components to compute. Default is 10.
- scale
Logical. Whether to scale each assay before integration. Default is
TRUE.- outcome
Character. Required if
method = "DIABLO". Name of outcome variable incolDataused for supervised integration.- action
Character. Whether to
"add"results to the metadata or"get"them as a list. Default is"add".
Value
If action = "add", returns a MultiAssayExperiment with
integration results
stored in metadata(expomicset)$multiomics_integration$integration_results.
If action = "get", returns a list with integration method and result.
Details
"MOFA"runs Multi-Omics Factor Analysis using theMOFA2package and returns a trained model."MCIA"runs multi-co-inertia analysis using thenipalsMCIApackage."RGCCA"runs Regularized Generalized Canonical Correlation Analysis using theRGCCApackage."DIABLO"performs supervised integration using themixOmicspackage and a specified outcome.
Examples
# create example data
mae <- make_example_data(
n_samples = 20,
return_mae = TRUE
)
#> Ensuring all omics datasets are matrices with column names.
#> Creating SummarizedExperiment objects.
#> Creating MultiAssayExperiment object.
#> MultiAssayExperiment created successfully.
# perform multiomics integration
mae <- run_multiomics_integration(
mae,
method = "MCIA",
n_factors = 3
)
#> Scaling each assay in MultiAssayExperiment.
#> Running multi-omics integration using MCIA...
#> Applying MCIA with `nipalsMCIA`
#> Performing column-level pre-processing...
#> Column pre-processing completed.
#> Performing block-level preprocessing...
#> Block pre-processing completed.
#> Computing order 1 scores
#> Computing order 2 scores
#> Computing order 3 scores