Return the explicit mapping table between variable_id and nodes in
otu_tree or taxa_tree.
Usage
extract_tree_link_data(object, tree = c("otu_tree", "taxa_tree"))Examples
data("global_patterns", package = "microbiomedataset")
x <- prune_taxa(global_patterns, variable_id = global_patterns@variable_info$variable_id[1:120])
x <- microbiomedataset::convert2microbiome_dataset(
microbiomedataset::convert2phyloseq(x)
)
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
extract_tree_link_data(x, tree = "taxa_tree")[1:6, ]
#> variable_id node node_label tree link_rank
#> 1 549322 128 c__Thermoprotei taxa_tree Class
#> 2 522457 128 c__Thermoprotei taxa_tree Class
#> 3 951 197 s__Sulfolobusacidocaldarius taxa_tree Species
#> 4 244423 126 c__Sd-NA taxa_tree Class
#> 5 586076 126 c__Sd-NA taxa_tree Class
#> 6 246140 126 c__Sd-NA taxa_tree Class
