subsetLiger {rliger} | R Documentation |
Subset liger object
Description
This function subsets a liger object with
character feature index and any valid cell index. For datasets based on HDF5,
the filenames of subset H5 files could only be automatically generated for
now. Feature subsetting is based on the intersection of available features
from datasets involved by cellIdx
, while featureIdx = NULL
does
not take the intersection (i.e. nothing done on the feature axis).
a ligerDataset object is also allowed for now and meanwhile,
setting filename
is supported.
Usage
subsetLiger(
object,
featureIdx = NULL,
cellIdx = NULL,
useSlot = NULL,
chunkSize = 1000,
verbose = getOption("ligerVerbose", TRUE),
newH5 = TRUE,
returnObject = TRUE,
...
)
Arguments
object |
A liger or ligerDataset object. |
featureIdx |
Character vector. Missing or |
cellIdx |
Character, logical or numeric index that can subscribe cells.
Missing or |
useSlot |
The slot(s) to only consider. Choose one or more from
|
chunkSize |
Integer. Number of maximum number of cells in each chunk,
Default |
verbose |
Logical. Whether to show information of the progress. Default
|
newH5 |
Whether to create new H5 files on disk for the subset datasets
if involved datasets in the |
returnObject |
Logical, whether to return a liger object
for result. Default |
... |
Arguments passed to |
Value
Subset object
See Also
Examples
pbmc.small <- subsetLiger(pbmc, cellIdx = pbmc$nUMI > 200)
pbmc.small <- pbmc[, pbmc$nGene > 50]