Gene selection {scran} | R Documentation |
Details on how gene selection is performed in almost all scran functions.
For functions accepting some matrix x
, we can choose to perform calculations only on a subset of rows with subset.row
.
This can be a logical, integer or character vector indicating the rows of x
to use.
If a character vector, it must contain the names of the rows in x
.
Future support will be added for more estoeric subsetting vectors like the Biocondcutor Rle classes.
The output of running a function with subset.row
will always be the same as the output of subsetting x
beforehand and passing it into the function.
However, it is often more efficient to use subset.row
as we can avoid constructing an intermediate subsetted matrix.
The same reasoning applies for any x
that is a SingleCellExperiment object.
Many functions only make sense when performed on the endogenous genes.
For such functions, spike-in transcripts are automatically removed when the input is a SingleCellExperiment and get.spikes=FALSE
.
This is achieved based on the spike-in information returned by isSpike
.
If get.spikes=TRUE
, no filtering on the spike-in transcripts will be performed.
Filtering will not be performed (and in fact, the argument should be unavailable) if the input is not a SingleCellExperiment object.
If get.spikes=FALSE
and subset.row
is not NULL
, the two selections are intersected.
That is, only the non-spike-in entries of subset.row
will be used in the function.
A number of functions may require special treatment of spike-ins, e.g., trendVar
.
Refer to the corresponding documentation for more details.
Aaron Lun