Learn R Programming

immunedeconv (version 0.1.1)

find_children: recursively traverse the cell type tree to resolve the mapping.

Description

recursively traverse the cell type tree to resolve the mapping.

Usage

find_children(node, fractions, method_dataset = NULL)

Arguments

node

data.tree::Node corresponding to a controlled vocabulary cell type

fractions

a named list of fractions for each method_cell_type

method_dataset

character identifing the method or dataset in the celltype_mapping. If NULL, the input vector already uses controlled vocabulary.

Value

numeric Either (1) the value of the method_cell_type mapped to cell_type, (2) the sum of all child nodes (recursively) of cell_type (3) NA, if the mapping cannot be resolved, i.e. at least one of the child nodes is missing.