Will automatically convert the minimum spanning trees in a given AntibodyForests object into a phylogenetic tree as a phylo object. This new object will be added into the phylo slot of the AntibodyForests object.

AntibodyForests_phylo(trees, output.format, solve.multichotomies, parallel)

Arguments

trees

nested list of AntibodyForests objects or single object, as obtained from the AntibodyForests function.

output.format

string - 'treedata' will output the phylogenetic tree as a tidytree treedata object, 'phylo' as an ape::phylo object.

solve.multichotomies

boolean - whether to remove multichotomies in the resulting phylogenetic tree using ape::multi2di

parallel

boolean - whether to execute the main subroutine in parallel or not. Requires the 'parallel' R package to be installed.

Value

nested list of AntibodyForests objects for each clonotype and each sample/timepoint or a single object, with a new phylo slot for the phylogenetic tree.

Examples

if (FALSE) {
AntibodyForests_phylo(trees, output.format = 'phylo')
}