Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausVigo committed Sep 11, 2024
1 parent f191bb4 commit 80baa4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/parsimony.R
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ pratchet <- function(data, start = NULL, method = "fitch", maxit = 1000,
else tree <- stree(nTips, tip.label = nam)
if(add_taxa) tree <- addTaxa(tree, attr(data, "duplicated"))
if(!ROOTED) tree <- unroot(tree)
tree <- relabel(result, ref)
tree <- relabel(tree, ref)
return(tree)
}

Expand Down
3 changes: 2 additions & 1 deletion R/superTree.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ superTree <- function(tree, method = "MRP", rooted = FALSE, trace = 0,
tree <- tree_tmp
}

# start <- allCompat(tree) ??

if (method != "MRP") rooted <- FALSE
if (!rooted) tree <- unroot(tree)
Expand All @@ -192,7 +193,7 @@ superTree <- function(tree, method = "MRP", rooted = FALSE, trace = 0,
}
res <- my.supertree(tree, trace = trace, ...)
if (rooted) {
# if (inherits(res, "multiPhylo")) { # root
# if (inherits(res, "multiPhylo")) {
# res <- lapply(res, root, "ZZZ")
# res <- lapply(res, drop.tip, "ZZZ")
# class(res) <- "multiPhylo"
Expand Down

0 comments on commit 80baa4e

Please sign in to comment.