calculateQCMetrics(object, feature_controls = NULL, technical_feature_controls = NULL, biological_feature_controls = NULL, cell_controls = NULL, nmads = 5, pct_feature_controls_threshold = 80)
technical_feature_controls
is provided.feature_controls
if both arguments are provided.nmads
below the median. Default
value is 5.The following QC metrics are computed:
counts_feature_controls_ERCC
,
counts_feature_controls_MT
and
counts_feature_controls
).
counts_feature_controls
, this is defined for all control sets
and their union.
lowerDetectionLimit
threshold.
object@lowerDetectionLimit
to check the threshold). As with other
metrics for feature controls, defined for all sets of feature controls
(set names appended as above) and their union. So we might commonly get
columns n_detected_feature_controls_ERCC
,
n_detected_feature_controls_MT
and
n_detected_feature_controls
(ERCC and MT genes detected).
is_cell_control_Blank
,
is_cell_control_Bulk
, and is_cell_control
, the latter
including both blanks and bulks as cell controls).These cell-level QC metrics are added as columns to the ``phenotypeData''
slot of the SCESet
object so that they can be inspected and are
readily available for other functions to use. Furthermore, wherever
``counts'' appear in the above metrics, the same metrics will also be
computed for ``exprs'', ``tpm'' and ``fpkm'' values (if TPM and FPKM values
are present in the SCESet
object), with the appropriate term
replacing ``counts'' in the name. The following feature-level QC metrics are
also computed:
is_exprs(object)
is FALSE
) for the feature.is_feature_control_ERCC
and
is_feature_control_MT
) as well as the column named
is_feature_control
, which indicates if the feature belongs to any of
the control sets.These feature-level QC metrics are added as columns to the ``featureData''
slot of the SCESet
object so that they can be inspected and are
readily available for other functions to use. As with the cell-level metrics,
wherever ``counts'' appear in the above, the same metrics will also be
computed for ``exprs'', ``tpm'' and ``fpkm'' values (if TPM and FPKM values
are present in the SCESet
object), with the appropriate term
replacing ``counts'' in the name.
data("sc_example_counts")
data("sc_example_cell_info")
pd <- new("AnnotatedDataFrame", data=sc_example_cell_info)
rownames(pd) <- pd$Cell
example_sceset <- newSCESet(countData=sc_example_counts, phenoData=pd)
example_sceset <- calculateQCMetrics(example_sceset)
## with a set of feature controls define
example_sceset <- calculateQCMetrics(example_sceset, feature_controls = 1:40)
## with both technical and biological feature controls
example_sceset <- calculateQCMetrics(example_sceset,
technical_feature_controls = list(ERCC = 1:40),
biological_feature_controls = list(MT = 50:100))
Run the code above in your browser using DataLab