celdaProbabilityMap: Probability map for a celda model

celdaProbabilityMapR Documentation

Probability map for a celda model

Description

Renders probability and relative expression heatmaps to visualize the relationship between features and cell populations (or cell populations and samples).

Usage

celdaProbabilityMap(
  sce,
  useAssay = "counts",
  altExpName = "featureSubset",
  level = c("cellPopulation", "sample"),
  ncols = 100,
  col2 = circlize::colorRamp2(c(-2, 0, 2), c("#1E90FF", "#FFFFFF", "#CD2626")),
  title1 = "Absolute probability",
  title2 = "Relative expression",
  showColumnNames = TRUE,
  showRowNames = TRUE,
  rowNamesgp = grid::gpar(fontsize = 8),
  colNamesgp = grid::gpar(fontsize = 12),
  clusterRows = FALSE,
  clusterColumns = FALSE,
  showHeatmapLegend = TRUE,
  heatmapLegendParam = list(title = NULL, legend_height = grid::unit(6, "cm")),
  ...
)

## S4 method for signature 'SingleCellExperiment'
celdaProbabilityMap(
  sce,
  useAssay = "counts",
  altExpName = "featureSubset",
  level = c("cellPopulation", "sample"),
  ncols = 100,
  col2 = circlize::colorRamp2(c(-2, 0, 2), c("#1E90FF", "#FFFFFF", "#CD2626")),
  title1 = "Absolute probability",
  title2 = "Relative expression",
  showColumnNames = TRUE,
  showRowNames = TRUE,
  rowNamesgp = grid::gpar(fontsize = 8),
  colNamesgp = grid::gpar(fontsize = 12),
  clusterRows = FALSE,
  clusterColumns = FALSE,
  showHeatmapLegend = TRUE,
  heatmapLegendParam = list(title = NULL, legend_height = grid::unit(6, "cm")),
  ...
)

Arguments

sce

A SingleCellExperiment object returned by celda_C, celda_G, or celda_CG.

useAssay

A string specifying which assay slot to use. Default "counts".

altExpName

The name for the altExp slot to use. Default "featureSubset".

level

Character. One of "cellPopulation" or "Sample". "cellPopulation" will display the absolute probabilities and relative normalized expression of each module in each cell population. level = "cellPopulation" only works for celda_CG sce objects. "sample" will display the absolute probabilities and relative normalized abundance of each cell population in each sample. Default "cellPopulation".

ncols

The number of colors (>1) to be in the color palette of the absolute probability heatmap.

col2

Passed to col argument of Heatmap. Set color boundaries and colors for the relative expression heatmap.

title1

Passed to column_title argument of Heatmap. Figure title for the absolute probability heatmap.

title2

Passed to column_title argument of Heatmap. Figure title for the relative expression heatmap.

showColumnNames

Passed to show_column_names argument of Heatmap. Show column names.

showRowNames

Passed to show_row_names argument of Heatmap. Show row names.

rowNamesgp

Passed to row_names_gp argument of Heatmap. Set row name font.

colNamesgp

Passed to column_names_gp argument of Heatmap. Set column name font.

clusterRows

Passed to cluster_rows argument of Heatmap. Cluster rows.

clusterColumns

Passed to cluster_columns argument of Heatmap. Cluster columns.

showHeatmapLegend

Passed to show_heatmap_legend argument of Heatmap. Show heatmap legend.

heatmapLegendParam

Passed to heatmap_legend_param argument of Heatmap. Heatmap legend parameters.

...

Additional parameters passed to Heatmap.

Value

A HeatmapList object containing 2 Heatmap-class objects

See Also

celda_C for clustering cells. celda_CG for clustering features and cells

Examples

data(sceCeldaCG)
celdaProbabilityMap(sceCeldaCG)

campbio/celda documentation built on April 5, 2024, 11:47 a.m.