compCytof | R Documentation |
Compensates a mass spectrometry based experiment using a provided spillover matrix & assuming a linear spillover in the experiment.
compCytof(
x,
sm = NULL,
method = c("nnls", "flow"),
assay = "counts",
overwrite = TRUE,
transform = TRUE,
cofactor = NULL,
isotope_list = CATALYST::isotope_list
)
x |
a |
sm |
a spillover matrix. |
method |
|
assay |
character string specifying which assay data to use;
should be one of |
overwrite |
logical; should the specified |
transform |
logical; should normalized counts be
arcsinh-transformed with the specified |
cofactor |
numeric cofactor(s) to use for optional
arcsinh-transformation when |
isotope_list |
named list. Used to validate the input spillover matrix.
Names should be metals; list elements numeric vectors of their isotopes.
See |
If the spillover matrix (SM) does not contain the same set of columns as the input experiment, it will be adapted according to the following rules:
columns present in the SM but not in the input data will be removed from it
non-metal columns present in the input but not in the SM will be added such that they do neither receive nor cause spill
metal columns that have the same mass as a channel present in the SM will receive (but not emit) spillover according to that channel
if an added channel could potentially receive spillover (as it has +/-1M or +16M of, or is of the same metal type as another channel measured), a warning will be issued as there could be spillover interactions that have been missed and may lead to faulty compensation
Compensates the input flowFrame
or,
if x
is a character string, all FCS files in the specified location.
Helena L Crowell helena.crowell@uzh.ch & Vito RT Zanotelli
# deconvolute single-stained control samples
data(ss_exp)
sce <- prepData(ss_exp)
bc_ms <- c(139, 141:156, 158:176)
sce <- assignPrelim(sce, bc_ms)
sce <- applyCutoffs(estCutoffs(sce))
# estimate spillover matrix
sce <- computeSpillmat(sce)
# compensate & store compensated data in separate assays
sce <- compCytof(sce, overwrite = FALSE)
assayNames(sce)
# biscatter before vs. after compensation
chs <- c("Dy162Di", "Dy163Di")
m <- match(chs, channels(sce))
i <- rownames(sce)[m][1]
j <- rownames(sce)[m][2]
par(mfrow = c(1, 2))
for (a in c("exprs", "compexprs")) {
es <- assay(sce, a)
plot(es[i, ], es[j, ], cex = 0.2, pch = 19,
main = a, xlab = i, ylab = j)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.