predictTree: Predict labels of a dataset

Description Usage Arguments Value Author(s) Examples

View source: R/predict.R

Description

Predict the labels of a dataset using a tree object

Usage

1
predictTree(tree, newData, threshold = 0, max.iter.harmony = 10)

Arguments

tree

data.tree object storing the hierarchy and trained classifiers per layer

newData

Seurat object containing cells to annotate

threshold

Threshold used for probabilities to classify cells into classes. All cells below this threshold value will be labels as "unassigned".

max.iter.harmony

Maximum number of clustering iterations by harmony

Value

A Seurat object with additional metadata columns with prediction probabilities associated to each class, a prediction column, indicating the classification based on the provided threshold and a generic_class column without "unassigned" labels.

Author(s)

Lieke Michielsen and Jose Alquicira-Hernandez

Examples

1
2
3
4
branches <- c("Myeloid/DC/pDC", "Myeloid/DC/cDC")
h <- create_hierarchy(branches)
train_tree(dataTrain, h)
dataTest <- predictTree(h, dataTest)

joseah/HierscPred documentation built on Nov. 25, 2021, 12:20 p.m.