% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/snap-utilities.R
\name{filterCells}
\alias{filterCells}
\title{Cell filtration}
\usage{
filterCells(obj, subset.names, low.thresholds, high.thresholds)
}
\arguments{
\item{obj}{A snap object.}

\item{subset.names}{Attributes used to filter cells c('fragment.num', 'UMI', 'mito.ratio', 'umap.ratio', 'dup.ratio', 'pair.ratio').}

\item{low.thresholds}{Low cutoffs for the parameters (default is -Inf)}

\item{high.thresholds}{High cutoffs for the parameters (default is Inf)}
}
\value{
Returns a snap object containing only the relevant subset of cells
}
\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:
}
\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% for GM12878 cells. Similarly, in mammalian brain, glia cells overall have very 
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.
}
\examples{
data(demo.sp);
filterCells(
obj=demo.sp, 
subset.names=c("UMI"), 
low.thresholds=c(10),
high.thresholds=c(Inf)
);

}
