train_node: Create hierarchical tree

Description Usage Arguments Value Author(s) Examples

View source: R/training.R

Description

Creates a tree object representing a cell-type hierarchy

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
train_node(
  tree,
  data,
  pvar,
  reduction,
  scaledata,
  model,
  allowParallel,
  verbose
)

Arguments

tree

Hierarchy created via create_hierarchy

data

Seurat object containing cells used to train hierarchical models

pvar

Prediction variable. Column name in Seurat object metadata containing the cell labels of the terminal nodes of the hierarchy tree

reduction

Name of reduction in Seurat objet to be used to determine the feature space. Default: "pca"

scaledata

Whether to select variable features and scale the data of the reference object. Default: FALSE

model

Classification model supported via caret package. A list of all models can be found here in https://topepo.github.io/caret/available-models.html

allowParallel

Allow parallel processing for resampling?

verbose

Print Seurat messages

Value

A data.tree object containing the cell type hierarchy

Author(s)

Lieke Michielsen and Jose Alquicira-Hernandez

Examples

1
2
3
branches <- c("Myeloid/DC/pDC", "Myeloid/DC/cDC")
h <- create_hierarchy(branches)
train_tree(data, h)

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