setSpike: Set spike-in features in an SCESet object

Description Usage Arguments Details Value Author(s) Examples

Description

Specify which feature control sets in the SCESet object are spike-ins, i.e., RNA of the same type and quantity added to each cell during the scRNA-seq protocol.

Usage

1
2
3
4
setSpike(object) <- value

## S4 replacement method for signature 'SCESet,'NULL''
setSpike(object) <- value

Arguments

object

a SCESet object.

value

a character vector containing the names of the feature control sets that are spike-ins. If NULL, all spike-in information is removed.

...

arguments passed through generic version of the function.

Details

While it is possible to declare overlapping sets as the spike-in sets with isSpike(x)<-, this is not advisable. This is because some downstream operations assume that each row belongs to only one set (i.e., one of the spike-in sets, or the set of endogenous genes). For example, normalization will use size factors from only one of the sets, so correspondence to multiple sets will not be honoured. Thus, a warning will be raised if overlapping sets are specified in value.

Value

A SCESet object containing spike-in information in featureControlInfo and an updated is_feature_spike vector for extraction with isSpike.

Author(s)

Aaron Lun

Examples

1
2
3
4
5
6
7
8
9
data("sc_example_counts")
data("sc_example_cell_info")
pd <- new("AnnotatedDataFrame", data = sc_example_cell_info)
example_sceset <- newSCESet(countData = sc_example_counts, phenoData = pd)
example_sceset <- calculateQCMetrics(example_sceset,
                            feature_controls = list(ERCC = 1:40, Mito=41:50))
setSpike(example_sceset) <- "ERCC"
featureControlInfo(example_sceset)
summary(isSpike(example_sceset))

dynverse/scaterlegacy documentation built on Feb. 17, 2020, 5:07 a.m.