A function for rooting and saving a phylogenetic tree.

root_phyloseq_tree(phyloseq_object, tree_path, save_rooted_tree,
  recursive = TRUE)

Arguments

phyloseq_object

A phyloseq object that contains a phylogenetic tree.

tree_path

The path to the existing or desired phylogenetic tree file.

save_rooted_tree

A logical that determines weather or not the rooted tree is saved.

recursive

If the directory doesn't exist, create the parent directories that don't exist as well, Default: TRUE

Value

Returns a phyloseq object with a rooted tree.

Details

This function is a helper function to get a proper phyloseq object for downstream analysis. Some analyses require a rooted tree. The function saves the rooted tree in the phyloseq object. It can also save the tree as a file if desired.

See also

root, read.tree, write.tree

phy_tree

fileutils

Other Phylogenetic Tree Manipulators: pick_new_outgroup, root_by_longest_edge

Examples

# NOT RUN {
if(interactive()){
 #EXAMPLE1
 }
# }