Skip to contents

Generates a summary plot of factor contributions from multi-omics integration results stored in a MultiAssayExperiment object.

Usage

plot_factor_summary(
  expomicset,
  low = "#006666",
  mid = "white",
  high = "#8E0152",
  midpoint = 0.5
)

Arguments

expomicset

A MultiAssayExperiment object containing integration results in metadata(expomicset)$multiomics_integration$integration_results.

low

Color for low values in the fill gradient. Default is "#006666".

mid

Color for midpoint in the fill gradient. Default is "white".

high

Color for high values in the fill gradient. Default is "#8E0152".

midpoint

Midpoint value for the gradient color scale. Default is 0.5.

Value

A ggplot object showing factor contributions based on the integration method.

Details

This function visualizes factor contributions based on the integration method:

  • MOFA: Variance explained per factor and view.

  • MCIA: Block score weights per omic.

  • DIABLO: Mean absolute sample score per omic and factor (from block-specific variates).

  • RGCCA: Mean absolute sample score per omic and factor (from aligned block scores).

The color gradient can be customized using the low, mid, high, and midpoint parameters.

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.

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

factor_sum_plot <- mae |>
    plot_factor_summary()