Description Usage Arguments Details Value Author(s) Examples
View source: R/adaptSpillmat.R
This helper function adapts the columns of a provided spillover matrix such that it is compatible with data having the column names provided.
1 2 3 4 5 6 | adaptSpillmat(
x,
out_chs,
isotope_list = CATALYST::isotope_list,
verbose = TRUE
)
|
x |
a previously calculated spillover matrix. |
out_chs |
the column names that the prepared output spillover matrix should have. Numeric names as well as names of the form MetalMass(Di), e.g. Ir191, Ir191Di or Ir191(Di), will be interpreted as masses with associated metals. |
isotope_list |
named list. Used to validate the input spillover matrix.
Names should be metals; list elements numeric vectors of their isotopes.
See |
verbose |
logical. Should warnings about possibly inaccurate spillover estimates be printed to the console? |
The rules how the spillover matrix is adapted
are explained in compCytof
.
An adapted spillover matrix with
column and row names according to out_chs
.
Helena L Crowell helena.crowell@uzh.ch & Vito RT Zanotelli
1 2 3 4 5 6 7 8 9 10 11 12 13 | # estimate spillover matrix from
# single-stained control samples
data(ss_exp)
sce <- prepData(ss_exp)
bc_ms <- c(139, 141:156, 158:176)
sce <- assignPrelim(sce, bc_ms, verbose = FALSE)
sce <- applyCutoffs(estCutoffs(sce))
sce <- computeSpillmat(sce)
library(SingleCellExperiment)
sm1 <- metadata(sce)$spillover_matrix
sm2 <- adaptSpillmat(sm1, rownames(sce), verbose = FALSE)
all(dim(sm2) == ncol(sm1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.