Skip to content

Commit

Permalink
There was a bug when picking the outgroup for summarisation of trees,…
Browse files Browse the repository at this point in the history
… such tip was hard-coded as t1 and therefore the bug went silent when using simulated trees from ape. However on trees with tip labels other than tN, it failed as t1 was not found to be a tip. Raising patch number.
  • Loading branch information
gaballench committed Aug 18, 2023
1 parent ad83167 commit be3f8b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tbea
Title: Tools for Pre- and Post-processing in Bayesian Evolutionary Analyses
Version: 1.1.1
Version: 1.1.2
Authors@R: c(person("Gustavo A.", "Ballen", email = "gaballench@gmail.com", role = c("aut", "cre")),
person("Sandra", "Reinales", email = "spreinalesl@gmail.com", role = c("aut")))
Description: Package for bayesian inference in phylogenetics and evolution.
Expand All @@ -16,7 +16,7 @@ Imports: ape, Rfit, Hmisc, boot, graphics, stats, utils
License: file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
URL: https://github.com/gaballench/tbea
BugReports: https://github.com/gaballench/tbea/issues
Suggests:
Expand Down
4 changes: 3 additions & 1 deletion R/summaryBrlen.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ summaryBrlen <- function(mphy, method) {
if (inherits(mphy, "multiPhylo")) {
mphy <- list(mphy)
}
# pick an arbitrary branch for rooting
outgroup <- mphy[[1]][[1]]$tip.label[1]
summary_trees <- vector("list", length=length(mphy))
iter <- 1
for (i in mphy) {
rooted_tr <- root(i, outgroup="t1", resolve.root=TRUE)
rooted_tr <- root(i, outgroup=outgroup, resolve.root=TRUE)
for (k in seq_along(rooted_tr)) {
rooted_tr[[k]] <- makeNodeLabel(rooted_tr[[k]], method="md5sum")
}
Expand Down

0 comments on commit be3f8b5

Please sign in to comment.