subsetLiger {rliger} | R Documentation |
Construct a liger object with a specified subset
Description
The subset can be based on cell names or clusters. This function applies the subsetting to raw.data, norm.data, scale.data, cell.data, H, W, V, H.norm, tsne.coords, and clusters. Note that it does NOT reoptimize the factorization. See optimizeSubset for this functionality.
Usage
subsetLiger(
object,
clusters.use = NULL,
cells.use = NULL,
remove.missing = TRUE
)
Arguments
object |
|
clusters.use |
Clusters to use for subset. |
cells.use |
Vector of cell names to keep from any dataset. |
remove.missing |
Whether to remove genes/cells with no expression when creating new object (default TRUE). |
Value
liger
object with subsetting applied to raw.data, norm.data, scale.data, H, W, V,
H.norm, tsne.coords, and clusters.
Examples
ligerex <- createLiger(list(ctrl = ctrl, stim = stim))
lig.small <- subsetLiger(ligerex, cells.use = c(colnames(ctrl)[1:100], colnames(stim)[1:100]))
[Package rliger version 1.0.1 Index]