A wrapper function to run several QC algorithms on a SingleCellExperiment object containing cells after empty droplets have been removed.
runCellQC(
inSCE,
algorithms = c("QCMetrics", "scDblFinder", "cxds", "bcds", "cxds_bcds_hybrid",
"decontX", "decontX_bg", "soupX", "soupX_bg"),
sample = NULL,
collectionName = NULL,
geneSetList = NULL,
geneSetListLocation = "rownames",
geneSetCollection = NULL,
mitoRef = "human",
mitoIDType = "ensembl",
mitoPrefix = "MT-",
mitoID = NULL,
mitoGeneLocation = "rownames",
useAssay = "counts",
background = NULL,
bgAssayName = NULL,
bgBatch = NULL,
seed = 12345,
paramsList = NULL
)
A SingleCellExperiment object.
Character vector. Specify which QC algorithms to run. Available options are "QCMetrics", "scrublet", "doubletFinder", "scDblFinder", "cxds", "bcds", "cxds_bcds_hybrid", "decontX" and "soupX".
Character vector. Indicates which sample each cell belongs to. Algorithms will be run on cells from each sample separately.
Character. Name of a GeneSetCollection
obtained by
using one of the importGeneSet* functions. Default NULL
.
See runPerCellQC
. Default NULL.
See runPerCellQC
. Default NULL.
See runPerCellQC
. Default NULL.
Arguments used to import mitochondrial genes and quantify their expression. Please see runPerCellQC for detailed information.
A string specifying which assay contains the count matrix for cells.
A SingleCellExperiment
with the matrix located in the assay slot under bgAssayName
. It should have
the same structure as inSCE except it contains the matrix of empty droplets instead
of cells. When supplied, empirical distribution of transcripts from these
empty droplets will be used as the contamination distribution. It is only used in
algorithms "decontX" and "soupX". Default NULL.
Character. Name of the assay to use if background is a
SingleCellExperiment. If NULL, the function
will use the same value as useAssay
. It is only used in algorithms
"decontX" and "soupX". Default is NULL.
Batch labels for background
. If background
is a
SingleCellExperiment object, this can be a single
character specifying a name that can be found in colData(background)
to directly use the barcode annotation Its unique values should be the same
as those in sample
, such that each batch of cells have their corresponding
batch of empty droplets as background, pointed by this parameter. It is only used in
algorithms "decontX" and "soupX". Default to NULL.
Seed for the random number generator. Default 12345.
A list containing parameters for QC functions. Default NULL.
SingleCellExperiment object containing the outputs of the specified algorithms in the colData
of inSCE
.
data(scExample, package = "singleCellTK")
sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
if (FALSE) {
sce <- runCellQC(sce)
}