plotHeatmap
¶
plotHeatmap
Description¶
Creates heatmap for genes and clusters.
Usage¶
plotHeatmap(
gobject,
expression_values = c("normalized", "scaled", "custom"),
genes,
cluster_column = NULL,
cluster_order = c("size", "correlation", "custom"),
cluster_custom_order = NULL,
cluster_color_code = NULL,
cluster_cor_method = "pearson",
cluster_hclust_method = "ward.D",
gene_order = c("correlation", "custom"),
gene_custom_order = NULL,
gene_cor_method = "pearson",
gene_hclust_method = "complete",
show_values = c("rescaled", "z-scaled", "original"),
size_vertical_lines = 1.1,
gradient_colors = c("blue", "yellow", "red"),
gene_label_selection = NULL,
axis_text_y_size = NULL,
legend_nrows = 1,
show_plot = NA,
return_plot = NA,
save_plot = NA,
save_param = list(),
default_save_name = "plotHeatmap"
)
Arguments¶
Argument |
Description |
---|---|
|
giotto object |
|
expression values to use |
|
genes to use |
|
name of column to use for clusters |
|
method to determine cluster order |
|
custom order for clusters |
|
color code for clusters |
|
method for cluster correlation |
|
method for hierarchical clustering of clusters |
|
method to determine gene order |
|
custom order for genes |
|
method for gene correlation |
|
method for hierarchical clustering of genes |
|
which values to show on heatmap |
|
sizes for vertical lines |
|
colors for heatmap gradient |
|
subset of genes to show on y-axis |
|
size for y-axis text |
|
number of rows for the cluster legend |
|
show plot |
|
return ggplot object |
|
directly save the plot [boolean] |
|
list of saving parameters, see ``showSaveParameters` <#showsaveparameters>`_ |
|
default save name |
Details¶
If you want to display many genes there are 2 ways to proceed:
set axis_text_y_size to a really small value and show all genes
provide a subset of genes to display to gene_label_selection
Value¶
ggplot
Examples¶
data(mini_giotto_single_cell)
# get all genes
all_genes = slot(mini_giotto_single_cell, 'gene_ID')
# plot heatmap
plotHeatmap(mini_giotto_single_cell,
genes = all_genes[1:10])
# look at cell metadata
cell_metadata = pDataDT(mini_giotto_single_cell)
# plot heatmap per cell type, a column name from cell_metadata
plotHeatmap(mini_giotto_single_cell,
genes = all_genes[1:10],
cluster_column = 'cell_types')