Browse code

Merge branch 'master' into dev_for_new_ggplot2

xiangpin authored on 06/11/2022 03:25:04
Showing12 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: ggtree
2 2
 Type: Package
3 3
 Title: an R package for visualization of tree and annotation data
4
-Version: 3.5.2.992
4
+Version: 3.7.0
5 5
 Authors@R: c(
6 6
        person("Guangchuang", "Yu",     email = "guangchuangyu@gmail.com", role = c("aut", "cre", "cph"), 
7 7
             comment = c(ORCID = "0000-0002-6485-8781")),
... ...
@@ -1,7 +1,7 @@
1 1
 PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
2 2
 PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
3 3
 PKGSRC  := $(shell basename `pwd`)
4
-BIOCVER := RELEASE_3_15
4
+BIOCVER := RELEASE_3_16
5 5
 
6 6
 
7 7
 all: rd check clean
... ...
@@ -21,7 +21,6 @@ S3method(fortify,treedataList)
21 21
 S3method(fortify,twins)
22 22
 S3method(ggplot_add,cladelab)
23 23
 S3method(ggplot_add,cladelabel)
24
-S3method(ggplot_add,color_subtree)
25 24
 S3method(ggplot_add,facet_plot)
26 25
 S3method(ggplot_add,facet_xlim)
27 26
 S3method(ggplot_add,geom_range)
... ...
@@ -269,8 +268,6 @@ importFrom(rlang,abort)
269 268
 importFrom(rlang,as_name)
270 269
 importFrom(rlang,quo_name)
271 270
 importFrom(scales,alpha)
272
-importFrom(stats,as.hclust)
273
-importFrom(stats,cutree)
274 271
 importFrom(tidyr,gather)
275 272
 importFrom(tidytree,MRCA)
276 273
 importFrom(tidytree,ancestor)
... ...
@@ -1,3 +1,4 @@
1
+
1 2
 <!--
2 3
 
3 4
 # TODO LIST
... ...
@@ -24,8 +25,16 @@
24 25
   - <https://github.com/thomasp85/ggraph/commit/14de66f1225336179b4598cb42a4beda95682211>
25 26
 
26 27
 -->
27
-# ggtree 3.5.2.992
28 28
 
29
+
30
+# ggtree 3.6.0
31
+
32
++ Bioconductor RELEASE_3_16 (2022-11-02, Wed)
33
+
34
+# ggtree 3.5.3
35
+
36
++ add new citation (the iMeta 2022 paper) (2022-09-26, Mon)
37
++ move `scale_color_subtree()` to the 'ggtreeDendro' package (2022-09-23, Fri)
29 38
 + update `fortify` method for `pvclust` object (2022-08-15, Mon)
30 39
 + add citation of the tree data book (2022-08-13, Sat)
31 40
 
... ...
@@ -1,3 +1,25 @@
1
+## defunct since v=3.5.3
2
+
3
+##' scale tree color by subtree (e.g., output of cutree, kmeans, or other clustering algorithm)
4
+##'
5
+##' 
6
+##' @title scale_color_subtree
7
+##' @rdname scale-color-subtree
8
+##' @param group taxa group information
9
+##' @return updated tree view
10
+##' @export
11
+##' @author Guangchuang Yu
12
+scale_color_subtree <- function(group) {
13
+    message("This scale function was moved to the ggtreeDendro package\n",
14
+        "please use 'ggtreeDendro::scale_color_subtree' instead.\n")
15
+    NULL
16
+}
17
+
18
+##' @rdname scale-color-subtree
19
+##' @export
20
+scale_colour_subtree <- scale_color_subtree
21
+
22
+
1 23
 ## ##' annotation taxa with images
2 24
 ## ##'
3 25
 ## ##'
... ...
@@ -174,11 +174,7 @@ ggexpand_internal <- function(plot, ratio, direction, var) {
174 174
     return(res)
175 175
 }
176 176
 
177
-##' @method ggplot_add color_subtree
178
-##' @export
179
-ggplot_add.color_subtree <- function(object, plot, object_name) {
180
-    scale_color_subtree_(plot, object)
181
-}
177
+
182 178
 
183 179
 ##' @method ggplot_add tree_inset
184 180
 ##' @export
... ...
@@ -1,38 +1,4 @@
1
-##' scale tree color by subtree (e.g., output of cutree, kmeans, or other clustering algorithm)
2
-##'
3
-##' 
4
-##' @title scale_color_subtree
5
-##' @rdname scale-color-subtree
6
-##' @param group taxa group information
7
-##' @return updated tree view
8
-##' @export
9
-##' @author Guangchuang Yu
10
-scale_color_subtree <- function(group) {
11
-    if (inherits(group, 'kmeans')) {
12
-        group <- group$cluster
13
-    } 
14
-
15
-    structure(group,
16
-              class = 'color_subtree'
17
-              )
18
-}
19 1
 
20
-##' @rdname scale-color-subtree
21
-##' @importFrom stats as.hclust
22
-##' @importFrom stats cutree
23
-##' @export
24
-scale_colour_subtree <- scale_color_subtree
25
-
26
-scale_color_subtree_ <- function(p, group) {
27
-
28
-    if (is.numeric(group) && length(group) == 1) {
29
-        group <- cutree(as.hclust(as.phylo(p$data)), group)
30
-    } 
31
-
32
-    g <- split(names(group), group)
33
-    groupOTU(p, g, group_name = 'subtree') +
34
-        aes_(color = ~subtree)
35
-}
36 2
 
37 3
 ##' scale color by a numerical tree attribute
38 4
 ##'
... ...
@@ -46,8 +46,6 @@ cat(packageDescription('ggtree')$Description)
46 46
 
47 47
 
48 48
 
49
-For details, please visit <https://yulab-smu.top/treedata-book/>.
50
-
51 49
 
52 50
 ## :writing_hand: Authors
53 51
 
... ...
@@ -55,24 +53,32 @@ Guangchuang YU
55 53
 
56 54
 School of Basic Medical Sciences, Southern Medical University
57 55
 
58
-<https://guangchuangyu.github.io>
56
+<https://yulab-smu.top>
59 57
 
60 58
 [![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/intent/tweet?hashtags=ggtree&url=http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12628/abstract&screen_name=guangchuangyu)
61 59
 [![saythanks](https://img.shields.io/badge/say-thanks-ff69b4.svg)](https://saythanks.io/to/GuangchuangYu)
62 60
 `r badger::badge_custom('follow me on', 'WeChat', 'green', 'https://guangchuangyu.github.io/blog_images/biobabble.jpg')`
63 61
 
64 62
 
63
+
65 64
 If you use `r Biocpkg('ggtree')` in published research, please cite the most appropriate paper(s) from this list:
66 65
 
67
-1. __G Yu__. Using ggtree to visualize data on tree-like structures. __*Current Protocols in Bioinformatics*__, 2020, 69:e96. doi: [10.1002/cpbi.96](https://doi.org/10.1002/cpbi.96).
66
+1. S Xu, L Li, X Luo, M Chen, W Tang, L Zhan, Z Dai, TT. Lam, Y Guan, __G Yu__. Ggtree: A serialized data object for visualization of a phylogenetic tree and annotation data. __*iMeta*__, 2022, 1(4):e56. doi: [10.1002/imt2.56](https://doi.org/10.1002/imt2.56)
67
+2. __G Yu__. Data Integration, Manipulation and Visualization of Phylogenetic Treess (1st edition). __*Chapman and Hall/CRC*__, 2022. doi: [10.1201/9781003279242](https://doi.org/10.1201/9781003279242)
68
+3. __G Yu__. Using ggtree to visualize data on tree-like structures. __*Current Protocols in Bioinformatics*__, 2020, 69:e96. doi: [10.1002/cpbi.96](https://doi.org/10.1002/cpbi.96)
68 69
    - [Source code and data to reproduce figures in the article](https://github.com/GuangchuangYu/ggtree-current-protocols)
69
-2. __G Yu__^\*^, TTY Lam, H Zhu, Y Guan^\*^. Two methods for mapping and visualizing associated data on phylogeny using ggtree. __*Molecular Biology and Evolution*__, 2018, 35(2):3041-3043.
70
-doi: [10.1093/molbev/msy194](https://doi.org/10.1093/molbev/msy194).
70
+4. __G Yu__^\*^, TTY Lam, H Zhu, Y Guan^\*^. Two methods for mapping and visualizing associated data on phylogeny using ggtree. __*Molecular Biology and Evolution*__, 2018, 35(2):3041-3043.
71
+doi: [10.1093/molbev/msy194](https://doi.org/10.1093/molbev/msy194)
71 72
      - [Source code to produce Supplementary Material](https://github.com/GuangchuangYu/plotting_tree_with_data)
72
-3. __G Yu__, DK Smith, H Zhu, Y Guan, TTY Lam^\*^. ggtree: an R package for
73
+5. __G Yu__, DK Smith, H Zhu, Y Guan, TTY Lam^\*^. ggtree: an R package for
73 74
 visualization and annotation of phylogenetic trees with their covariates and
74 75
 other associated data. __*Methods in Ecology and Evolution*__. 2017, 8(1):28-36.
75
-doi: [10.1111/2041-210X.12628](https://doi.org/10.1111/2041-210X.12628).
76
+doi: [10.1111/2041-210X.12628](https://doi.org/10.1111/2041-210X.12628)
77
+
78
+
79
+<center>
80
+<a href="https://www.routledge.com/Data-Integration-Manipulation-and-Visualization-of-Phylogenetic-Trees/Yu/p/book/9781032233574"><img src="https://yulab-smu.top/treedata-book/9781032233574_cover_review.png" style="width:500px;border:2px solid black;"/></a>
81
+</center>
76 82
 
77 83
 
78 84
 ## :sparkling_heart: Contributing
... ...
@@ -81,3 +87,5 @@ We welcome any contributions! By participating in this project you agree to
81 87
 abide by the terms outlined in the [Contributor Code of Conduct](CONDUCT.md).
82 88
 
83 89
 
90
+
91
+
... ...
@@ -1,19 +1,18 @@
1 1
 <!-- README.md is generated from README.Rmd. Please edit that file -->
2 2
 
3
-ggtree: an R package for visualization of phylogenetic trees with their annotation data
4
-=======================================================================================
3
+# ggtree: an R package for visualization of phylogenetic trees with their annotation data
5 4
 
6 5
 <a href="https://yulab-smu.github.io/treedata-book/"><img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/ggtree/ggtree.png" height="200" align="right" /></a>
7 6
 
8 7
 [![platform](http://www.bioconductor.org/shields/availability/devel/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#archives)
9
-[![](https://img.shields.io/badge/release%20version-2.4.1-green.svg)](https://www.bioconductor.org/packages/ggtree)
8
+[![](https://img.shields.io/badge/release%20version-3.4.2-green.svg)](https://www.bioconductor.org/packages/ggtree)
10 9
 [![codecov](https://codecov.io/gh/GuangchuangYu/ggtree/branch/master/graph/badge.svg)](https://codecov.io/gh/GuangchuangYu/ggtree)
11 10
 [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://awesome-r.com/#awesome-r-graphic-displays)
12 11
 
13 12
 <!--
14 13
 [![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)
15 14
 [![Bioc](http://www.bioconductor.org/shields/years-in-bioc/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since)
16
-[![Last-changedate](https://img.shields.io/badge/last%20change-2021--01--08-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master)
15
+[![Last-changedate](https://img.shields.io/badge/last%20change-2022--09--29-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master)
17 16
 
18 17
 ` r badge_devel("guangchuangyu/ggtree", "green")`
19 18
 ` r badge_bioc_download("ggtree", "total", "blue")`
... ...
@@ -26,17 +25,13 @@ grammar of graphics. ‘ggtree’ is designed for visualization and
26 25
 annotation of phylogenetic trees and other tree-like structures with
27 26
 their annotation data.
28 27
 
29
-For details, please visit
30
-<a href="https://yulab-smu.top/treedata-book/" class="uri">https://yulab-smu.top/treedata-book/</a>.
31
-
32
-:writing\_hand: Authors
28
+## :writing_hand: Authors
33 29
 
34 30
 Guangchuang YU
35 31
 
36 32
 School of Basic Medical Sciences, Southern Medical University
37 33
 
38
-<a href="https://guangchuangyu.github.io" class="uri">https://guangchuangyu.github.io</a>
34
+<https://yulab-smu.top>
39 35
 
40 36
 [![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/intent/tweet?hashtags=ggtree&url=http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12628/abstract&screen_name=guangchuangyu)
41 37
 [![saythanks](https://img.shields.io/badge/say-thanks-ff69b4.svg)](https://saythanks.io/to/GuangchuangYu)
... ...
@@ -46,26 +41,36 @@ If you use [ggtree](http://bioconductor.org/packages/ggtree) in
46 41
 published research, please cite the most appropriate paper(s) from this
47 42
 list:
48 43
 
49
-1.  **G Yu**. Using ggtree to visualize data on tree-like structures.
44
+1.  S Xu, L Li, X Luo, M Chen, W Tang, L Zhan, Z Dai, TT. Lam, Y Guan,
45
+    **G Yu**. Ggtree: A serialized data object for visualization of a
46
+    phylogenetic tree and annotation data. ***iMeta***, 2022, 1(4):e56.
47
+    doi: [10.1002/imt2.56](https://doi.org/10.1002/imt2.56)
48
+2.  **G Yu**. Data Integration, Manipulation and Visualization of
49
+    Phylogenetic Treess (1st edition). ***Chapman and Hall/CRC***, 2022.
50
+    doi: [10.1201/9781003279242](https://doi.org/10.1201/9781003279242)
51
+3.  **G Yu**. Using ggtree to visualize data on tree-like structures.
50 52
     ***Current Protocols in Bioinformatics***, 2020, 69:e96. doi:
51
-    [10.1002/cpbi.96](https://doi.org/10.1002/cpbi.96).
53
+    [10.1002/cpbi.96](https://doi.org/10.1002/cpbi.96)
52 54
     -   [Source code and data to reproduce figures in the
53 55
         article](https://github.com/GuangchuangYu/ggtree-current-protocols)
54
-2.  **G Yu**<sup>\*</sup>, TTY Lam, H Zhu, Y Guan<sup>\*</sup>. Two
56
+4.  **G Yu**<sup>\*</sup>, TTY Lam, H Zhu, Y Guan<sup>\*</sup>. Two
55 57
     methods for mapping and visualizing associated data on phylogeny
56 58
     using ggtree. ***Molecular Biology and Evolution***, 2018,
57 59
     35(2):3041-3043. doi:
58
-    [10.1093/molbev/msy194](https://doi.org/10.1093/molbev/msy194).
60
+    [10.1093/molbev/msy194](https://doi.org/10.1093/molbev/msy194)
59 61
     -   [Source code to produce Supplementary
60 62
         Material](https://github.com/GuangchuangYu/plotting_tree_with_data)
61
-3.  **G Yu**, DK Smith, H Zhu, Y Guan, TTY Lam<sup>\*</sup>. ggtree: an
63
+5.  **G Yu**, DK Smith, H Zhu, Y Guan, TTY Lam<sup>\*</sup>. ggtree: an
62 64
     R package for visualization and annotation of phylogenetic trees
63 65
     with their covariates and other associated data. ***Methods in
64 66
     Ecology and Evolution***. 2017, 8(1):28-36. doi:
65
-    [10.1111/2041-210X.12628](https://doi.org/10.1111/2041-210X.12628).
67
+    [10.1111/2041-210X.12628](https://doi.org/10.1111/2041-210X.12628)
68
+
69
+<center>
70
+<a href="https://www.routledge.com/Data-Integration-Manipulation-and-Visualization-of-Phylogenetic-Trees/Yu/p/book/9781032233574"><img src="https://yulab-smu.top/treedata-book/9781032233574_cover_review.png" style="width:500px;border:2px solid black;"/></a>
71
+</center>
66 72
 
67
-:sparkling\_heart: Contributing
73
+## :sparkling_heart: Contributing
68 74
 
69 75
 We welcome any contributions! By participating in this project you agree
70 76
 to abide by the terms outlined in the [Contributor Code of
... ...
@@ -7,12 +7,41 @@ citEntry(
7 7
 	publisher = "Chapman and Hall/{CRC}",
8 8
     year = "2022",
9 9
 	edition = "1st edition",
10
+    doi = "10.1201/9781003279242",
10 11
     url = "https://www.amazon.com/Integration-Manipulation-Visualization-Phylogenetic-Computational-ebook/dp/B0B5NLZR1Z/",
11 12
     textVersion = paste("Guangchuang Yu. (2022).",
12 13
                         "Data Integration, Manipulation and Visualization of Phylogenetic Trees (1st edition).",
13
-                        "Chapman and Hall/CRC.")   
14
+                        "Chapman and Hall/CRC. doi:10.1201/9781003279242")   
14 15
 )
15 16
 
17
+citEntry(
18
+    entry  = "article",
19
+    title = "Ggtree: A serialized data object for visualization of a phylogenetic tree and annotation data",
20
+    author = personList(
21
+        as.person("Shuangbin Xu"),
22
+        as.person("Lin Li"),
23
+        as.person("Xiao Luo"),
24
+        as.person("Meijun Chen"),
25
+        as.person("Wenli Tang"),
26
+        as.person("Li Zhan"),
27
+        as.person("Zehan Dai"),
28
+        as.person("Tommy T. Lam"),
29
+        as.person("Yi Guan"),
30
+        as.person("Guangchuang Yu")
31
+    ),
32
+    year = "2022",
33
+    journal = "iMeta",
34
+    volume = "1",
35
+    number = "4",
36
+    pages = "e56",
37
+    doi = "10.1002/imt2.56",
38
+    url = "https://onlinelibrary.wiley.com/doi/full/10.1002/imt2.56",
39
+    textVersion = paste("Shuangbin Xu, Lin Li, Xiao Luo, Meijun Chen, Wenli Tang, Li Zhan, Zehan Dai, Tommy T. Lam, Yi Guan, Guangchuang Yu.",
40
+                        "Ggtree: A serialized data object for visualization of a phylogenetic tree and annotation data.",
41
+                        "iMeta 2022, 4(1):e56. doi:10.1002/imt2.56")
42
+)
43
+
44
+
16 45
 citEntry(
17 46
     entry  = "article",
18 47
     title = "Using ggtree to Visualize Data on Tree-Like Structures",
... ...
@@ -29,6 +58,7 @@ citEntry(
29 58
                         "Current Protocols in Bioinformatics, 2020, 69:e96. doi: 10.1002/cpbi.96")   
30 59
 )
31 60
 
61
+
32 62
 citEntry(
33 63
     entry  = "article",
34 64
     title  = "Two methods for mapping and visualizing associated data on phylogeny using ggtree.",
... ...
@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/method-scale-color.R
2
+% Please edit documentation in R/defunct.R
3 3
 \name{scale_color_subtree}
4 4
 \alias{scale_color_subtree}
5 5
 \alias{scale_colour_subtree}
... ...
@@ -1,7 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3
-oldver=RELEASE_3_14
4
-newver=RELEASE_3_15
3
+pkg=$(basename `pwd`) 
4
+oldver=RELEASE_3_15
5
+newver=RELEASE_3_16
5 6
 
6 7
 ## rm old release branch
7 8
 make rmrelease
... ...
@@ -12,6 +13,12 @@ make update
12 13
 ## set current release version
13 14
 sed -i "s/$oldver/$newver/g" Makefile
14 15
 
16
+## add release in NEWS.md
17
+echo "# $pkg\n\n+ Bioconductor $newver ($(date +'%Y-%m-%d, %a'))\n\n" > tmp.md
18
+cat NEWS.md >> tmp.md 
19
+mv tmp.md NEWS.md
20
+
21
+
15 22
 ## commit and push to github
16 23
 git add .
17 24
 git commit -m 'update bioc version'