View source: R/initialDebris.R
initialDebris | R Documentation |
Preliminary debris classification
initialDebris(x, score = c("simple", "complex", 1), standardize = TRUE)
x |
A |
score |
A value of "simple", "complex", or "1" that specifies the debris score that should be calculated. Note that the score "1" is from the first release of this package. See details for information on the debris score. |
standardize |
A value of TRUE will compute the debris score using standardized data. The raw data will be used to compute the score if FALSE. It is highly recommended that the data are standardized prior to computing the score because the variables are on different scales. |
The beads are typically the first cell classification that is done because their identification is straightforward. Debris is typically classified after the beads. This is because classifying debris is more straightforward than doublets and labeling them before the doublets aids in doublet classification.
Different event types are labeled iteratively so the labels
vector in the colData will contain all of the labels and
probabilities computed up to this point. Only events that
have a "cell" label can be assigned an initial event classification of
"debris". This function computes a score that assesses how much an event
looks like debris and then fits a mixture model to assign each event
a class of 1 for debris, -1 for an event that is not debris, or 0
for undetermined or previously assigned to a different event type.
The score is recorded in the score
object in the colData and
the initial classification is recorded in the initial
part of
the colData.
Several options are available for computing the debris score. The following list shows the debris score calculations. Each one can be selected by its number on the following list:
simple: -1 * (2 * DNA + Event_length)
complex: -1 * (2 * DNA + Event_length - Offset - Width)
1: 1 - (2 * DNA + Event_length - Center - Width + Offset)
Note that there were three scores released with the original version of this package that were labeled "1", "2", and "3". Score "1" is the same score and works fairly well. Scores "2" and "3" were found to be poor scores based on further analysis so they are not included in this version of the package.
A SingleCellExperiment
that contains the debris score and the
debris designation for each event. This information is stored in the
score
and initial
objects in the colData for the
SingleCellExperiment
.
data("raw_data", package = "CATALYST")
sce <- readCytof(raw_data, beads = 'Beads', viability = c('cisPt1','cisPt2'))
sce <- initialBead(sce)
sce <- initialDebris(sce)
head(scores(sce))
head(initial(sce))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.