Draws a heatmap focusing on a transcriptional state. Both cells and genes are sorted by their proportions of counts in a given transcriptional state. Allows for nice visualization of co-expression of those genes grouped into transcriptional states by Celda.
stateHeatmap(counts, celda.mod, state.use = 1, cells.use = NULL,
genes.use = NULL, normalize = TRUE, scale_row = scale,
show_genenames = TRUE)
A numeric count matrix.
An object of class celda_G or celda_CG.
Numeric. A transcriptional state to plot.
Numeric or character. If a number, plot only this number of cells with respectively highest and lowest proportions of counts in the transcriptional state. If a list of cell names, plot only these cells orderd by their proportions of counts in the transcriptional state from left to right. If NULL, plot all cells (NULL by default).
Numeric or character. If a number, plot only this number of genes with respectively highest and lowest proportions of counts in the transcriptional state. If a list of gene names, plot only these genes orderd by their proportions of counts in the transcriptional state from the bottom up. If NULL, plot all genes in the transcriptional state (NULL by default).
Logical. Should the columns be normmalized? Set to FALSE to disable. 'normalizeCounts' normalizes to counts per million (CPM) (default by TRUE).
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.
Logical; specifying if gene names should be shown. Default to be TRUE.