label_cells: barebones cell labeling function

Description Usage Arguments Details Value

View source: R/label_cells.R

Description

Uses singleR to label celltypes. More sophisticated users may want to work directly with SingleR input and output for (e.g.) specific gene sets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
label_cells(
  txis,
  species = NULL,
  ret = c("sce", "labels"),
  downsample = NULL,
  maxcells = 10,
  mincells = 10,
  label = "label.main",
  ref = NULL,
  ...
)

Arguments

txis

a SingleCellExperiment

species

what species is this from? (autodetect Hs/Mm)

ret

what kind of object to return

downsample

downsample? (if ncol(txis) > 20000, TRUE, else FALSE)

maxcells

maximum number of cells per_sample per cluster (20)

mincells

minimum number of cells per cluster (10)

label

which label to use ("label.main")

ref

a reference SummarizedExperiment (default: HPCD/ImmGen)

...

other arguments passed to SingleR

Details

Autodetection of species will fail if the genome for the SingleCellExperiment does not contain "GRCm", "mm", "GRCh", or "hg". Once reasonable reference datasets are available for GRCz/dr genomes, we will support those too.

Twenty cells per sample per cluster may be an awful lot of cells if you have a large number of samples (i.e. GEMcode preps). Setting maxcells as low as 10, or perhaps even lower (see upcoming cluster-by-sample plots), if the cells comprising a cluster come from across many samples. The quick way to find this out is with a plot,

Value

depending on the value of 'ret', either an SCE or a set of labels


trichelab/velocessor documentation built on Jan. 5, 2022, 6:27 p.m.