visualize\(data\)scores$distribution.heatmap
visualize PRS score distributions as heatmaps
Description
Converts one score layer into a model-by-distribution heatmap. Rows represent models and columns represent score bins or density grid points. Observation faceting splits samples before each model distribution is calculated.
Usage
visualize.scores.distribution.heatmap(
data,
scores.layer = X,
models = NULL,
obs = NULL,
type = c("density", "histogram"),
n.bins = 100L,
annotate.mod.by = NULL,
annotate.mod.color = NULL,
mod.labels = NULL,
split.mod.by = NULL,
facet.obs.by = NULL,
col = colorRampPalette(c("white", "darkgreen")),
n.breaks = 11L,
symmetrize.range = FALSE,
center.zero = FALSE,
...
)
Arguments
data
|
A |
scores.layer
|
Unquoted expression naming the score layer in |
models
|
Optional unquoted model-side selector. Supports the same subsetting forms as |
obs
|
Optional unquoted observation-side selector. Supports the same subsetting forms as |
type
|
Distribution summary, either |
n.bins
|
Integer number of distribution grid points or histogram bins. |
annotate.mod.by
|
Model-side unquoted expression(s), usually |
annotate.mod.color
|
Optional named list of colors for model annotations. Categorical annotations should use named color vectors; continuous annotations should use color mapping functions such as |
mod.labels
|
Single model-side unquoted expression used as heatmap row labels. |
split.mod.by
|
Single model-side unquoted expression used for |
facet.obs.by
|
Single observation-side unquoted expression used to split observations before calculating model distributions. Observation facets are combined horizontally. |
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. |
…
|
Additional arguments passed to |
Value
A ComplexHeatmap::Heatmap object, or a horizontally-composed ComplexHeatmap::HeatmapList when facet.obs.by is supplied.