diff --git a/R/method-fortify.R b/R/method-fortify.R index d2f248ea..386752c9 100644 --- a/R/method-fortify.R +++ b/R/method-fortify.R @@ -448,7 +448,7 @@ as.phylo.phylo4 <- function(phylo4) { ##' @export ##' @author Yu Guangchuang fortify.phylo <- function(model, data, layout="rectangular", - ladderize=TRUE, right=FALSE, mrsd=NULL, as.Date=FALSE, ...) { + ladderize=TRUE, right=FALSE, mrsd=NULL, as.Date=FALSE, ...) { tree <- reorder.phylo(model, 'postorder') if (ladderize == TRUE) { diff --git a/R/tree-utilities.R b/R/tree-utilities.R index 6e7d51e1..5b159e8a 100644 --- a/R/tree-utilities.R +++ b/R/tree-utilities.R @@ -742,7 +742,7 @@ set_branch_length <- function(tree_object, branch.length) { ## if (is(tree_object, "codeml")) { ## tree_anno <- tree_object@mlc@dNdS ## } else - + if (is(tree_object, "codeml_mlc")) { tree_anno <- tree_object@dNdS } else if (is(tree_object, "beast")) { @@ -757,7 +757,7 @@ set_branch_length <- function(tree_object, branch.length) { cn <- cn[!cn %in% c('node', 'parent')] length <- match.arg(branch.length, cn) - + if (all(is.na(as.numeric(tree_anno[, length])))) { stop("branch.length should be numerical attributes...") }