filterCells: Cell filtration

View source: R/snap-utilities.R

filterCellsR Documentation

Cell filtration

Description

This function takes a snap object as input and filter cells based on given cutoffs. We next identify the high-quality barcode based on the following metrices:

Usage

filterCells(obj, subset.names, low.thresholds, high.thresholds)

Arguments

obj

A snap object.

subset.names

Attributes used to filter cells c('fragment.num', 'UMI', 'mito.ratio', 'umap.ratio', 'dup.ratio', 'pair.ratio').

low.thresholds

Low cutoffs for the parameters (default is -Inf)

high.thresholds

High cutoffs for the parameters (default is Inf)

Details

1) fragment.num - total number of fragments per barcode; 2) UMI - unique molecular identifier; 3) mito.ratio - mitochondrial ratio; 4) dup.ratio - PCR duplicate ratio; 5) pair.ratio - properly paired ratio; 6) umap.ratio - uniquely mapped ratio;

Note we no longer use reads in peak ratio as a metric for cell selection mainly for two reasons. Reads-in-peak ration is highly cell type specific. For instance, according to published single cell ATAC-seq, human fibroblast (BJ) cells have significantly higher reads in peak ratio (40-60 versus 20-40 different reads in peak ratio distribution compared to neuronal cells. We suspect this may reflect the nucleus size or global chromatin accessibility. Second, pre-defined set of accessibility peaks are incomplete and biased to the dominant populations.

Value

Returns a snap object containing only the relevant subset of cells

Examples

data(demo.sp);
filterCells(
obj=demo.sp, 
subset.names=c("UMI"), 
low.thresholds=c(10),
high.thresholds=c(Inf)
);


r3fang/SnapATAC documentation built on March 29, 2022, 4:33 p.m.