Extract all cell barcodes for a specific identity
# S3 method for liger
WhichCells(
object,
idents = NULL,
ident_col = NULL,
by_dataset = FALSE,
invert = FALSE,
...
)
LIGER object name.
identities to extract cell barcodes.
name of meta data column to use when subsetting cells by identity values.
Default is NULL, which will use the objects default clustering as the ident_col
.
logical, whether to return vector with cell barcodes for all idents
in or
to return list (1 entry per dataset with vector of cells) (default is FALSE; return vector).
logical, invert the selection of cells (default is FALSE).
Arguments passed to other methods
vector or list depending on by_dataset
parameter
if (FALSE) {
# Extract cells from ident =1 in current default clustering
ident1_cells <- WhichCells(object = liger_object, idents = 1)
# Extract all cells from "stim" treatment from object
stim_cells <- WhichCells(object = liger_object, idents = "stim", ident_col = "Treatment")
}