Plot Exposure Impact on Network Centrality Metrics
Source:R/plot_exposure_impact.R
plot_exposure_impact.Rd
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.
Arguments
- expomicset
A
MultiAssayExperiment
object with results fromrun_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.