Learn R Programming

celda (version 0.0.0.9000)

render_celda_heatmap: Render a heatmap based on a matrix of counts where rows are genes and columns are cells.

Description

Render a heatmap based on a matrix of counts where rows are genes and columns are cells.

Usage

render_celda_heatmap(counts, z = NULL, y = NULL, scale_log = NULL,
  scale_row = scale, normalize = normalizeCounts, trim = c(-2, 2),
  pseudocount_normalize = 0, pseudocount_log = 0, gene.ix = NULL,
  cell.ix = NULL, cluster_gene = TRUE, cluster_cell = TRUE,
  color_scheme = c("divergent", "sequential"),
  color_scheme_symmetric = TRUE, color_scheme_center = 0, col = NULL,
  annotation_cell = NULL, annotation_gene = NULL, annotation_color = NULL,
  breaks = NULL, legend = TRUE, annotation_legend = TRUE,
  annotation_names_gene = TRUE, annotation_names_cell = TRUE,
  show_genenames = FALSE, show_cellnames = FALSE,
  hclust_method = "ward.D2", ...)

Arguments

counts

A count matrix where rows are genes and columns are cells.

z

A numeric vector of cluster assignments for cell.

y

A numeric vector of cluster assignments for gene.

scale_log

Function; Applys a scale function such as log, log2, log10. Set to NULL to disable. Occurs after normalization. Default NULL.

scale_row

Function; A function to scale each individual row. Set to NULL to disable. Occurs after normalization and log transformation. Defualt is 'scale' and thus will Z-score transform each row.

normalize

A function to normalize the columns. Set to NULL to disable. Default is 'normalizeCounts', which normalizes to counts per million (CPM).

trim

A two element vector to specify the lower and upper cutoff for the data. Occurs after normalization, log transformation, and row scaling. Set to NULL to disable. Default c(-2,2).

pseudocount_normalize

Numeric; A pseudocount to add to data before normalization. Default 1.

pseudocount_log

Numeric; A pseudocount to add to data before log transforming. Default 0.

gene.ix

Index of genes to pull out of the matrix after normalization. If NULL, no subsettig will be performed. Default NULL.

cell.ix

Index of genes to pull out of the matrix after normalization. If NULL, no subsettig will be performed. Default NULL.

cluster_gene

Logical; determining if rows should be clustered.

cluster_cell

Logical; determining if columns should be clustered.

color_scheme

One of "divergent" or "sequential". A "divergent" scheme is best for highlighting either end of the data with a break in the middle (denoted by 'color_scheme_center') such as gene expression data that has been normalized and centered. A "sequential" scheme is best for data that are ordered low to high such as raw counts or probabilities.

color_scheme_symmetric

Boolean; When the color_scheme is "divergent" and the data contains both positive and negative numbers, TRUE indicates that the color scheme should be symmetric about the center. For example, if the data ranges goes from -1.5 to 2, then setting this to TRUE will force the colors to range from -2 to 2.

color_scheme_center

Numeric. Indicates the center of a "divergent" color_scheme. Default 0.

col

color for the heatmap.

annotation_cell

A data frame for the cell annotations (columns).

annotation_gene

A data frame for the gene annotations (rows).

annotation_color

A list containing color scheme for cell and/or gene annotation. See '?pheatmap' for more details.

breaks

a sequence of numbers that covers the range of values in mat and is one element longer than color vector. Used for mapping values to colors. Useful, if needed to map certain values to certain colors, to certain values. If value is NA then the breaks are calculated automatically.

legend

logical; determining if legend should be drawn or not. Default to be TRUE.

annotation_legend

Logical; showing if the legend for annotation tracks should be drawn.

annotation_names_gene

Logical; showing if the names for gene annotation tracks should be drawn. Default to be TRUE.

annotation_names_cell

Logical; showing if the names for cell annotation tracks should be drawn. Default to be TRUE.

show_genenames

Logical; specifying if gene names should be shown. Default to be FALSE.

show_cellnames

Logical; specifying if cell names should be shown. Default to be FALSE.

hclust_method

Character; Specifies the method to use for the 'hclust' function. Default is "ward.D2". See ?hclust for possible values.

...

Other arguments to be passed to underlying pheatmap function