Skip to contents

Visualizes the impact of exposures on network centrality measures of associated features (e.g., genes or latent factors) as a heatmap. Each exposure is scored by four centrality metrics, scaled within metric, and grouped by exposure category.

Usage

plot_exposure_impact(
  expomicset,
  feature_type = c("degs", "omics", "factors"),
  min_per_group = 5,
  facet_cols = NULL,
  bar_cols = NULL,
  alpha = 0.3,
  ncol = 2,
  nrow = 1,
  heights = c(1, 1),
  widths = c(2, 1)
)

Arguments

expomicset

A MultiAssayExperiment object with results from run_exposure_impact().

feature_type

Character string specifying the feature type. One of "degs", "omics", or "factors".

min_per_group

Minimum number of features per exposure for inclusion (not currently used). Default is 5.

facet_cols

Optional named vector of colors for exposure categories.

bar_cols

Optional vector of colors for bar plots (if enabled).

alpha

Transparency level for category strips (if enabled). Default is 0.3.

ncol, nrow

Layout for optional patchwork combination (currently unused). Default: ncol = 2, nrow = 1.

heights,

widths Relative heights and widths for combined plots (currently unused). Defaults: c(1,1), c(2,1).

Value

A ggplot/patchwork object showing a heatmap of scaled network centrality scores per exposure, annotated by category.

Details

This function uses the output of run_exposure_impact() to calculate and visualize the mean centrality values for each exposure across its associated features. The following network centrality metrics are shown:

  • Degree centrality

  • Eigenvector centrality

  • Closeness centrality

  • Betweenness centrality

All values are scaled within metric across exposures. A side bar indicates the category of each exposure.

Examples

if (FALSE) { # \dontrun{
plot_exposure_impact(expomicset, feature_type = "degs")
} # }