A function for rooting and saving a phylogenetic tree.
root_phyloseq_tree(
phyloseq_object,
tree_path,
save_rooted_tree,
recursive = TRUE
)A phyloseq object that contains a phylogenetic tree.
The path to the existing or desired phylogenetic tree file.
A logical that determines weather or not the rooted tree is saved.
If the directory doesn't exist, create the parent directories that don't exist as well, Default: TRUE
Returns a phyloseq object with a rooted tree.
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.
phy_tree
fileutils
Other Phylogenetic Tree Manipulators:
pick_new_outgroup(),
root_by_longest_edge()
if (FALSE) { # \dontrun{
if(interactive()){
#EXAMPLE1
}
} # }