assignCellsByScores: Assign Cells By Scores

assignCellsByScoresR Documentation

Assign Cells By Scores

Description

Assign cell types for each cell based on type scores. Optionally uses 'clusters' to expand annotation.

Usage

assignCellsByScores(
  graph,
  clf.data,
  score.info = NULL,
  clusters = NULL,
  verbose = 0,
  uncertainty.thresholds = c(coverage = 0.5, negative = 0.5, positive = 0.75),
  max.depth = NULL,
  ...
)

Arguments

graph

cell graph from Seurat, Pagoda2 or some other tool. Can be either in igraph or adjacency matrix format. Use 'graph=NULL' to skip graph diffusion step and get raw score annotation (useful when debug marker genes).

clf.data

classification data from 'getClassificationData'

score.info

cell type scores from 'getMarkerScoreInfo' function. Re-estimated if NULL

clusters

vector with cluster labels named by cell ids. Used to expand annotation on these clusters.

verbose

verbosity level (from 0 to 2)

max.depth

maximal depth for which annotation is done. Useful during manual marker selection

...

Arguments passed on to diffuseScorePerType

Value

list with parameters:

  • annotation: annotation per level

  • scores: assignment scores per level

  • annotation.filt: the same as annotation, but cells, which don't pass QC are assigned to NA class

Examples

  clf_data <- getClassificationData(cm, marker_path)
  ann_by_level <- assignCellsByScores(graph, clf_data, clusters=clusters)


khodosevichlab/CellAnnotatoR documentation built on June 29, 2022, 9:12 p.m.