plotSpillmat {CATALYST} | R Documentation

## Spillover matrix heatmap

### Description

Generates a heatmap of the spillover matrix annotated with estimated spill percentages.

### Usage

    plotSpillmat(
      x,
      sm = NULL,
      anno = TRUE,
      isotope_list = CATALYST::isotope_list,
      hm_pal = c("white", "lightcoral", "red2", "darkred"),
      anno_col = "black"
    )

### Arguments

`x` | a `SingleCellExperiment`.
`sm` | spillover matrix to visualize. If NULL, `plotSpillmat` will try and access `metadata(x)$spillover_matrix`.
`anno` | logical. If TRUE (default), spill percentages are shown inside bins and rows are annotated with the total amount of spill received.
`isotope_list` | named list. Used to validate the input spillover matrix. Names should be metals; list elements numeric vectors of their isotopes. See `isotope_list` for the list of isotopes used by default.
`hm_pal` | character vector of colors to interpolate.
`anno_col` | character string specifying the color to use for bin annotations.

### Value

a `ggplot2`-object showing estimated spill percentages as a heatmap with colors ramped to the highest spillover value present.

### Author(s)

Helena L Crowell helena.crowell@uzh.ch

### Examples

    # get single-stained control samples & construct SCE
    data(ss_exp)
    sce <- prepData(ss_exp)

    # debarcode single-positive populations
    bc_ms <- c(139, 141:156, 158:176)
    sce <- assignPrelim(sce, bc_ms, verbose = FALSE)
    sce <- applyCutoffs(estCutoffs(sce))

    # estimate & visualize spillover matrix
    sce <- computeSpillmat(sce)
    plotSpillmat(sce)

[Package CATALYST version 1.16.2 Index]