Browse code

remove apeBootstrap and raxml object support as they were removed from treeio

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@127021 bc3139a8-67e5-0310-9ffc-ced21a209358

Guangchuang Yu authored on 28/02/2017 07:12:21
Showing 14 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: ggtree
2 2
 Type: Package
3 3
 Title: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data
4
-Version: 1.7.7
4
+Version: 1.7.8
5 5
 Authors@R: c(
6 6
 	   person("Guangchuang", "Yu", email = "guangchuangyu@gmail.com", role = c("aut", "cre", "cph")),
7 7
 	   person("Tommy Tsan-Yuk", "Lam", email = "tylam.tommy@gmail.com", rol = c("aut", "ths")),
... ...
@@ -3,7 +3,6 @@
3 3
 S3method(as.binary,phylo)
4 4
 S3method(as.data.frame,phylo)
5 5
 S3method(as.data.frame,treedata)
6
-S3method(fortify,apeBootstrap)
7 6
 S3method(fortify,beast)
8 7
 S3method(fortify,codeml)
9 8
 S3method(fortify,codeml_mlc)
... ...
@@ -19,7 +18,6 @@ S3method(fortify,phylo4)
19 18
 S3method(fortify,phylo4d)
20 19
 S3method(fortify,phyloseq)
21 20
 S3method(fortify,r8s)
22
-S3method(fortify,raxml)
23 21
 S3method(fortify,treedata)
24 22
 S3method(identify,gg)
25 23
 S3method(print,beastList)
... ...
@@ -1,3 +1,7 @@
1
+CHANGES IN VERSION 1.7.8
2
+------------------------
3
+ o remove apeBootstrap and raxml object support as they were removed from treeio <2017-02-28, Tue>
4
+
1 5
 CHANGES IN VERSION 1.7.7
2 6
 ------------------------
3 7
  o supports parse="emoji" in geom_cladelabel, geom_text2, geom_label2, geom_tiplab, geom_tiplab2 <2017-02-16, Thu>
... ...
@@ -33,13 +33,13 @@ get_taxa_name <- function(tree_view=NULL, node) {
33 33
 ##' @author Guangchuang Yu
34 34
 viewClade <- function(tree_view=NULL, node, xmax_adjust=0) {
35 35
     tree_view %<>% get_tree_view
36
-    xd <- tree_view$data$branch.length[node]/2
36
+    ## xd <- tree_view$data$branch.length[node]/2
37 37
 
38 38
     cpos <- get_clade_position(tree_view, node=node)
39 39
     xmax <- ggplot_build(tree_view)$layout$panel_ranges[[1]]$x.range[2]
40 40
 
41 41
     ## tree_view+xlim(cpos$xmin, xmax + xmax_adjust) + ylim(cpos$ymin, cpos$ymax)
42
-    tree_view + coord_cartesian(xlim=c(cpos$xmin-xd, xmax), ylim=c(cpos$ymin, cpos$ymax), expand=FALSE)
42
+    tree_view + coord_cartesian(xlim=c(cpos$xmin, xmax), ylim=c(cpos$ymin, cpos$ymax), expand=FALSE)
43 43
 }
44 44
 
45 45
 
... ...
@@ -51,7 +51,7 @@ geom_cladelabel <- function(node, label, offset=0, offset.text=0,
51 51
         emoji <- get_fun_from_pkg("emojifont", "emoji")
52 52
         label <- emoji(label)
53 53
         parse <- FALSE
54
-        family <- "OpenSansEmoji"
54
+        family <- "EmojiOne"
55 55
     }
56 56
 
57 57
     if (is.null(color)) {
... ...
@@ -1,7 +1,7 @@
1
-##' geom_text2 support aes(subset) via setup_data
1
+##' geom_label2 support aes(subset) via setup_data
2 2
 ##'
3 3
 ##'
4
-##' @title geom_text2
4
+##' @title geom_label2
5 5
 ##' @param mapping the aesthetic mapping
6 6
 ##' @param data A layer specific dataset -
7 7
 ##'             only needed if you want to override he plot defaults.
... ...
@@ -58,7 +58,7 @@ geom_label2 <- function(mapping = NULL, data = NULL,
58 58
         mapping <- modifyList(mapping, label_aes)
59 59
         emoji <- get_fun_from_pkg("emojifont", "emoji")
60 60
         parse <- FALSE
61
-        family <- "OpenSansEmoji"
61
+        family <- "EmojiOne"
62 62
     }
63 63
 
64 64
 
... ...
@@ -48,7 +48,7 @@ geom_text2 <- function(mapping = NULL, data = NULL,
48 48
         mapping <- modifyList(mapping, label_aes)
49 49
         emoji <- get_fun_from_pkg("emojifont", "emoji")
50 50
         parse <- FALSE
51
-        family <- "OpenSansEmoji"
51
+        family <- "EmojiOne"
52 52
     }
53 53
 
54 54
     layer(
... ...
@@ -566,18 +566,18 @@ as.data.frame.phylo_ <- function(x, layout="rectangular",
566 566
 ## }
567 567
 
568 568
 
569
-##' @method fortify raxml
570
-##' @export
571
-fortify.raxml <- function(model, data, layout= "rectangular",
572
-                          ladderize=TRUE, right=FALSE, mrsd=NULL, ...) {
573
-    df <- fortify(get.tree(model), layout=layout, ladderize=ladderize, right=right, mrsd=mrsd, ...)
574
-    df <- merge(df, model@bootstrap, by.x="node", by.y="node", all.x=TRUE)
575
-    append_extraInfo(df, model)
576
-}
569
+## ##' @method fortify raxml
570
+## ##' @export
571
+## fortify.raxml <- function(model, data, layout= "rectangular",
572
+##                           ladderize=TRUE, right=FALSE, mrsd=NULL, ...) {
573
+##     df <- fortify(get.tree(model), layout=layout, ladderize=ladderize, right=right, mrsd=mrsd, ...)
574
+##     df <- merge(df, model@bootstrap, by.x="node", by.y="node", all.x=TRUE)
575
+##     append_extraInfo(df, model)
576
+## }
577 577
 
578
-##' @method fortify apeBootstrap
579
-##' @export
580
-fortify.apeBootstrap <- fortify.raxml
578
+## ##' @method fortify apeBootstrap
579
+## ##' @export
580
+## fortify.apeBootstrap <- fortify.raxml
581 581
 
582 582
 
583 583
 ##' @method fortify multiPhylo
... ...
@@ -60,12 +60,12 @@ setMethod("gzoom", signature(object="ggtree"),
60 60
           })
61 61
 
62 62
 
63
-##' @rdname gzoom-methods
64
-##' @exportMethod gzoom
65
-setMethod("gzoom", signature(object="apeBootstrap"),
66
-          function(object, focus, subtree=FALSE, widths=c(.3, .7)) {
67
-              gzoom.phylo(get.tree(object), focus, subtree, widths)
68
-          })
63
+## ##' @rdname gzoom-methods
64
+## ##' @exportMethod gzoom
65
+## setMethod("gzoom", signature(object="apeBootstrap"),
66
+##           function(object, focus, subtree=FALSE, widths=c(.3, .7)) {
67
+##               gzoom.phylo(get.tree(object), focus, subtree, widths)
68
+##           })
69 69
 
70 70
 
71 71
 ##' zoom selected subtree
... ...
@@ -8,27 +8,27 @@ setMethod("reroot", signature(object="beast"),
8 8
               node_map <- attr(object@phylo, "node_map")
9 9
               idx <- match(object@stats$node, node_map[,1])
10 10
               object@stats$node <- node_map[idx, 2]
11
-              
11
+
12 12
               return(object)
13 13
           })
14 14
 
15
-##' @rdname reroot-methods
16
-##' @exportMethod reroot
17
-setMethod("reroot", signature(object="raxml"),
18
-          function(object, node, ...) {
19
-              object@phylo <- reroot(object@phylo, node, ...)
15
+## ##' @rdname reroot-methods
16
+## ##' @exportMethod reroot
17
+## setMethod("reroot", signature(object="raxml"),
18
+##           function(object, node, ...) {
19
+##               object@phylo <- reroot(object@phylo, node, ...)
20 20
 
21
-              node_map <- attr(object@phylo, "node_map")
22
-              idx <- match(object@bootstrap$node, node_map[,1])
23
-              object@bootstrap$node <- node_map[idx, 2]
24
-              
25
-              return(object)
26
-          })
21
+##               node_map <- attr(object@phylo, "node_map")
22
+##               idx <- match(object@bootstrap$node, node_map[,1])
23
+##               object@bootstrap$node <- node_map[idx, 2]
24
+
25
+##               return(object)
26
+##           })
27 27
 
28 28
 
29 29
 ##' reroot a tree
30 30
 ##'
31
-##' 
31
+##'
32 32
 ##' @rdname reroot-methods
33 33
 ##' @exportMethod reroot
34 34
 setMethod("reroot", signature(object="phylo"),
... ...
@@ -38,7 +38,7 @@ setMethod("reroot", signature(object="phylo"),
38 38
               ## @importFrom phytools reroot
39 39
               phytools <- "phytools"
40 40
               require(phytools, character.only = TRUE)
41
-              
41
+
42 42
               phytools_reroot <- eval(parse(text="phytools::reroot"))
43 43
 
44 44
               tree <- phytools_reroot(object, node, pos)
... ...
@@ -2,9 +2,9 @@
2 2
 ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data
3 3
 ===========================================================================================================================
4 4
 
5
-[![releaseVersion](https://img.shields.io/badge/release%20version-1.6.9-green.svg?style=flat)](https://bioconductor.org/packages/ggtree) [![develVersion](https://img.shields.io/badge/devel%20version-1.7.7-green.svg?style=flat)](https://github.com/GuangchuangYu/ggtree) [![Bioc](http://www.bioconductor.org/shields/years-in-bioc/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [![total](https://img.shields.io/badge/downloads-21822/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![month](https://img.shields.io/badge/downloads-1894/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) <img src="logo.png" align="right" />
5
+[![releaseVersion](https://img.shields.io/badge/release%20version-1.6.9-green.svg?style=flat)](https://bioconductor.org/packages/ggtree) [![develVersion](https://img.shields.io/badge/devel%20version-1.7.8-green.svg?style=flat)](https://github.com/GuangchuangYu/ggtree) [![Bioc](http://www.bioconductor.org/shields/years-in-bioc/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [![total](https://img.shields.io/badge/downloads-22537/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![month](https://img.shields.io/badge/downloads-1894/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) <img src="logo.png" align="right" />
6 6
 
7
-[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![codecov](https://codecov.io/gh/GuangchuangYu/ggtree/branch/master/graph/badge.svg)](https://codecov.io/gh/GuangchuangYu/ggtree) [![Last-changedate](https://img.shields.io/badge/last%20change-2017--02--16-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master) [![GitHub forks](https://img.shields.io/github/forks/GuangchuangYu/ggtree.svg)](https://github.com/GuangchuangYu/ggtree/network) [![GitHub stars](https://img.shields.io/github/stars/GuangchuangYu/ggtree.svg)](https://github.com/GuangchuangYu/ggtree/stargazers) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://awesome-r.com/#awesome-r-graphic-displays)
7
+[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![codecov](https://codecov.io/gh/GuangchuangYu/ggtree/branch/master/graph/badge.svg)](https://codecov.io/gh/GuangchuangYu/ggtree) [![Last-changedate](https://img.shields.io/badge/last%20change-2017--02--28-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master) [![GitHub forks](https://img.shields.io/github/forks/GuangchuangYu/ggtree.svg)](https://github.com/GuangchuangYu/ggtree/network) [![GitHub stars](https://img.shields.io/github/stars/GuangchuangYu/ggtree.svg)](https://github.com/GuangchuangYu/ggtree/stargazers) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://awesome-r.com/#awesome-r-graphic-displays)
8 8
 
9 9
 [![platform](http://www.bioconductor.org/shields/availability/devel/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#archives) [![Build Status](http://www.bioconductor.org/shields/build/devel/bioc/ggtree.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/ggtree/) [![Linux/Mac Travis Build Status](https://img.shields.io/travis/GuangchuangYu/ggtree/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/GuangchuangYu/ggtree) [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/Guangchuangyu/ggtree/master.svg?label=Windows)](https://ci.appveyor.com/project/GuangchuangYu/ggtree) [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-green.svg?style=flat)](http://bioconda.github.io/recipes/bioconductor-ggtree/README.html)
10 10
 
... ...
@@ -18,7 +18,7 @@ Please cite the following article when using `ggtree`:
18 18
 
19 19
 **G Yu**, DK Smith, H Zhu, Y Guan, TTY Lam<sup>\*</sup>. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. ***Methods in Ecology and Evolution***. 2017, 8(1):28-36.
20 20
 
21
-[![doi](https://img.shields.io/badge/doi-10.1111/2041--210X.12628-green.svg?style=flat)](http://dx.doi.org/10.1111/2041-210X.12628) [![citation](https://img.shields.io/badge/cited%20by-7-green.svg?style=flat)](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627) [![Altmetric](https://img.shields.io/badge/Altmetric-351-green.svg?style=flat)](https://www.altmetric.com/details/10533079)
21
+[![doi](https://img.shields.io/badge/doi-10.1111/2041--210X.12628-green.svg?style=flat)](http://dx.doi.org/10.1111/2041-210X.12628) [![citation](https://img.shields.io/badge/cited%20by-7-green.svg?style=flat)](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627) [![Altmetric](https://img.shields.io/badge/Altmetric-352-green.svg?style=flat)](https://www.altmetric.com/details/10533079)
22 22
 
23 23
 ------------------------------------------------------------------------
24 24
 
... ...
@@ -51,7 +51,7 @@ For details, please visit our project website, <https://guangchuangyu.github.io/
51 51
 
52 52
 ### Download stats
53 53
 
54
-[![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree) [![total](https://img.shields.io/badge/downloads-21822/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![month](https://img.shields.io/badge/downloads-1894/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
54
+[![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree) [![total](https://img.shields.io/badge/downloads-22537/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![month](https://img.shields.io/badge/downloads-1894/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
55 55
 
56 56
          ++--------------------+--------------------+--------------------+--------------------+--------+
57 57
          |                                                                                        *    |
... ...
@@ -2,7 +2,7 @@
2 2
 % Please edit documentation in R/geom_label.R
3 3
 \name{geom_label2}
4 4
 \alias{geom_label2}
5
-\title{geom_text2}
5
+\title{geom_label2}
6 6
 \usage{
7 7
 geom_label2(mapping = NULL, data = NULL, ..., family = "sans",
8 8
   parse = FALSE, nudge_x = 0, nudge_y = 0, label.padding = unit(0.25,
... ...
@@ -41,7 +41,7 @@ only needed if you want to override he plot defaults.}
41 41
 label layer
42 42
 }
43 43
 \description{
44
-geom_text2 support aes(subset) via setup_data
44
+geom_label2 support aes(subset) via setup_data
45 45
 }
46 46
 \author{
47 47
 Guangchuang Yu
... ...
@@ -3,7 +3,6 @@
3 3
 \docType{methods}
4 4
 \name{gzoom}
5 5
 \alias{gzoom}
6
-\alias{gzoom,apeBootstrap-method}
7 6
 \alias{gzoom,beast-method}
8 7
 \alias{gzoom,codeml-method}
9 8
 \alias{gzoom,ggtree-method}
... ...
@@ -17,9 +16,6 @@ gzoom(object, focus, subtree = FALSE, widths = c(0.3, 0.7), ...)
17 16
 \S4method{gzoom}{ggtree}(object, focus, widths = c(0.3, 0.7),
18 17
   xmax_adjust = 0)
19 18
 
20
-\S4method{gzoom}{apeBootstrap}(object, focus, subtree = FALSE,
21
-  widths = c(0.3, 0.7))
22
-
23 19
 \S4method{gzoom}{beast}(object, focus, subtree = FALSE, widths = c(0.3,
24 20
   0.7))
25 21
 
... ...
@@ -5,15 +5,12 @@
5 5
 \alias{reroot}
6 6
 \alias{reroot,beast-method}
7 7
 \alias{reroot,phylo-method}
8
-\alias{reroot,raxml-method}
9 8
 \title{reroot method}
10 9
 \usage{
11 10
 reroot(object, node, ...)
12 11
 
13 12
 \S4method{reroot}{beast}(object, node, ...)
14 13
 
15
-\S4method{reroot}{raxml}(object, node, ...)
16
-
17 14
 \S4method{reroot}{phylo}(object, node, ...)
18 15
 }
19 16
 \arguments{