Creates heatmap for genes within aggregated clusters.
plotMetaDataHeatmap(
gobject,
expression_values = c("normalized", "scaled", "custom"),
metadata_cols = 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_gene_order = NULL,
gene_cor_method = "pearson",
gene_cluster_method = "complete",
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"
)
giotto object
expression values to use
annotation columns found in pDataDT(gobject)
subset of genes to use
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
custom cluster order (default = NULL)
correlation method for clusters
hierarchical cluster method for the clusters
custom gene order (default = NULL)
correlation method for genes
hierarchical cluster method for the genes
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
return ggplot object
directly save the plot [boolean]
list of saving parameters, see showSaveParameters
default save name
ggplot or data.table
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).
plotMetaDataCellsHeatmap
for numeric cell annotation instead of gene expression.
if (FALSE) {
data(mini_giotto_single_cell)
# get all genes
all_genes = slot(mini_giotto_single_cell, 'gene_ID')
# look at cell metadata
cell_metadata = pDataDT(mini_giotto_single_cell)
# plot heatmap per cell type, a column name from cell_metadata
plotMetaDataHeatmap(mini_giotto_single_cell,
selected_genes = all_genes[1:10],
metadata_cols = 'cell_types')
}