plotMetaDataHeatmap#
Last Updated: Oct 02, 2023
Description#
Creates heatmap for genes within aggregated clusters.
Usage#
plotMetaDataHeatmap(
gobject,
spat_unit = NULL,
feat_type = NULL,
expression_values = c("normalized", "scaled", "custom"),
metadata_cols = NULL,
selected_feats = NULL,
selected_genes = NULL,
first_meta_col = NULL,
second_meta_col = NULL,
show_values = c("zscores", "original", "zscores_rescaled"),
custom_cluster_order = NULL,
clus_cor_method = "pearson",
clus_cluster_method = "complete",
custom_feat_order = NULL,
custom_gene_order = NULL,
feat_cor_method = "pearson",
gene_cor_method = NULL,
feat_cluster_method = "complete",
gene_cluster_method = NULL,
gradient_color = c("blue", "white", "red"),
gradient_midpoint = 0,
gradient_limits = NULL,
x_text_size = 10,
x_text_angle = 45,
y_text_size = 10,
strip_text_size = 8,
show_plot = NA,
return_plot = NA,
save_plot = NA,
save_param = list(),
default_save_name = "plotMetaDataHeatmap"
)
Arguments#
|
giotto object |
|
spatial unit (e.g. “cell”) |
|
feature type (e.g. “rna”, “dna”, “protein”) |
|
expression values to use (e.g. “normalized”, “scaled”, “custom”) |
|
annotation columns found in pDataDT(gobject) |
|
subset of features to use |
|
deprecated. See
|
|
if more than 1 metadata column, select the x-axis factor |
|
if more than 1 metadata column, select the facetting factor |
|
which values to show on heatmap (e.g. “zscores”, “original”, “zscores_rescaled”) |
|
custom cluster order (default = NULL) |
|
correlation method for clusters, default to “pearson” |
|
hierarchical cluster method for the clusters, default to “complete” |
|
custom feature order (default = NULL) |
|
deprecated. See
|
|
correlation method for features, default to “pearson” |
|
deprecated. See
|
|
hierarchical cluster method for the features, default to “complete” |
|
deprecated. See
|
|
vector with 3 colors for numeric data |
|
midpoint for color gradient |
|
vector with lower and upper limits |
|
size of x-axis text |
|
angle of x-axis text |
|
size of y-axis text |
|
size of strip text |
|
show plot. TRUE or FALSE |
|
return ggplot object. TRUE or FALSE |
|
directly save the plot. TRUE or FALSE |
|
list of saving parameters, see
|
|
default save name |
Details#
Creates heatmap for the average expression of selected genes in the different annotation/cluster groups. Calculation of cluster or gene order is done on the provided expression values, but visualization is by default on the z-scores. Other options are the original values or z-scores rescaled per gene (-1 to 1).
Value#
ggplot or data.table
See Also#
plotMetaDataCellsHeatmap
for numeric cell annotation instead of gene
expression.