Plot a Manhattan-style ExWAS summary across omics categories
Source:R/plot_manhattan.R
plot_manhattan.Rd
This function generates a multi-faceted Manhattan plot from the results of
associate_all_outcome()
, visualizing the significance of associations
across omics features, grouped by category. Significant features can be highlighted
and labeled, and strip backgrounds can be colored per facet.
Usage
plot_manhattan(
expomicset,
pval_thresh = 0.05,
feature_col = "term",
alpha = 0.5,
min_per_cat = 1,
vars_to_label = NULL,
sig_color = "magenta2",
non_sig_cols = c("grey25", "grey75"),
pval_thresh_line_col = "grey25",
panel_sizes = c(1, 1, 1, 1, 1),
linetype = "dashed",
facet_cols = NULL,
label_size = 3.5,
facet_angle = 90,
facet_text_face = "bold.italic"
)
Arguments
- expomicset
A
MultiAssayExperiment
object that has already been processed byassociate_all_outcome()
.- pval_thresh
Numeric threshold for significance (default = 0.05).
- alpha
Transparency applied to facet strip colors (default = 0.5).
- min_per_cat
Minimum number of features per category to be shown (default = 1).
- vars_to_label
Optional character vector of variable names to label explicitly.
- sig_color
Color used for significant points (default =
"magenta2"
).- non_sig_cols
Character vector of alternating colors for non-significant points (default =
c("grey25", "grey75")
).- pval_thresh_line_col
Color of the horizontal significance threshold line (default =
"grey25"
).- panel_sizes
Numeric vector passed to
ggh4x::force_panelsizes()
to control panel widths (default =c(1,1,1,1,1)
).- linetype
Line type for the horizontal threshold (default =
"dashed"
).- facet_cols
Optional vector of colors to use for facet strip backgrounds; if
NULL
, usesggsci::pal_npg()
.- label_size
Numeric size of the feature label text (default = 3.5).
- facet_angle
Angle (in degrees) for strip text rotation (default = 90).
- facet_text_face
Font face for facet strip labels (default =
"bold.italic"
).
Details
This function expects
associate_all_outcome()
to have been run first.Facets represent omics categories, and points represent features.
Points below the significance threshold are colored using
non_sig_cols
, while significant ones are colored withsig_color
and optionally labeled.Uses
ggrepel
to avoid overlapping labels andggh4x
for enhanced faceting.