... | ... |
@@ -1,5 +1,7 @@ |
1 | 1 |
CHANGES IN VERSION 1.5.14 |
2 | 2 |
------------------------ |
3 |
+ o unit test for groupOTU and groupClade <2016-09-22, Thu> |
|
4 |
+ o groupOTU label groups by input group names (when input is a named list) <2016-09-22, Thu> |
|
3 | 5 |
o update angle calculation for geom_tiplab <2016-09-13, Thu> |
4 | 6 |
o as.polytomy to collapse binary tree to polytomy by applying 'fun' to selected 'feature' (e.g. bootstrap value less than 70). <2016-09-13, Tue> |
5 | 7 |
+ currently only phylo object supported. |
... | ... |
@@ -3,7 +3,7 @@ ggtree: an R package for visualization and annotation of phylogenetic trees with |
3 | 3 |
|
4 | 4 |
[](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) |
5 | 5 |
|
6 |
-[](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) |
|
6 |
+[](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) |
|
7 | 7 |
|
8 | 8 |
[](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) |
9 | 9 |
|
... | ... |
@@ -166,11 +166,11 @@ |
166 | 166 |
} |
167 | 167 |
</style> |
168 | 168 |
|
169 |
-<div id = 'chart39f5731fe14' class = 'rChart morris'></div> |
|
169 |
+<div id = 'chart10275e5014cf' class = 'rChart morris'></div> |
|
170 | 170 |
|
171 | 171 |
<script type='text/javascript'> |
172 | 172 |
var chartParams = { |
173 |
- "element": "chart39f5731fe14", |
|
173 |
+ "element": "chart10275e5014cf", |
|
174 | 174 |
"width": 800, |
175 | 175 |
"height": 400, |
176 | 176 |
"xkey": "year", |
... | ... |
@@ -184,7 +184,7 @@ |
184 | 184 |
"pubid": "HtEfBTGE9r8C" |
185 | 185 |
} |
186 | 186 |
], |
187 |
-"id": "chart39f5731fe14", |
|
187 |
+"id": "chart10275e5014cf", |
|
188 | 188 |
"labels": "cites" |
189 | 189 |
}, |
190 | 190 |
chartType = "Bar" |
... | ... |
@@ -182,7 +182,7 @@ |
182 | 182 |
}, |
183 | 183 |
{ |
184 | 184 |
"location": "/featuredArticles/", |
185 |
- "text": "Let us know if you have published using \nggtree\n and your publication will be featured here.\n\n\n\n\n\n\n\n\n\n\n\n\n\n .rChart {\n display: block;\n margin-left: auto; \n margin-right: auto;\n width: 800px;\n height: 300px;\n } \n \n\n\n\n\n\n\n\n var chartParams = {\n \"element\": \"chart39f5731fe14\",\n\"width\": 800,\n\"height\": 400,\n\"xkey\": \"year\",\n\"ykeys\": [\n \"cites\" \n],\n\"data\": [\n {\n \"year\": 2016,\n\"cites\": 1,\n\"pubid\": \"HtEfBTGE9r8C\" \n} \n],\n\"id\": \"chart39f5731fe14\",\n\"labels\": \"cites\" \n},\n chartType = \"Bar\"\n new Morris[chartType](chartParams)\n\n\n\n\n 2016\n\n\nLack of GLYCOLATE OXIDASE 1, but not GLYCOLATE OXIDASE 2, attenuates the photorespiratory phenotype of CATALASE2-deficient \nArabidopsis\n\n\nPlant Physiology\n May. 2016 \n\n\n\n\nRange overlap drives chromosome inversion fixation in passerine birds\n\n\nbioRxiv\n May. 2016 \nhttp://dx.doi.org/10.1101/053371\n\n\n\n\nPhenotypic and Genotypic Characteristics of Shiga Toxin-Producing Escherichia coli Isolated from Surface Waters and Sediments in a Canadian Urban-Agricultural Landscape \n\n\nFront. Cell. Infect. Microbiol.\n Apr. 2016 \nhttp://dx.doi.org/10.3389%2Ffcimb.2016.00036\n\n\n\n\nWs-2\n Introgression in a Proportion of \nArabidopsis thaliana Col-0\n Stock Seed Produces Specific Phenotypes and Highlights the Importance of Routine Genetic Verification\n\n\nPlant Cell\n Mar. 2016 \nhttp://dx.doi.org/10.1105/tpc.16.00053\n\n\n\n\n 2015\n\n\nThe population genetics of drug resistance evolution in natural populations of viral, bacterial and eukaryotic pathogens \n\n\nMolecuar Ecology\n Dec. 2015 \nhttp://dx.doi.org/10.1111/mec.13474\n\n\n\n\nGenetic characterization of highly pathogenic H5 influenza viruses from poultry in Taiwan, 2015 \n\n\nInfection, Genetics and Evolution\n Dec. 2015 \nhttp://dx.doi.org/10.1016/j.meegid.2015.12.006\n\n\n\n\nTrans-species polymorphism at antimicrobial innate immunity cathelicidin genes of Atlantic cod and related species \n\n\nPeerJ\n May 2015 \nhttps://doi.org/10.7717/peerj.976", |
|
185 |
+ "text": "Let us know if you have published using \nggtree\n and your publication will be featured here.\n\n\n\n\n\n\n\n\n\n\n\n\n\n .rChart {\n display: block;\n margin-left: auto; \n margin-right: auto;\n width: 800px;\n height: 300px;\n } \n \n\n\n\n\n\n\n\n var chartParams = {\n \"element\": \"chart10275e5014cf\",\n\"width\": 800,\n\"height\": 400,\n\"xkey\": \"year\",\n\"ykeys\": [\n \"cites\" \n],\n\"data\": [\n {\n \"year\": 2016,\n\"cites\": 1,\n\"pubid\": \"HtEfBTGE9r8C\" \n} \n],\n\"id\": \"chart10275e5014cf\",\n\"labels\": \"cites\" \n},\n chartType = \"Bar\"\n new Morris[chartType](chartParams)\n\n\n\n\n 2016\n\n\nLack of GLYCOLATE OXIDASE 1, but not GLYCOLATE OXIDASE 2, attenuates the photorespiratory phenotype of CATALASE2-deficient \nArabidopsis\n\n\nPlant Physiology\n May. 2016 \n\n\n\n\nRange overlap drives chromosome inversion fixation in passerine birds\n\n\nbioRxiv\n May. 2016 \nhttp://dx.doi.org/10.1101/053371\n\n\n\n\nPhenotypic and Genotypic Characteristics of Shiga Toxin-Producing Escherichia coli Isolated from Surface Waters and Sediments in a Canadian Urban-Agricultural Landscape \n\n\nFront. Cell. Infect. Microbiol.\n Apr. 2016 \nhttp://dx.doi.org/10.3389%2Ffcimb.2016.00036\n\n\n\n\nWs-2\n Introgression in a Proportion of \nArabidopsis thaliana Col-0\n Stock Seed Produces Specific Phenotypes and Highlights the Importance of Routine Genetic Verification\n\n\nPlant Cell\n Mar. 2016 \nhttp://dx.doi.org/10.1105/tpc.16.00053\n\n\n\n\n 2015\n\n\nThe population genetics of drug resistance evolution in natural populations of viral, bacterial and eukaryotic pathogens \n\n\nMolecuar Ecology\n Dec. 2015 \nhttp://dx.doi.org/10.1111/mec.13474\n\n\n\n\nGenetic characterization of highly pathogenic H5 influenza viruses from poultry in Taiwan, 2015 \n\n\nInfection, Genetics and Evolution\n Dec. 2015 \nhttp://dx.doi.org/10.1016/j.meegid.2015.12.006\n\n\n\n\nTrans-species polymorphism at antimicrobial innate immunity cathelicidin genes of Atlantic cod and related species \n\n\nPeerJ\n May 2015 \nhttps://doi.org/10.7717/peerj.976", |
|
186 | 186 |
"title": "Featured Articles" |
187 | 187 |
}, |
188 | 188 |
{ |
... | ... |
@@ -36,10 +36,10 @@ Let us know if you have published using `ggtree` and your publication will be fe |
36 | 36 |
} |
37 | 37 |
</style> |
38 | 38 |
|
39 |
-<div id = 'chart39f5731fe14' class = 'rChart morris'></div> |
|
39 |
+<div id = 'chart10275e5014cf' class = 'rChart morris'></div> |
|
40 | 40 |
<script type='text/javascript'> |
41 | 41 |
var chartParams = { |
42 |
- "element": "chart39f5731fe14", |
|
42 |
+ "element": "chart10275e5014cf", |
|
43 | 43 |
"width": 800, |
44 | 44 |
"height": 400, |
45 | 45 |
"xkey": "year", |
... | ... |
@@ -53,7 +53,7 @@ Let us know if you have published using `ggtree` and your publication will be fe |
53 | 53 |
"pubid": "HtEfBTGE9r8C" |
54 | 54 |
} |
55 | 55 |
], |
56 |
-"id": "chart39f5731fe14", |
|
56 |
+"id": "chart10275e5014cf", |
|
57 | 57 |
"labels": "cites" |
58 | 58 |
}, |
59 | 59 |
chartType = "Bar" |
60 | 60 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,35 @@ |
1 |
+context('groupOTU') |
|
2 |
+ |
|
3 |
+test_that('groupOTU', { |
|
4 |
+ nwk <- system.file("extdata", "sample.nwk", package="ggtree") |
|
5 |
+ tree <- read.tree(nwk) |
|
6 |
+ focus <- c("D", "E", "F", "G") |
|
7 |
+ df <- fortify(groupOTU(tree, focus=focus)) |
|
8 |
+ expect_true(all(df$group[df$label %in% focus] == 1)) |
|
9 |
+ |
|
10 |
+ cls <- list(c1=c("A", "B", "C", "D", "E"), |
|
11 |
+ c2=c("F", "G", "H"), |
|
12 |
+ c3=c("L", "K", "I", "J"), |
|
13 |
+ c4="M") |
|
14 |
+ df <- fortify(groupOTU(tree, cls)) |
|
15 |
+ for (i in seq_along(cls)) { |
|
16 |
+ expect_true(all(df$group[df$label %in% cls[[i]]] == names(cls)[i])) |
|
17 |
+ } |
|
18 |
+}) |
|
19 |
+ |
|
20 |
+ |
|
21 |
+context('groupClade') |
|
22 |
+ |
|
23 |
+test_that('groupClade', { |
|
24 |
+ nwk <- system.file("extdata", "sample.nwk", package="ggtree") |
|
25 |
+ tree <- read.tree(nwk) |
|
26 |
+ focus <- c("D", "E", "F", "G") |
|
27 |
+ nodes <- c(21, 17) |
|
28 |
+ df <- fortify(groupClade(tree, node=nodes)) |
|
29 |
+ |
|
30 |
+ for (i in seq_along(nodes)) { |
|
31 |
+ expect_true(all(df$group[df$node %in% ggtree:::get.offspring.df(df, nodes[i])] == i)) |
|
32 |
+ } |
|
33 |
+ |
|
34 |
+}) |
|
35 |
+ |