barcodeRanksPerSample: Barcode Ranks per Sample

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Barcode Ranks per Sample

Usage

1
2
3
4
5
6
7
barcodeRanksPerSample(object, ...)

## S4 method for signature 'SingleCellExperiment'
barcodeRanksPerSample(object, ...)

## S4 method for signature 'seurat'
barcodeRanksPerSample(object, ...)

Arguments

object

Object.

...

Passthrough arguments to DropletUtils::barcodeRanks().

Details

Analyses of droplet-based scRNA-seq data often show a plot of the log-total count against the log-rank of each barcode, where the highest ranks have the largest totals. This is equivalent to a transposed empirical cumulative density plot with log-transformed axes, which focuses on the barcodes with the largest counts. The barcodeRanks function will compute these ranks for all barcodes. Barcodes with the same total count receive the same average rank to avoid problems with discrete runs of the same total.

The function will also identify a number of interesting points on the curve for downstream use, namely the inflection and knee points. Both of these points correspond to a sharp transition between two components of the total count distribution, presumably reflecting the difference between empty droplets with little RNA and cell-containing droplets with much more RNA.

We supply a default setting of df to avoid overfitting the spline, which results in unstability in the higher derivatives (and thus the curvature). This and other arguments to smooth.spline can be tuned if the estimated knee point is not at an appropriate location. We also restrict the fit to lie within the bounds defined by fit.bounds to focus on the region containing the knee point. This allows us to obtain an accurate fit with low df, rather than attempting to model the entire curve.

If fit.bounds is not specified, the upper bound is automatically set to the inflection point, which should lie after the knee point. The lower bound is set to the point at which the first derivative is closest to zero, i.e., the “plateau” region before the knee point. Note that only points with total counts above lower will be considered, regardless of how fit.bounds is defined.

Value

A list with the following elements:

rank:

A numeric vector of average ranks for each column of m.

total:

A numeric vector of total counts for each column of m.

fitted:

A numeric vector of fitted total counts from the spline for each column of m. This is NA for points with x outside of fit.bounds.

knee:

A numeric scalar containing the total count at the knee point.

inflection:

A numeric scalar containing the total count at the inflection point.

Author(s)

Michael Steinbaugh

See Also

DropletUtils::barcodeRanks().

Other Quality Control Functions: filterCells, metrics, plotCellCounts, plotGenesPerCell, plotMitoRatio, plotMitoVsCoding, plotNovelty, plotQC, plotReadsPerCell, plotUMIsPerCell, plotZerosVsDepth

Examples

1
2
3
# SingleCellExperiment ====
x <- barcodeRanksPerSample(cellranger_small)
names(x)

WeiSong-bio/roryk-bcbioSinglecell documentation built on July 6, 2019, 12:03 a.m.