... | ... |
@@ -43,4 +43,4 @@ BugReports: https://github.com/GuangchuangYu/ggtree/issues |
43 | 43 |
Packaged: 2014-12-03 08:16:14 UTC; root |
44 | 44 |
biocViews: Alignment, Annotation, Clustering, DataImport, |
45 | 45 |
MultipleSequenceAlignment, ReproducibleResearch, Software, Visualization |
46 |
-RoxygenNote: 5.0.1 |
|
46 |
+RoxygenNote: 6.0.1 |
... | ... |
@@ -1,5 +1,7 @@ |
1 | 1 |
CHANGES IN VERSION 1.9.4 |
2 | 2 |
------------------------ |
3 |
+ o geom_motif for aligned motif <2017-08-22, Tue> |
|
4 |
+ + https://github.com/GuangchuangYu/ggtree/issues/148 |
|
3 | 5 |
o fixed `R CMD build` error: cannot stat 'ggtree/site_src/themes': No such file or directory <2017-08-22, Tue> |
4 | 6 |
|
5 | 7 |
CHANGES IN VERSION 1.9.3 |
... | ... |
@@ -1,3 +1,37 @@ |
1 |
+##' geom layer to draw aligned motif |
|
2 |
+##' |
|
3 |
+##' |
|
4 |
+##' @title geom_motif |
|
5 |
+##' @param mapping aes mapping |
|
6 |
+##' @param data data |
|
7 |
+##' @param on gene to center (i.e. set middle position of the `on` gene to 0) |
|
8 |
+##' @param ... additional parameters |
|
9 |
+##' @return geom layer |
|
10 |
+##' @export |
|
11 |
+##' @author guangchuang yu |
|
12 |
+geom_motif <- function(mapping, data, on, ...) { |
|
13 |
+ if (is.null(unlist(mapping)$y)) { |
|
14 |
+ seqnames <- as.character(unlist(mapping)$group) |
|
15 |
+ } else { |
|
16 |
+ seqnames <- as.character(unlist(mapping)$y) |
|
17 |
+ } |
|
18 |
+ |
|
19 |
+ if (is.null(unlist(mapping$fill))) { |
|
20 |
+ id <- as.character(unlist(mapping$id)) |
|
21 |
+ } else { |
|
22 |
+ id <- as.character(unlist(mapping$fill)) |
|
23 |
+ } |
|
24 |
+ dd <- data[unlist(data[, id]) == on,] |
|
25 |
+ mid <- dd$start + (dd$end - dd$start)/2 |
|
26 |
+ names(mid) <- as.character(unlist(dd[, seqnames])) |
|
27 |
+ adj <- mid[as.character(unlist(data[, seqnames]))] |
|
28 |
+ data$start <- data$start - adj |
|
29 |
+ data$end <- data$end - adj |
|
30 |
+ geom_gene_arrow <- get_fun_from_pkg("gggenes", "geom_gene_arrow") |
|
31 |
+ geom_gene_arrow(mapping = mapping, data = as.data.frame(data), ...) |
|
32 |
+} |
|
33 |
+ |
|
34 |
+ |
|
1 | 35 |
plot_fantree <- function(fantree, upper=TRUE) { |
2 | 36 |
if (upper) { |
3 | 37 |
ymin <- -.25 |
... | ... |
@@ -4,9 +4,9 @@ ggtree: an R package for visualization and annotation of phylogenetic trees with |
4 | 4 |
|
5 | 5 |
<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/ggtree/ggtree.png" height="200" align="right" /> |
6 | 6 |
|
7 |
-[](https://bioconductor.org/packages/ggtree) [](https://github.com/guangchuangyu/ggtree) [](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) |
|
7 |
+[](https://bioconductor.org/packages/ggtree) [](https://github.com/guangchuangyu/ggtree) [](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) |
|
8 | 8 |
|
9 |
-[](http://www.repostatus.org/#active) [](https://codecov.io/gh/GuangchuangYu/ggtree) [](https://github.com/GuangchuangYu/ggtree/commits/master) [](https://github.com/GuangchuangYu/ggtree/network) [](https://github.com/GuangchuangYu/ggtree/stargazers) [](https://awesome-r.com/#awesome-r-graphic-displays) |
|
9 |
+[](http://www.repostatus.org/#active) [](https://codecov.io/gh/GuangchuangYu/ggtree) [](https://github.com/GuangchuangYu/ggtree/commits/master) [](https://github.com/GuangchuangYu/ggtree/network) [](https://github.com/GuangchuangYu/ggtree/stargazers) [](https://awesome-r.com/#awesome-r-graphic-displays) |
|
10 | 10 |
|
11 | 11 |
[](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) [](#backers) [](#sponsors) |
12 | 12 |
|
... | ... |
@@ -27,7 +27,7 @@ Please cite the following article when using `ggtree`: |
27 | 27 |
|
28 | 28 |
**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. |
29 | 29 |
|
30 |
-[](http://dx.doi.org/10.1111/2041-210X.12628) [](https://www.altmetric.com/details/10533079) [](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627) |
|
30 |
+[](http://dx.doi.org/10.1111/2041-210X.12628) [](https://www.altmetric.com/details/10533079) [](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627) |
|
31 | 31 |
|
32 | 32 |
------------------------------------------------------------------------ |
33 | 33 |
|
... | ... |
@@ -37,7 +37,7 @@ Please cite the following article when using `ggtree`: |
37 | 37 |
|
38 | 38 |
### Download stats |
39 | 39 |
|
40 |
-[](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) |
|
40 |
+[](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) |
|
41 | 41 |
|
42 | 42 |
<img src="docs/images/dlstats.png" width="890"/> |
43 | 43 |
|
... | ... |
@@ -30,11 +30,10 @@ highlights the two direct descendant clades of an internal node |
30 | 30 |
Particularly useful when studying neighboring clades. Note that balances that |
31 | 31 |
correspond to multichotomies will not be displayed. |
32 | 32 |
} |
33 |
-\author{ |
|
34 |
-Justin Silverman |
|
35 |
-} |
|
36 | 33 |
\references{ |
37 | 34 |
J. Silverman, et al. \emph{A phylogenetic transform enhances |
38 | 35 |
analysis of compositional microbiota data}. (in preparation) |
39 | 36 |
} |
40 |
- |
|
37 |
+\author{ |
|
38 |
+Justin Silverman |
|
39 |
+} |
58 | 57 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,26 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/experimental_function.R |
|
3 |
+\name{geom_motif} |
|
4 |
+\alias{geom_motif} |
|
5 |
+\title{geom_motif} |
|
6 |
+\usage{ |
|
7 |
+geom_motif(mapping, data, on, ...) |
|
8 |
+} |
|
9 |
+\arguments{ |
|
10 |
+\item{mapping}{aes mapping} |
|
11 |
+ |
|
12 |
+\item{data}{data} |
|
13 |
+ |
|
14 |
+\item{on}{gene to center (i.e. set middle position of the `on` gene to 0)} |
|
15 |
+ |
|
16 |
+\item{...}{additional parameters} |
|
17 |
+} |
|
18 |
+\value{ |
|
19 |
+geom layer |
|
20 |
+} |
|
21 |
+\description{ |
|
22 |
+geom layer to draw aligned motif |
|
23 |
+} |
|
24 |
+\author{ |
|
25 |
+guangchuang yu |
|
26 |
+} |
... | ... |
@@ -18,4 +18,3 @@ named list of subtrees with the root id of subtree and list of node id's making |
18 | 18 |
Get all subtrees of node, as well as remaining branches of parent (ie, rest of tree structure as subtree) |
19 | 19 |
return named list of subtrees with list name as starting node id. |
20 | 20 |
} |
21 |
- |
... | ... |
@@ -3,8 +3,9 @@ |
3 | 3 |
\docType{package} |
4 | 4 |
\name{ggtree} |
5 | 5 |
\alias{ggtree} |
6 |
-\alias{ggtree-package} |
|
7 | 6 |
\alias{package-ggtree} |
7 |
+\alias{ggtree-package} |
|
8 |
+\alias{ggtree} |
|
8 | 9 |
\title{visualizing phylogenetic tree and heterogenous associated data based on grammar of graphics |
9 | 10 |
\code{ggtree} provides functions for visualizing phylogenetic tree and its associated data in R.} |
10 | 11 |
\usage{ |
... | ... |
@@ -57,4 +58,3 @@ ggtree(tr) |
57 | 58 |
\author{ |
58 | 59 |
Yu Guangchuang |
59 | 60 |
} |
60 |
- |
... | ... |
@@ -3,12 +3,13 @@ |
3 | 3 |
\docType{methods} |
4 | 4 |
\name{gzoom} |
5 | 5 |
\alias{gzoom} |
6 |
+\alias{gzoom} |
|
7 |
+\alias{gzoom,ggtree-method} |
|
6 | 8 |
\alias{gzoom,beast-method} |
7 | 9 |
\alias{gzoom,codeml-method} |
8 |
-\alias{gzoom,ggtree-method} |
|
10 |
+\alias{gzoom,treedata-method} |
|
9 | 11 |
\alias{gzoom,paml_rst-method} |
10 | 12 |
\alias{gzoom,phylo-method} |
11 |
-\alias{gzoom,treedata-method} |
|
12 | 13 |
\title{gzoom method} |
13 | 14 |
\usage{ |
14 | 15 |
gzoom(object, focus, subtree = FALSE, widths = c(0.3, 0.7), ...) |
... | ... |
@@ -50,4 +51,3 @@ figure |
50 | 51 |
\description{ |
51 | 52 |
zoom selected subtree |
52 | 53 |
} |
53 |
- |
... | ... |
@@ -4,9 +4,9 @@ |
4 | 4 |
\name{scale_color} |
5 | 5 |
\alias{scale_color} |
6 | 6 |
\alias{scale_color,beast-method} |
7 |
+\alias{scale_color,treedata-method} |
|
7 | 8 |
\alias{scale_color,paml_rst-method} |
8 | 9 |
\alias{scale_color,phylo-method} |
9 |
-\alias{scale_color,treedata-method} |
|
10 | 10 |
\title{scale_color method} |
11 | 11 |
\usage{ |
12 | 12 |
scale_color(object, by, ...) |
... | ... |
@@ -33,4 +33,3 @@ color vector |
33 | 33 |
\description{ |
34 | 34 |
scale color by a numerical tree attribute |
35 | 35 |
} |
36 |
- |