git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@120612 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -1,5 +1,8 @@ |
1 | 1 |
CHANGES IN VERSION 1.5.11 |
2 | 2 |
------------------------ |
3 |
+ o gheatmap works with matrix <2016-08-28, Sun> |
|
4 |
+ + https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/bioc-ggtree/2YLvXHMJJ6U/c4zS7yfGCAAJ |
|
5 |
+ o support parsing expression in geom_strip <2016-08-18, Thu> |
|
3 | 6 |
o bug fixed in geom_tiplab <2016-08-17, Wed> |
4 | 7 |
+ https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/bioc-ggtree/Tm9ULK7hd9E/HviXEh3CBwAJ |
5 | 8 |
o update citation info, add doi. <2016-08-16, Tue> |
... | ... |
@@ -16,13 +16,15 @@ |
16 | 16 |
##' @param hjust hjust |
17 | 17 |
##' @param fill fill label background, only work with geom='label' |
18 | 18 |
##' @param family sans by default, can be any supported font |
19 |
+##' @param parse logical, whether parse label |
|
19 | 20 |
##' @param ... additional parameter |
20 | 21 |
##' @return ggplot layers |
21 | 22 |
##' @export |
22 | 23 |
##' @author Guangchuang Yu |
23 | 24 |
geom_strip <- function(taxa1, taxa2, label=NA, offset=0, offset.text=0, |
24 | 25 |
align=TRUE, barsize=0.5, barextend=0, fontsize=3.88, |
25 |
- angle=0, geom="text", hjust=0, fill=NA, family="sans", ...) { |
|
26 |
+ angle=0, geom="text", hjust=0, fill=NA, family="sans", |
|
27 |
+ parse=FALSE, ...) { |
|
26 | 28 |
mapping <- NULL |
27 | 29 |
data <- NULL |
28 | 30 |
position <- "identity" |
... | ... |
@@ -46,14 +48,14 @@ geom_strip <- function(taxa1, taxa2, label=NA, offset=0, offset.text=0, |
46 | 48 |
align=align, size=fontsize, barextend=barextend, angle=angle, family=family, |
47 | 49 |
mapping=mapping, data=data, geom=geom, hjust=hjust, |
48 | 50 |
position=position, show.legend = show.legend, |
49 |
- inherit.aes = inherit.aes, na.rm=na.rm, ...) |
|
51 |
+ inherit.aes = inherit.aes, na.rm=na.rm, parse=parse, ...) |
|
50 | 52 |
|
51 | 53 |
} else { |
52 | 54 |
layer_text <- stat_stripText(taxa1=taxa1, taxa2=taxa2, label=label, offset=offset+offset.text, |
53 | 55 |
align=align, size=fontsize, barextend=barextend, angle=angle, fill=fill,family=family, |
54 | 56 |
mapping=mapping, data=data, geom=geom, hjust=hjust, |
55 | 57 |
position=position, show.legend = show.legend, |
56 |
- inherit.aes = inherit.aes, na.rm=na.rm, ...) |
|
58 |
+ inherit.aes = inherit.aes, na.rm=na.rm, parse=parse, ...) |
|
57 | 59 |
} |
58 | 60 |
|
59 | 61 |
list( |
... | ... |
@@ -66,7 +68,7 @@ geom_strip <- function(taxa1, taxa2, label=NA, offset=0, offset.text=0, |
66 | 68 |
stat_stripText <- function(mapping=NULL, data=NULL, |
67 | 69 |
geom="text", position="identity", |
68 | 70 |
taxa1, taxa2, label, offset, align, barextend, ..., |
69 |
- show.legend=NA, inherit.aes=FALSE, na.rm=FALSE) { |
|
71 |
+ show.legend=NA, inherit.aes=FALSE, na.rm=FALSE, parse=FALSE) { |
|
70 | 72 |
|
71 | 73 |
if (is.null(label) || is.na(label)) { |
72 | 74 |
default_aes <- aes_(x=~x, y=~y, node=~node, label=~label) |
... | ... |
@@ -94,6 +96,7 @@ stat_stripText <- function(mapping=NULL, data=NULL, |
94 | 96 |
align=align, |
95 | 97 |
barextend=barextend, |
96 | 98 |
na.rm=na.rm, |
99 |
+ parse=parse, |
|
97 | 100 |
...) |
98 | 101 |
) |
99 | 102 |
|
... | ... |
@@ -43,7 +43,7 @@ gheatmap <- function(p, data, offset=0, width=1, low="green", high="red", color= |
43 | 43 |
df <- df[df$isTip,] |
44 | 44 |
start <- max(df$x) + offset |
45 | 45 |
|
46 |
- dd <- data |
|
46 |
+ dd <- as.data.frame(data) |
|
47 | 47 |
## dd$lab <- rownames(dd) |
48 | 48 |
lab <- df$label[order(df$y)] |
49 | 49 |
dd <- dd[lab, , drop=FALSE] |
... | ... |
@@ -3,9 +3,9 @@ ggtree: an R package for visualization and annotation of phylogenetic trees with |
3 | 3 |
|
4 | 4 |
[](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#archives) [](https://bioconductor.org/checkResults/devel/bioc-LATEST/ggtree/) [](https://travis-ci.org/GuangchuangYu/ggtree) [](https://ci.appveyor.com/project/GuangchuangYu/ggtree) [](http://bioconda.github.io/recipes/bioconductor-ggtree/README.html) |
5 | 5 |
|
6 |
-[](http://www.repostatus.org/#active) [](https://codecov.io/gh/GuangchuangYu/ggtree) [](https://github.com/GuangchuangYu/ggtree/commits/master) [](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#svn_source) [](https://github.com/GuangchuangYu/ggtree/network) [](https://github.com/GuangchuangYu/ggtree/stargazers) |
|
6 |
+[](http://www.repostatus.org/#active) [](https://codecov.io/gh/GuangchuangYu/ggtree) [](https://github.com/GuangchuangYu/ggtree/commits/master) [](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#svn_source) [](https://github.com/GuangchuangYu/ggtree/network) [](https://github.com/GuangchuangYu/ggtree/stargazers) |
|
7 | 7 |
|
8 |
-[](https://bioconductor.org/packages/ggtree) [](https://github.com/GuangchuangYu/ggtree) [](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [](https://support.bioconductor.org/t/ggtree/) [](https://bioconductor.org/packages/stats/bioc/ggtree/) |
|
8 |
+[](https://bioconductor.org/packages/ggtree) [](https://github.com/GuangchuangYu/ggtree) [](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [](https://support.bioconductor.org/t/ggtree/) [](https://bioconductor.org/packages/stats/bioc/ggtree/) |
|
9 | 9 |
|
10 | 10 |
The `ggtree` package extending the `ggplot2` package. It based on grammar of graphics and takes all the good parts of `ggplot2`. `ggtree` is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree. |
11 | 11 |
|
... | ... |
@@ -32,12 +32,6 @@ For details, please visit our project website, <https://guangchuangyu.github.io/ |
32 | 32 |
|
33 | 33 |
[](https://bioconductor.org/packages/stats/bioc/ggtree/) [](https://bioconductor.org/packages/stats/bioc/ggtree/) [](https://bioconductor.org/packages/stats/bioc/ggtree/) |
34 | 34 |
|
35 |
- If you use ggtree in published research, please cite: |
|
36 |
- |
|
37 |
- Guangchuang Yu, David Smith, Huachen Zhu, Yi Guan, Tommy Tsan-Yuk Lam. |
|
38 |
- ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. |
|
39 |
- Methods in Ecology and Evolution 2016, doi:10.1111/2041-210X.12628 |
|
40 |
- |
|
41 | 35 |
+---------------------------+---------------------------+----------------------------+--------+ |
42 | 36 |
| * | |
43 | 37 |
1200 + + |
... | ... |
@@ -7,7 +7,7 @@ |
7 | 7 |
geom_strip(taxa1, taxa2, label = NA, offset = 0, offset.text = 0, |
8 | 8 |
align = TRUE, barsize = 0.5, barextend = 0, fontsize = 3.88, |
9 | 9 |
angle = 0, geom = "text", hjust = 0, fill = NA, family = "sans", |
10 |
- ...) |
|
10 |
+ parse = FALSE, ...) |
|
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
\item{taxa1}{taxa1} |
... | ... |
@@ -38,6 +38,8 @@ geom_strip(taxa1, taxa2, label = NA, offset = 0, offset.text = 0, |
38 | 38 |
|
39 | 39 |
\item{family}{sans by default, can be any supported font} |
40 | 40 |
|
41 |
+\item{parse}{logical, whether parse label} |
|
42 |
+ |
|
41 | 43 |
\item{...}{additional parameter} |
42 | 44 |
} |
43 | 45 |
\value{ |