Description Usage Arguments Value Examples
Renders a heatmap for selected featureModule
. Cells are
ordered from those with the lowest probability of the module on the left to
the highest probability on the right. Features are ordered from those
with the highest probability in the module
on the top to the lowest probability on the bottom. Use of
save_multi_panel_figure is recommended for
outputting figures in various formats.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | moduleHeatmap(x, ...)
## S4 method for signature 'SingleCellExperiment'
moduleHeatmap(
x,
useAssay = "counts",
altExpName = "featureSubset",
featureModule = NULL,
col = circlize::colorRamp2(c(-2, 0, 2), c("#1E90FF", "#FFFFFF", "#CD2626")),
topCells = 100,
topFeatures = NULL,
normalizedCounts = NA,
normalize = "proportion",
transformationFun = sqrt,
scaleRow = scale,
showFeaturenames = TRUE,
trim = c(-2, 2),
rowFontSize = 6,
showHeatmapLegend = FALSE,
showTopAnnotationLegend = FALSE,
showTopAnnotationName = FALSE,
topAnnotationHeight = 1.5,
showLeftAnnotation = FALSE,
showLeftAnnotationLegend = FALSE,
showLeftAnnotationName = FALSE,
leftAnnotationWidth = 1.5,
width = "auto",
height = "auto",
unit = "mm",
ModuleLabel = "auto",
labelJust = c("right", "bottom"),
...
)
|
x |
A numeric matrix of counts or a
SingleCellExperiment
with the matrix located in the assay slot under |
... |
Additional parameters passed to Heatmap. |
useAssay |
A string specifying which assay
slot to use if |
altExpName |
The name for the altExp slot to use. Default "featureSubset". |
featureModule |
Integer Vector. The featureModule(s) to display.
Multiple modules can be included in a vector. Default |
col |
Passed to Heatmap. Set color boundaries and colors. |
topCells |
Integer. Number of cells with the highest and lowest
probabilities for each module to include in the heatmap. For example, if
|
topFeatures |
Integer. Plot 'topFeatures' features with the highest
probabilities in the module heatmap for each featureModule. If |
normalizedCounts |
Integer matrix. Rows represent features and columns
represent cells. If you have a normalized matrix result from
normalizeCounts, you can pass through the result here to
skip the normalization step in this function. Make sure the colnames and
rownames match the object in x. This matrix should
correspond to one generated from this count matrix
|
normalize |
Character. Passed to normalizeCounts if
|
transformationFun |
Function. Passed to normalizeCounts if
|
scaleRow |
Function. Which function to use to scale each individual row. Set to NULL to disable. Occurs after normalization and log transformation. For example, scale will Z-score transform each row. Default scale. |
showFeaturenames |
Logical. Wheter feature names should be displayed. Default TRUE. |
trim |
Numeric vector. Vector of length two that specifies the lower and upper bounds for plotting the data. This threshold is applied after row scaling. Set to NULL to disable. Default c(-2,2). |
rowFontSize |
Integer. Font size for genes. |
showHeatmapLegend |
Passed to Heatmap. Show legend for expression levels. |
showTopAnnotationLegend |
Passed to HeatmapAnnotation. Show legend for cell annotation. |
showTopAnnotationName |
Passed to HeatmapAnnotation. Show heatmap top annotation name. |
topAnnotationHeight |
Passed to HeatmapAnnotation. Column annotation height. rowAnnotation. Show legend for module annotation. |
showLeftAnnotation |
Show left annotation. Default |
showLeftAnnotationLegend |
Passed to HeatmapAnnotation. Show legend for feature module annotation. |
showLeftAnnotationName |
Passed to rowAnnotation. Show heatmap left annotation name. |
leftAnnotationWidth |
Passed to rowAnnotation. Row annotation width. |
width |
Passed to multi_panel_figure. The width of the output figure. |
height |
Passed to multi_panel_figure. The height of the output figure. |
unit |
Passed to multi_panel_figure. Single character object defining the unit of all dimensions defined. |
ModuleLabel |
Must be
vector of the same length as |
labelJust |
Passed to fill_panel. Justification for the label within the interpanel spacing grob to the top-left of the panel content grob. |
A multi_panel_figure object.
1 2 | data(sceCeldaCG)
moduleHeatmap(sceCeldaCG, width = 250, height = 250)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.