applyCutoffs {CATALYST} | R Documentation

## Single-cell debarcoding (2)

### Description

Applies separation and mahalanobies distance cutoffs.

### Usage

    applyCutoffs(x, assay = "exprs", mhl_cutoff = 30, sep_cutoffs = NULL)

### Arguments

`x` | a `SingleCellExperiment`.
`assay` | character string specifying which assay data to use. Should be one of `assayNames(x)` and correspond to expression-like not count data.
`mhl_cutoff` | numeric mahalanobis distance threshold above which events should be unassigned; ignored if `metadata(x)$mhl_cutoff` exists.
`sep_cutoffs` | non-negative numeric of length one or of same length as the number of rows in the `bc_key(x)`. Specifies the distance separation cutoffs between positive and negative barcode populations below which events should be unassigned. If `NULL` (default), `applyCutoffs` will try to access `metadata(x)$sep_cutoffs`.

### Value

the input `SingleCellExperiment` `x` is returned with updated `colData` columns `"bc_id"` and `"mhl_dist"`, and an additional `int_metadata` slot `"mhl_cutoff"` containing the applied mahalanobies distance cutoff.

### Author(s)

Helena L Crowell helena.crowell@uzh.ch

### References

Zunder, E.R. et al. (2015). Palladium-based mass tag cell barcoding with a doublet-filtering scheme and single-cell deconvolution algorithm. Nature Protocols 10, 316-333.

### Examples

    library(SingleCellExperiment)

    # construct SCE
    data(sample_ff, sample_key)
    sce <- prepData(sample_ff)

    # assign preliminary barcode IDs
    # & estimate separation cutoffs
    sce <- assignPrelim(sce, sample_key)
    sce <- estCutoffs(sce)

    # use estimated population-specific
    # vs. global separation cutoff(s)
    sce1 <- applyCutoffs(sce)
    sce2 <- applyCutoffs(sce, sep_cutoffs = 0.35)

    # compare yields after applying cutoff(s)
    c(global = mean(sce1$bc_id != 0),
    specific = mean(sce2$bc_id != 0))

[Package CATALYST version 1.14.1 Index]