-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Function for exporting simulated trees generated with twt
twt_export_inner_tree <- function(inner, file = NULL,
transmissions = FALSE,
migrations = FALSE,
transitions = FALSE) {
# directly use the internal twt method
phy <- as.phylo(inner,
transmissions = transmissions,
migrations = migrations,
transitions = transitions)
# ensure it is a phylo object
class(phy) <- "phylo"
# Export the tree to a file
if (!is.null(file)) {
ape::write.tree(phy, file = file)
message("Tree exported to: ", file)
}
return(phy)
}
Metadata
Metadata
Assignees
Labels
No labels