... | ... |
@@ -2,7 +2,7 @@ Package: ggtree |
2 | 2 |
Type: Package |
3 | 3 |
Title: an R package for visualization and annotation of phylogenetic trees with |
4 | 4 |
their covariates and other associated data |
5 |
-Version: 1.15.1 |
|
5 |
+Version: 1.15.2 |
|
6 | 6 |
Authors@R: c( |
7 | 7 |
person("Guangchuang", "Yu", email = "guangchuangyu@gmail.com", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0002-6485-8781")), |
8 | 8 |
person("Tommy Tsan-Yuk", "Lam", email = "tylam.tommy@gmail.com", role = c("aut", "ths")), |
... | ... |
@@ -220,7 +220,7 @@ importFrom(rvcheck,get_fun_from_pkg) |
220 | 220 |
importFrom(scales,alpha) |
221 | 221 |
importFrom(tibble,data_frame) |
222 | 222 |
importFrom(tidyr,gather) |
223 |
-importFrom(tidytree,as_data_frame) |
|
223 |
+importFrom(tidytree,as_tibble) |
|
224 | 224 |
importFrom(tidytree,get_tree_data) |
225 | 225 |
importFrom(tidytree,groupClade) |
226 | 226 |
importFrom(tidytree,groupOTU) |
... | ... |
@@ -25,8 +25,9 @@ set_branch_length <- function(tree_object, branch.length) { |
25 | 25 |
stop("branch.length should be numerical attributes...") |
26 | 26 |
} |
27 | 27 |
|
28 |
- edge <- as_data_frame(phylo$edge) |
|
28 |
+ edge <- phylo$edge |
|
29 | 29 |
colnames(edge) <- c("parent", "node") |
30 |
+ edge <- as_tibble(edge) |
|
30 | 31 |
|
31 | 32 |
dd <- full_join(edge, tree_anno, by = "node") |
32 | 33 |
|
... | ... |
@@ -166,7 +167,7 @@ scaleY <- function(phylo, df, yscale, layout, ...) { |
166 | 167 |
|
167 | 168 |
|
168 | 169 |
## ## used by layoutEqualAngle |
169 |
-## ## will change to tidytree::as_data_frame in future |
|
170 |
+## ## will change to tidytree::as_tibble in future |
|
170 | 171 |
## as.data.frame.phylo_ <- function(x, layout="rectangular", |
171 | 172 |
## branch.length="branch.length", ...) { |
172 | 173 |
## if (branch.length != 'none') { |
... | ... |
@@ -4,7 +4,7 @@ |
4 | 4 |
##' @importFrom tibble data_frame |
5 | 5 |
##' @importFrom dplyr full_join |
6 | 6 |
##' @importFrom dplyr mutate_ |
7 |
-##' @importFrom tidytree as_data_frame |
|
7 |
+##' @importFrom tidytree as_tibble |
|
8 | 8 |
##' @method fortify phylo |
9 | 9 |
##' @export |
10 | 10 |
fortify.phylo <- function(model, data, |
... | ... |
@@ -42,7 +42,7 @@ fortify.phylo <- function(model, data, |
42 | 42 |
N <- Nnode(x, internal.only=FALSE) |
43 | 43 |
xypos <- data_frame(node=1:N, x=xpos, y=ypos) |
44 | 44 |
|
45 |
- df <- as_data_frame(model) %>% |
|
45 |
+ df <- as_tibble(model) %>% |
|
46 | 46 |
mutate_(isTip = ~(! node %in% parent)) |
47 | 47 |
|
48 | 48 |
res <- full_join(df, xypos, by = "node") |
... | ... |
@@ -53,7 +53,7 @@ layoutEqualAngle <- function(model, branch.length ){ |
53 | 53 |
root <- getRoot(tree) |
54 | 54 |
## Convert Phylo tree to data.frame. |
55 | 55 |
## df <- as.data.frame.phylo_(tree) |
56 |
- df <- as_data_frame(model) %>% |
|
56 |
+ df <- as_tibble(model) %>% |
|
57 | 57 |
mutate_(isTip = ~(! node %in% parent)) |
58 | 58 |
|
59 | 59 |
## NOTE: Angles (start, end, angle) are in half-rotation units (radians/pi or degrees/180) |
... | ... |
@@ -672,13 +672,6 @@ getNodesBreadthFirst.df <- function(df){ |
672 | 672 |
|
673 | 673 |
|
674 | 674 |
|
675 |
- |
|
676 |
- |
|
677 |
- |
|
678 |
- |
|
679 |
- |
|
680 |
- |
|
681 |
- |
|
682 | 675 |
##' convert tip or node label(s) to internal node number |
683 | 676 |
##' |
684 | 677 |
##' |
... | ... |
@@ -4,12 +4,14 @@ |
4 | 4 |
\alias{layoutDaylight} |
5 | 5 |
\title{Equal daylight layout method for unrooted trees.} |
6 | 6 |
\usage{ |
7 |
-layoutDaylight(model, branch.length) |
|
7 |
+layoutDaylight(model, branch.length, MAX_COUNT = 5) |
|
8 | 8 |
} |
9 | 9 |
\arguments{ |
10 | 10 |
\item{model}{tree object, e.g. phylo or treedata} |
11 | 11 |
|
12 | 12 |
\item{branch.length}{set to 'none' for edge length of 1. Otherwise the phylogenetic tree edge length is used.} |
13 |
+ |
|
14 |
+\item{MAX_COUNT}{the maximum number of iterations to run (default 5)} |
|
13 | 15 |
} |
14 | 16 |
\value{ |
15 | 17 |
tree as data.frame with equal angle layout. |