Assign cell types by given cell markers.

detectCellType(
  seu,
  classifier = CodexPredefined$classifier,
  method = c("Rank", "Boolean"),
  cutoff = 0.5,
  celltypeColumnName = "celltype",
  ...
)

Arguments

seu

A Seurat object.

classifier

A character vector of the cell type assignment markers or a list of celltypes. If it is a character vector, the names of the classifier is the cell type and the content of the classifier is the markers. The order of the classifier is the priority of assignment for celltype_first column in output metadata. The list example please see CodexPredefined$classifier2

method

The cell type assignment method. First the function will convert the probabilities to positive or negative value by cutoff 0.5. Option 'Rank' will use the rank of probabilities for the positive markers. And option 'Boolean' will assign the cell type by the order of classifier for the positive markers.

cutoff

The cutoff value for probabilities.

celltypeColumnName

The column name for celltype in the metadata.

...

Not used.

Value

A Seurat object with metadata celltype (top celltype), celltype_all (all celltype), celltype_first (the first assignment by the pritority of the classifier).