get_clade_nodes: Find internal clade nodes ancestral to named/numbered sets of...

View source: R/ggtree_function_extensions.R

get_clade_nodesR Documentation

Find internal clade nodes ancestral to named/numbered sets of tip labels (within a tree)

Description

For a tree object with an associated set of clustering (e.g. phylogroups defined by fastANI, or clustering using fastbabs/PopPUNK), retrieve the mrca for those sets of tips alongside the fastbaps/PopPUNK cluster number, as a named vector list.

Usage

get_clade_nodes(tree, clusters_df)

Arguments

tree

Tree object, e.g. read in using ape::read.tree()

clusters_df

Dataframe with two columns: "strain", "cluster", where strain corresponds with tip-label

Value

Named vector list where the values are the internal node numbers, and the names are the cluster numbers.

Examples

get_clade_nodes(tree_object, clusters_dataframe)

djw533/micro.gen.extra documentation built on Nov. 8, 2024, 5:11 a.m.