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

get_within_species_cluster_mrcasR Documentation

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

Description

For a tree object with an associated set of clustering (e.g. phylogroups defined by fastANI), and a finer set of clustering (e.g. multi-level clustering of bacterial genomes using fastbaps/PopPUNK), where all of the clusters in the latter clustering are sets entirely within the former clusters, retrieve the mrca for those sets of tips alongside the fastbaps/PopPUNK cluster number, as a named vector list.

Usage

get_within_species_cluster_mrcas(x, y, z)

Arguments

x

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

y

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

z

Tree object, where the tip-labels correspond with "strain" in x and y

Value

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

Examples

get_within_species_cluster_mrcas(x = phylogroups_dataframe, y = clusters_dataframe, z = ggtree_object)

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