plot_ggheatmap,ClusterSet-method | R Documentation |
Plot the results (heatmap) contained in a ClusterSet object.
## S4 method for signature 'ClusterSet'
plot_ggheatmap(
object,
to_log2 = FALSE,
use_top_genes = TRUE,
ident = NULL,
panel_spacing = 0.05,
colors = colors_for_gradient("Ju1"),
standardizing = FALSE,
color_ident = NULL,
ceil = 1,
floor = -1,
centering = TRUE,
xlab = "Spots",
ylab = "Genes",
hide_gene_name = TRUE,
hide_col_name = TRUE,
pseudocount = 0.1
)
object |
A ClusterSet object. |
to_log2 |
Whether data should be transform in logarithm base 2 (+ 0.1 as a pseudocount). |
use_top_genes |
A logical to indicate whether to use highly similar genes in the slot top_genes of ClusterSet. |
ident |
A named vector containing the cell type identities for each cell. Typically the result from the Idents() function on a Seurat object (see Seurat library). |
panel_spacing |
Spacing between facets/panels ("line" units). |
colors |
A vector of colors for the gradient. |
standardizing |
Whether rows should be divided by standard deviation. |
color_ident |
A vector containing colors for the cell classes as. |
ceil |
A value for ceiling (NULL for no ceiling). Ceiling is performed after log transformation, centering and standardization. |
floor |
A value for flooring (NULL for no flooring). Flooring is performed after log transformation, centering and standardization. |
centering |
Whether rows should be centered. |
xlab |
A name for the x axis. |
ylab |
A name for the y axis. |
hide_gene_name |
Whether to hide gene names. |
hide_col_name |
Whether to hide column names. |
pseudocount |
A value for the pseudocount added before log transformation. |
A ggplot diagram.
library(Seurat)
# Load datasets
load_example_dataset('7871581/files/pbmc3k_medium_clusters')
load_example_dataset('7871581/files/pbmc3k_medium')
# rename clusters
new_obj <- rename_clust(pbmc3k_medium_clusters, new_name=sprintf("M%02d", as.integer(clust_names(pbmc3k_medium_clusters))))
# Use plot_ggheatmap
ident_pbmc3k <- sort(Seurat::Idents(pbmc3k_medium))
new_obj <- top_genes(new_obj)
plot_ggheatmap(new_obj[,names(ident_pbmc3k)], ident=ident_pbmc3k)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.