Build Lineage Hierarchy from Core Cells
Examples
data("cytoGateR_example", package = "cytoGateR")
image_ids <- SummarizedExperiment::colData(cytoGateR_example)$image_name
spe <- cytoGateR_example[, image_ids == image_ids[1L]]
SummarizedExperiment::colData(spe)$cleaned_core_label <-
SummarizedExperiment::colData(spe)$core_group
SummarizedExperiment::colData(spe)$cleaned_core_label[
SummarizedExperiment::colData(spe)$cleaned_core_label == "Unassigned"
] <- "Unknown"
hc_tree <- build_lineage_hierarchy(spe)
hc_tree$labels
#> [1] "BnTcell" "CD4" "Bcell" "Treg" "Plasma_cell"
#> [6] "Myeloid" "CD8" "Stroma" "Tumor" "Neutrophil"
plot(hc_tree)
