A function for rooting and saving a phylogenetic tree.
root_phyloseq_tree(phyloseq_object, tree_path, save_rooted_tree, recursive = TRUE)
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 |
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.
# NOT RUN { if(interactive()){ #EXAMPLE1 } # }