initialDead: Preliminary viability classification

View source: R/initialDead.R

initialDeadR Documentation

Preliminary viability classification

Description

Preliminary viability classification

Usage

initialDead(x, standardize = FALSE)

Arguments

x

A SingleCellExperiment created with readCytof.

standardize

A value of TRUE will use compute the ddebris score using standardized data. The raw data will be used to compute the score if FALSE. Be careful in using this setting. If channels are denoted as viability channels when the data are imported, they will be given equal weight if the data are standardized. It is common to have a channel labeled as a viability channel and have it not be used as one. This will make it virtually impossible to classify the dead cells. This is why this score defaults to FALSE.

Details

The beads are typically the first cell classification that is done because their identification is straightforward. Debris is typically classified after the beads and doublets classified after the debris. After the doublets are classified, the permeability is assessed. The permeability can be used to determine which cells are alive and which are dead. Dead cells are often gated out prior to gating debris and doublets. However, cleaning with respect to permeability is complicated in that it does not always make sense to clean "dead", or permeable, cells out of the data. Our default method chooses to classify them last because once an event is labeled "dead", it will not be assigned a different label. However, a user may wish to label the permeable, or dead cells right after cleaning the beads so that the "dead" label takes precedence over debris and doublets. Note that "dead" is used in place of permeable for labeling in this package.

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 "dead". This function computes a score that assesses how much an event looks like a permeable cell and then fits a mixture model to assign each event a class of 1 for permeable, -1 for an event that is not permeable, 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.

The viability measures should classify into two fairly clear groups where one is permeable cells and the other is non-permeability. The primary measure for determining permeability is sum of the viability measures. The function initialGuess is used to determine the groups. The members of the group with the largest mean are classified as 'dead' and the rest are classified as not dead.

Value

A SingleCellExperiment that contains the permeability score and the permeability designation for each event. This information is stored in the score and initial objects in the colData for the SingleCellExperiment.

Examples

data("raw_data", package = "CATALYST")
sce <- readCytof(raw_data, beads = 'Beads', viability = c('cisPt1','cisPt2'))
sce <- initialBead(sce)
sce <- initialDebris(sce)
sce <- initialDoublet(sce)
sce <- initialDead(sce)
head(scores(sce))
head(initial(sce))


jillbo1000/cytofQC documentation built on Aug. 23, 2023, 9:47 p.m.