visualize\(data\)scores$heatmap
visualize PRS score matrices as heatmaps
Description
Plots one matrix from data$scores as a samples-by-models heatmap, or a models-by-samples heatmap when flip.orientation = TRUE, using ComplexHeatmap. Observation-side and model-side annotations, splits, and facets are resolved with data$fetch().
Usage
visualize.scores.heatmap(
data,
scores.layer = X,
annotate.obs.by = NULL,
annotate.mod.by = NULL,
annotate.obs.color = NULL,
annotate.mod.color = NULL,
obs.labels = NULL,
mod.labels = NULL,
split.obs.by = NULL,
split.mod.by = NULL,
facet.obs.by = NULL,
facet.mod.by = NULL,
col = colorRampPalette(c("darkgreen", "white", "darkorchid4")),
n.breaks = 11L,
symmetrize.range = FALSE,
center.zero = FALSE,
flip.orientation = FALSE,
...
)
Arguments
data
|
A |
scores.layer
|
Unquoted expression naming the score layer in |
annotate.obs.by
|
Observation-side unquoted expression(s), usually |
annotate.mod.by
|
Model-side unquoted expression(s), usually |
annotate.obs.color
|
Optional named list of colors for observation annotations, passed to the observation-side heatmap annotation. Categorical annotations should use named color vectors; continuous annotations should use color mapping functions such as |
annotate.mod.color
|
Optional named list of colors for model annotations, passed to the model-side heatmap annotation. Categorical annotations should use named color vectors; continuous annotations should use color mapping functions such as |
obs.labels
|
Single observation-side unquoted expression used as heatmap row labels by default and column labels when |
mod.labels
|
Single model-side unquoted expression used as heatmap column labels by default and row labels when |
split.obs.by
|
Single observation-side unquoted expression used for |
split.mod.by
|
Single model-side unquoted expression used for |
facet.obs.by
|
Single observation-side unquoted expression used to split the matrix into row-faceted heatmaps by default and column-faceted heatmaps when |
facet.mod.by
|
Single model-side unquoted expression used to split the matrix into column-faceted heatmaps by default and row-faceted heatmaps when |
col
|
A |
n.breaks
|
Integer number of color breaks sampled from |
symmetrize.range
|
Logical; whether to force a symmetric color range around zero. |
center.zero
|
Logical; whether zero must be an explicit center break. |
flip.orientation
|
Logical; if |
…
|
Additional arguments passed to |
Details
Faceting follows the visual orientation. With the default orientation, facet.obs.by creates vertical heatmap facets and facet.mod.by creates horizontal heatmap facets. When flip.orientation = TRUE, this is reversed: facet.mod.by creates vertical facets and facet.obs.by creates horizontal facets. When both facet arguments are supplied, the return value is a named list of horizontal heatmap rows; the row facet side is observations by default and models when orientation is flipped.
Value
A ComplexHeatmap::Heatmap object, a ComplexHeatmap::HeatmapList, or, when both observation and model facets are supplied, a named list of horizontally-composed heatmap lists.