prepare_epifusion_tree.RdThis function prepares a tree or tree posterior, given as an S3 phylo object, for EpiFusion analysis by adding 'time during outbreak' to the node and leaf labels. You must provide an index date (in date form) which is day 0 of your analysis, i.e. the earliest point from which you will model trajectories.
prepare_epifusion_tree(
tree,
index_date,
final_sequence_date,
treefile_path = "processedtree.tree"
)phylogenetic tree or tree posterior with branch lengths in terms of years (in S3 Phylo Object format)
analysis index date (day 0 of your analysis)
date of sampling of the final sequence in the tree or tree posterior
path to the file where the processed tree should be stored (default processedtree.tree)
a tree (in S3 Phylo Object format) with the node and leaf labels in terms of time from the index date. If a tree posterior is passed to the function, nothing is returned to the function and the trees are simply written to the treefile_path