Skip to contents

This function selects n cells by sobj@active.ident factor levels and return the subset Seurat object with only these cells

Usage

sample_cell_barcode(sobj, seed = 1337L, n = 50)

Arguments

sobj

A Seurat object (no default)

seed

INTEGER : a seed for random sampling (default to 1337L)

n

INTEGER : the number of cells to keep in each identity, if possible. Otherwise, take the maximum number of cells available. (default to 50)

Value

Return a Seurat object containing n cells by identity