hierarchyToClassificationTree: Hierarchy to Classification Tree

hierarchyToClassificationTreeR Documentation

Hierarchy to Classification Tree

Description

Convert list with cell type hierarchy to classification tree in igraph format

Usage

hierarchyToClassificationTree(hierarchy)

Arguments

hierarchy

list of cell types, where each element represent a cell type. If cell type has some subtypes it's represented as another list, otherwise it's just a string

Value

igraph graph with the type hierarhcy

Examples

  hierarchy <- list(
    Alveolar=c("AT1 Cell", "AT2 Cell"),
    B=c("B Cell", "Ig-producing B cell"),
    NK_T=list(`T`=c("Dividing T cells", "T Cell_Cd8b1 high", "Nuocyte"), "NK Cell"),
    "Endothelial"
  )

  clf_tree <- hierarchyToClassificationTree(hierarchy)


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