| subsetSCERows | R Documentation |
Used to peform subsetting of a
SingleCellExperiment object using a variety of methods that
indicate the correct rows to keep. The various methods,
index, bool, and rowData, can be used in conjunction
with one another. If returnAsAltExp is set to TRUE,
then the returned object will have the same number of rows as the input
inSCE as the subsetted object will be stored in the
altExp slot.
subsetSCERows(
inSCE,
index = NULL,
bool = NULL,
rowData = NULL,
returnAsAltExp = TRUE,
altExpName = "subset",
prependAltExpName = TRUE
)
inSCE |
Input SingleCellExperiment object. |
index |
Integer vector. Vector of indicies indicating which rows
to keep. If |
bool |
Boolean vector. Vector of |
rowData |
Character. An expression that will identify a subset of rows
using variables found in the |
returnAsAltExp |
Boolean. If |
altExpName |
Character. Name of the alternative experiment object to
add if |
prependAltExpName |
Boolean. If |
A SingleCellExperiment object that has been subsetted by rowData.
Joshua D. Campbell
data(scExample)
# Set a variable up in the rowData indicating mitochondrial genes
rowData(sce)$isMito <- ifelse(grepl("^MT-", rowData(sce)$feature_name),
"yes", "no")
sce <- subsetSCERows(sce, rowData = "isMito == 'yes'")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.