plot_ggheatmap: Heatmap of data contained in a ClusterSet object.

plot_ggheatmapR Documentation

Heatmap of data contained in a ClusterSet object.

Description

Plot the results (heatmap) contained in a ClusterSet object.

Usage

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 = "Genes",
  ylab = "Spots",
  hide_gene_name = TRUE,
  hide_col_name = TRUE,
  pseudocount = 0.1
)

Arguments

object

A ClusterSet object.

to_log2

Whether data should be transform in logarithm base 2 (+ 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). Lists are also accepted which will results in multi-level facets.

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. also accepted which will results in multi-level facets.

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.

Value

A ggplot diagram.

Examples

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)

dputhier/scigenex documentation built on May 31, 2024, 8:59 a.m.