Skip to contents

Returns the cell indices (R-based) and the cell names (usually barcodes) from the object for further downstream usage.

Usage

get_cell_info(x, filtered = TRUE)

# S3 method for class 'ScMap'
get_cell_info(x, filtered = TRUE)

## S7 method for class <bixverse::SingleCells>
get_cell_info(x, filtered = TRUE)

Arguments

x

An object to get the cell info from

filtered

Boolean. If TRUE, only the cells to keep will be returned.

Value

A named vector with elements -> cell_idx, names -> cell_names.

Examples

# cell indices carrying the barcodes as names
sc <- demo_single_cells(prepped = FALSE)
head(get_cell_info(sc), 3)
#> cell_001 cell_002 cell_003 
#>        1        2        3 

unlink(sc@dir_data, recursive = TRUE, force = TRUE)