Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausVigo committed Dec 29, 2024
1 parent a2f33ed commit a91c088
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/plotBS.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ support <- function(tree, trees, method="FBP", tol=2e-8, scale=TRUE){
if("MCC" %in% method){
trees <- .uncompressTipLabel(trees) # check if needed
if(any(!is.rooted(trees)))
stop("All trees need to be rooted for method 'MCC'!")
stop("All trees need to be rooted!")
x <- prop.clades(tree, trees)
x <- (x / length(trees))
if(!scale) x <- x * 100
Expand Down
4 changes: 2 additions & 2 deletions R/treeRearrangement.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ nnin <- function(tree, n) {
#' @rdname nni
#' @export nni
nni <- function(tree) {
stopifnot(Ntip(tree) > 3-is.rooted(tree))
tip.label <- tree$tip.label
attr(tree, "order") <- NULL
k <- min(tree$edge[, 1]) - 1
Expand Down Expand Up @@ -211,8 +212,7 @@ kSPR <- function(tree, k = NULL) {


oneOf4 <- function(tree, ind1, ind2, from = 1, to = 1, root) {
if (!is.binary(tree))
stop("trees must be binary")
if (!is.binary(tree)) stop("tree must be binary")
tree <- reroot(tree, ind2, FALSE)
kids1 <- Children(tree, ind1)
anc <- Ancestors(tree, ind1, "all")
Expand Down

0 comments on commit a91c088

Please sign in to comment.