Extract all cell barcodes for a specific identity

# S3 method for liger
WhichCells(
  object,
  idents = NULL,
  ident_col = NULL,
  by_dataset = FALSE,
  invert = FALSE,
  ...
)

Arguments

object

LIGER object name.

idents

identities to extract cell barcodes.

ident_col

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.

by_dataset

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).

invert

logical, invert the selection of cells (default is FALSE).

...

Arguments passed to other methods

Value

vector or list depending on by_dataset parameter

Examples

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")
}