Browse code

groupOTU label groups by input group names

guangchuang yu authored on 22/09/2016 04:44:24
Showing 2 changed files

... ...
@@ -4,7 +4,7 @@ CHANGES IN VERSION 1.5.14
4 4
  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 5
    + currently only phylo object supported.
6 6
    + add test for as.polytomy
7
-   
7
+
8 8
 CHANGES IN VERSION 1.5.13
9 9
 ------------------------
10 10
  o facet_plot for plotting data with tree <2016-09-06, Tue>
... ...
@@ -14,12 +14,12 @@ CHANGES IN VERSION 1.5.13
14 14
    + colnames_offset_y
15 15
    + hjust
16 16
  o offset parameter in geom_tiplab and geom_tiplab2 <2016-09-05, Mon>
17
- 
17
+
18 18
 CHANGES IN VERSION 1.5.12
19 19
 ------------------------
20 20
  o use data in all layers instead of the base layer for coordination calculation in subview <2016-09-01, Thu>
21 21
  o bug fixed in subview, width & height should be width/2 & height/2 <2016-09-01, Thu>
22
- 
22
+
23 23
 CHANGES IN VERSION 1.5.11
24 24
 ------------------------
25 25
  o gheatmap works with matrix <2016-08-28, Sun>
... ...
@@ -28,27 +28,27 @@ CHANGES IN VERSION 1.5.11
28 28
  o bug fixed in geom_tiplab <2016-08-17, Wed>
29 29
    + https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/bioc-ggtree/Tm9ULK7hd9E/HviXEh3CBwAJ
30 30
  o update citation info, add doi. <2016-08-16, Tue>
31
- 
31
+
32 32
 CHANGES IN VERSION 1.5.10
33 33
 ------------------------
34 34
  o fixed issue #72 for label of geom_treescale not displayed <2016-08-16, Tue>
35 35
    + https://github.com/GuangchuangYu/ggtree/issues/72
36
- 
36
+
37 37
 CHANGES IN VERSION 1.5.9
38 38
 ------------------------
39 39
  o update citation info <2016-08-12, Fri>
40
- 
40
+
41 41
 CHANGES IN VERSION 1.5.8
42 42
 ------------------------
43 43
  o add color parameter in geom_cladelabel, color should be of length 1 or 2 <2016-08-11, Thu>
44 44
  o geom_cladelabel support parsing expression <2016-08-11, Thu>
45
- 
45
+
46 46
 CHANGES IN VERSION 1.5.7
47 47
 ------------------------
48 48
  o geom_strip can accept taxa name as input but labeling strip will not supported.
49 49
    To support labeling strip, user need to input node id  <2016-07-27, Wed>
50
- o nodeid function for converting node label(s) to node id(s) <2016-07-27, Wed> 
51
- 
50
+ o nodeid function for converting node label(s) to node id(s) <2016-07-27, Wed>
51
+
52 52
 CHANGES IN VERSION 1.5.6
53 53
 ------------------------
54 54
  o remove dependency of Biostring for installing ggtree <2016-07-21, Thu>
... ...
@@ -69,7 +69,7 @@ CHANGES IN VERSION 1.5.5
69 69
  o bug fixed if time-scaled tree extend into the BCE. <2016-06-02, Thu>
70 70
    + as.Date won't work for BCE time.
71 71
    + as.Date=FALSE by default in fortify method, just use the time in decimal format (real number, not Date object).
72
- 
72
+
73 73
 CHANGES IN VERSION 1.5.4
74 74
 ------------------------
75 75
  o reroot method for raxml object <2016-05-22, Sun>
... ...
@@ -77,7 +77,7 @@ CHANGES IN VERSION 1.5.4
77 77
  o bug fixed in collapse <2016-05-20, Fri>
78 78
    + if user collapse a node that is an offspring of a collapsed node, print warning msg and return the tree directly
79 79
  o use byte compiler <2016-05-18, Wed>
80
- o change any(is.na()) to anyNA() which is more efficient <2016-05-18, Wed> 
80
+ o change any(is.na()) to anyNA() which is more efficient <2016-05-18, Wed>
81 81
  o https://github.com/Bioconductor-mirror/ggtree/commit/559548c66b51253e8ccb983d353385838a81f106
82 82
 
83 83
 CHANGES IN VERSION 1.5.3
... ...
@@ -86,9 +86,9 @@ CHANGES IN VERSION 1.5.3
86 86
    + add fan layout example in treeVisualization vignette
87 87
    + add open_tree and rotate_tree example in treeManipulation vignette
88 88
  o add angle in ggtree function, fan layout supported <2016-05-12, Thu>
89
- o rotate_tree and open_tree function <2016-05-12, Thu> 
89
+ o rotate_tree and open_tree function <2016-05-12, Thu>
90 90
  o support reading BEAST MCC trees (multiple trees in one file) via the read.beast function <2016-05-12, Thu>
91
- o https://github.com/Bioconductor-mirror/ggtree/commit/51eec4721595c274c24dc4df2f1fdf40700cb1a5 
91
+ o https://github.com/Bioconductor-mirror/ggtree/commit/51eec4721595c274c24dc4df2f1fdf40700cb1a5
92 92
 
93 93
 CHANGES IN VERSION 1.5.2
94 94
 ------------------------
... ...
@@ -101,7 +101,7 @@ CHANGES IN VERSION 1.5.2
101 101
    + https://github.com/GuangchuangYu/ggtree/issues/40
102 102
  o supports phylo4d object <2016-05-10, Tue>
103 103
    + https://github.com/GuangchuangYu/ggtree/issues/47
104
- 
104
+
105 105
 CHANGES IN VERSION 1.5.1
106 106
 ------------------------
107 107
  o update vignettes <2016-05-10, Tue>
... ...
@@ -113,11 +113,11 @@ CHANGES IN VERSION 1.5.1
113 113
    + https://github.com/GuangchuangYu/ggtree/pull/57
114 114
  o geom_strip for associated taxa <2016-05-09, Mon>
115 115
    + https://github.com/GuangchuangYu/ggtree/issues/52
116
- 
116
+
117 117
 CHANGES IN VERSION 1.4.0
118 118
 ------------------------
119 119
  o BioC 3.3 released <2016-05-05, Thu>
120
- 
120
+
121 121
 CHANGES IN VERSION 1.3.16
122 122
 ------------------------
123 123
  o geom_treescale() supports family argument <2016-04-27, Wed>
... ...
@@ -127,7 +127,7 @@ CHANGES IN VERSION 1.3.16
127 127
  o support passing textConnection(text_string) as a file <2016-04-21, Thu>
128 128
    + contributed by Casey Dunn <casey_dunn@brown.edu>
129 129
    + https://github.com/GuangchuangYu/ggtree/pull/55#issuecomment-212859693
130
- 
130
+
131 131
 CHANGES IN VERSION 1.3.15
132 132
 ------------------------
133 133
  o geom_tiplab2 supports parameter hjust <2016-04-18, Mon>
... ...
@@ -135,9 +135,9 @@ CHANGES IN VERSION 1.3.15
135 135
  o geom_label2 that support subsetting <2016-04-07, Thu>
136 136
  o geom_tiplab2 for adding tip label of circular layout <2016-04-06, Wed>
137 137
  o use plot$plot_env to access ggplot2 parameter <2016-04-06, Wed>
138
- o geom_taxalink for connecting related taxa <2016-04-01, Fri> 
138
+ o geom_taxalink for connecting related taxa <2016-04-01, Fri>
139 139
  o geom_range for adding range of HPD to present uncertainty of evolutionary inference <2016-04-01, Fri>
140
- 
140
+
141 141
 CHANGES IN VERSION 1.3.14
142 142
 ------------------------
143 143
  o geom_tiplab works with NA values, compatible with collapse <2016-03-05, Sat>
... ...
@@ -145,12 +145,12 @@ CHANGES IN VERSION 1.3.14
145 145
  o offset works in `align=FFALSE` with `annotation_image` function <2016-02-23, Tue>
146 146
    + see https://github.com/GuangchuangYu/ggtree/issues/46
147 147
  o subview and inset now supports annotating with img files <2016-02-23, Tue>
148
- 
148
+
149 149
 CHANGES IN VERSION 1.3.13
150 150
 ------------------------
151 151
  o add example of rescale_tree function in treeAnnotation.Rmd <2016-02-07, Sun>
152 152
  o geom_cladelabel works with collapse <2016-02-07, Sun>
153
-   + see https://github.com/GuangchuangYu/ggtree/issues/38 
153
+   + see https://github.com/GuangchuangYu/ggtree/issues/38
154 154
 
155 155
 CHANGES IN VERSION 1.3.12
156 156
 ------------------------
... ...
@@ -158,8 +158,8 @@ CHANGES IN VERSION 1.3.12
158 158
  o solved issues of geom_tree2 <2016-01-25, Mon>
159 159
    + https://github.com/hadley/ggplot2/issues/1512
160 160
  o colnames_level parameter in gheatmap <2016-01-25, Mon>
161
- o raxml2nwk function for converting raxml bootstrap tree to newick format <2016-01-25, Mon> 
162
- 
161
+ o raxml2nwk function for converting raxml bootstrap tree to newick format <2016-01-25, Mon>
162
+
163 163
 CHANGES IN VERSION 1.3.11
164 164
 ------------------------
165 165
  o solved issues of geom_tree2 <2016-01-25, Mon>
... ...
@@ -171,7 +171,7 @@ CHANGES IN VERSION 1.3.11
171 171
  o implement geom_tree2 layer that support duplicated node records via the setup_tree_data function <2016-01-21, Thu>
172 172
  o rescale_tree function for rescaling branch length of tree object <2016-01-20, Wed>
173 173
  o upgrade set_branch_length, now branch can be rescaled using feature in extraInfo slot <2016-01-20, Wed>
174
- 
174
+
175 175
 CHANGES IN VERSION 1.3.10
176 176
 ------------------------
177 177
  o remove dependency of gridExtra by implementing multiplot function instead of using grid.arrange <2016-01-20, Wed>
... ...
@@ -185,7 +185,7 @@ CHANGES IN VERSION 1.3.9
185 185
  o viewClade, scaleClade, collapse, expand, rotate, flip, get_taxa_name and scale_x_ggtree accepts input tree_view=NULL.
186 186
    these function will access the last plot if tree_view=NULL. <2016-01-13, Wed>
187 187
    + > ggtree(rtree(30)); viewClade(node=35) works. no need to pipe.
188
- 
188
+
189 189
 CHANGES IN VERSION 1.3.8
190 190
 ------------------------
191 191
  o add example of viewClade in 'Tree Manipulation' vignette <2016-01-13, Wed>
... ...
@@ -195,7 +195,7 @@ CHANGES IN VERSION 1.3.8
195 195
  o 05 advance tree annotation vignette <2016-01-04, Mon>
196 196
  o export theme_inset <2016-01-04, Mon>
197 197
  o inset, nodebar, nodepie functions <2015-12-31, Thu>
198
- 
198
+
199 199
 CHANGES IN VERSION 1.3.7
200 200
 ------------------------
201 201
  o split the long vignette to several vignettes
... ...
@@ -204,14 +204,14 @@ CHANGES IN VERSION 1.3.7
204 204
    + 02 tree visualization <2015-12-28, Mon>
205 205
    + 03 tree manipulation <2015-12-28, Mon>
206 206
    + 04 tree annotation <2015-12-29, Tue>
207
- 
207
+
208 208
 CHANGES IN VERSION 1.3.6
209 209
 ------------------------
210 210
  o MRCA function for finding Most Recent Common Ancestor among a vector of tips <2015-12-22, Tue>
211 211
  o geom_cladelabel: add bar and label to annotate a clade <2015-12-21, Mon>
212 212
    - remove annotation_clade and annotation_clade2 functions.
213 213
  o geom_treescale: tree scale layer. (add_legend was removed) <2015-12-21, Mon>
214
- 
214
+
215 215
 CHANGES IN VERSION 1.3.5
216 216
 ------------------------
217 217
  o bug fixed, read.nhx now works with scientific notation <2015-11-30, Mon>
... ...
@@ -226,12 +226,12 @@ CHANGES IN VERSION 1.3.4
226 226
    + see https://github.com/GuangchuangYu/ggtree/issues/26
227 227
  o support NHX (New Hampshire X) format via read.nhx function <2015-11-17, Tue>
228 228
  o bug fixed in extract.treeinfo.jplace <2015-11-17, Thu>
229
- 
229
+
230 230
 CHANGES IN VERSION 1.3.3
231 231
 ------------------------
232 232
  o support color=NULL in gheatmap, then no colored line will draw within the heatmap <2015-10-30, Fri>
233 233
  o add `angle` for also rectangular, so that it will be available for layout='rectangular' following by coord_polar() <2015-10-27, Tue>
234
- 
234
+
235 235
 CHANGES IN VERSION 1.3.2
236 236
 ------------------------
237 237
  o update vignette, add example of ape bootstrap and phangorn ancestral sequences <2015-10-26, Mon>
... ...
@@ -239,7 +239,7 @@ CHANGES IN VERSION 1.3.2
239 239
    see https://github.com/GuangchuangYu/ggtree/issues/20
240 240
  o add support of ancestral sequences inferred by phangorn <2015-10-26, Mon>
241 241
    see https://github.com/GuangchuangYu/ggtree/issues/21
242
- 
242
+
243 243
 CHANGES IN VERSION 1.3.1
244 244
 ------------------------
245 245
  o change angle to angle + 90, so that label will in radial direction <2015-10-22, Thu>
... ...
@@ -247,17 +247,17 @@ CHANGES IN VERSION 1.3.1
247 247
  o na.rm should be always passed to layer(), fixed it in geom_hilight and geom_text2 <2015-10-21, Wed>
248 248
    + see https://github.com/hadley/ggplot2/issues/1380
249 249
  o matching beast stats with tree using internal node number instead of label <2015-10-20, Tue>
250
- 
250
+
251 251
 CHANGES IN VERSION 1.2.0
252 252
 ------------------------
253 253
  o BioC 3.2 released
254
- 
254
+
255 255
 CHANGES IN VERSION 1.1.21
256 256
 ------------------------
257 257
  o support hyphy output of ancestral sequences that is in phylip sequential format (no TAXALABELS block available) <2015-10-07, Wed>
258 258
  o fixed bug in geom_tiplab when x contains NA (eg, removing by collapse function) <2015-10-01, Thu>
259 259
  o new implementation of geom_hilight, a truly geom layer function <2015-09-10, Thu>
260
- 
260
+
261 261
 CHANGES IN VERSION 1.1.20
262 262
 ------------------------
263 263
  o bug fixed in %add2%, if node available use node, otherwise use label <2015-09-04, Fri>
... ...
@@ -268,7 +268,7 @@ CHANGES IN VERSION 1.1.20
268 268
    + read.r8s, parser function
269 269
    + fortify method
270 270
    + plot, get.tree, get.fields, groupOTU, groupClade, scale_color, gzoom and show methods
271
- o bug fixed in fortify.multiPhylo, convert df$.id to factor of levels=names(multiPhylo_object) <2015-09-02, Wed>   
271
+ o bug fixed in fortify.multiPhylo, convert df$.id to factor of levels=names(multiPhylo_object) <2015-09-02, Wed>
272 272
  o update scale_x_ggtree to support Date as x-axis <2015-09-01, Tue>
273 273
  o add mrsd parameter for user to specify 'most recent sampling date' for time tree <2015-09-01, Tue>
274 274
    - remove 'time_scale' parameter.
... ...
@@ -278,15 +278,15 @@ CHANGES IN VERSION 1.1.20
278 278
    + plot, get.tree, get.fields, groupOTU, groupClade, scale_color, gzoom and show methods
279 279
    + fortify.raxml method
280 280
  o bug fixed in edgeNum2nodeNum for jplace parsing jplace file <2015-09-01, Tue>
281
- 
281
+
282 282
 CHANGES IN VERSION 1.1.19
283 283
 ------------------------
284
- o use fortify instead of fortify.phylo in fortify.multiPhylo, 
284
+ o use fortify instead of fortify.phylo in fortify.multiPhylo,
285 285
    so that multiPhylo can be a list of beast/codeml or other supported objects. <2015-08-31, Mon>
286 286
  o support multiPhylo object, should use + facet_wrap or + facet_grid <2015-08-31, Mon>
287 287
  o remove dependency of EBImage and phytools to speedup the installation process of ggtree <2015-08-31, Mon>
288 288
    + these two packages is not commonly used, and will be loaded automatically when needed.
289
- 
289
+
290 290
 CHANGES IN VERSION 1.1.18
291 291
 ------------------------
292 292
  o layout name change to 'rectangular', 'slanted', 'circular'/'fan' for phylogram and cladogram (if branch.length = 'none')
... ...
@@ -294,37 +294,37 @@ CHANGES IN VERSION 1.1.18
294 294
  o implement geom_point2, geom_text2, geom_segment2 to support subsetting <2015-08-28, Fri>
295 295
      see https://github.com/hadley/ggplot2/issues/1295
296 296
  o update geom_tiplab according to geom_text2 and geom_segment2 <2015-08-28, Fri>
297
- o add geom_tippoint, geom_nodepoint and geom_rootpoint <2015-08-28, Fri> 
298
- 
297
+ o add geom_tippoint, geom_nodepoint and geom_rootpoint <2015-08-28, Fri>
298
+
299 299
 CHANGES IN VERSION 1.1.17
300 300
 ------------------------
301 301
  o bug fixed in rm.singleton.newick by adding support of scientific notation in branch length <2015-08-27, Thu>
302 302
  o bug fixed in gheatmap, remove inherit aes from ggtree <2015-08-27, Thu>
303 303
  o add 'width' parameter to add_legend, now user can specify the width of legend bar <2015-08-27, Thu>
304
- o add 'colnames_position' parameter to gheatmap, now colnames can be display on the top of heatmap <2015-08-27, Thu> 
304
+ o add 'colnames_position' parameter to gheatmap, now colnames can be display on the top of heatmap <2015-08-27, Thu>
305 305
  o theme_transparent to make background transparent <2015-08-27, Thu>
306
- o subview for adding ggplot object (subview) to another ggplot object (mainview) <2015-08-27, Thu>  
307
- 
306
+ o subview for adding ggplot object (subview) to another ggplot object (mainview) <2015-08-27, Thu>
307
+
308 308
 CHANGES IN VERSION 1.1.16
309 309
 ------------------------
310 310
  o update citation <2015-08-17, Mon>
311
- 
311
+
312 312
 CHANGES IN VERSION 1.1.15
313 313
 ------------------------
314 314
  o open text angle parameter for annotation_clade/annotation_clade2 <2015-08-13, Thu>
315 315
  o support changing size of add_legend <2015-08-13, Thu>
316 316
  o reroot methods for phylo and beast <2015-08-07, Fri>
317
- 
317
+
318 318
 CHANGES IN VERSION 1.1.14
319 319
 ------------------------
320 320
  o update paml_rst to compatible with only marginal ancestral sequence or joint ancestral sequence available <2015-08-07, Fri>
321
- 
321
+
322 322
 CHANGES IN VERSION 1.1.13
323 323
 ------------------------
324 324
  o implement annotation_image <2015-08-01, Sat>
325 325
  o better implementation of geom_tiplab for accepting aes mapping and auto add align dotted line <2015-08-01, Sat>
326 326
  o open group_name parameter of groupOTU/groupClade to user <2015-08-01, Sat>
327
- 
327
+
328 328
 CHANGES IN VERSION 1.1.12
329 329
 ------------------------
330 330
  o update vignette according to the changes <2015-07-31, Fri>
... ...
@@ -332,14 +332,14 @@ CHANGES IN VERSION 1.1.12
332 332
  o extend groupClade to support operating on tree view <2015-07-31, Fri>
333 333
  o extend groupOTU to support operating on tree view <2015-07-31, Fri>
334 334
  o new implementation of groupClade & groupOTU <2015-07-31, Fri>
335
- 
335
+
336 336
 CHANGES IN VERSION 1.1.11
337 337
 ------------------------
338 338
  o annotation_clade and annotation_clade2 functions. <2015-07-30, Thu>
339 339
  o better add_legend implementation. <2015-07-30, Thu>
340 340
  o add ... in theme_tree & theme_tree2 for accepting additional parameter. <2015-07-30, Thu>
341 341
  o better geom_tree implementation. Now we can scale the tree with aes(color=numVar). <2015-07-30, Thu>
342
- 
342
+
343 343
 CHANGES IN VERSION 1.1.10
344 344
 ------------------------
345 345
  o solve overlapping branches for layout = "fan" || "radial",
... ...
@@ -355,32 +355,32 @@ CHANGES IN VERSION 1.1.9
355 355
  o get_taxa_name function will return taxa name vector of a selected clade <2015-06-30, Tue>
356 356
  o add example of flip function in vignette <2015-06-30, Tue>
357 357
  o flip function for exchanging positions of two selected branches <2015-06-30, Tue>
358
- 
358
+
359 359
 CHANGES IN VERSION 1.1.8
360 360
 ------------------------
361 361
  o update get.placement <2015-06-05, Fri>
362 362
  o edgeNum2nodeNum for converting edge number to node number for EPA/pplacer output <2015-06-04, Thu>
363 363
  o mv scale_x_gheatmap to scale_x_ggtree, which also support msaplot <2015-06-02, Tue>
364 364
  o add mask function <2015-06-02, Tue>
365
- 
365
+
366 366
 CHANGES IN VERSION 1.1.7
367 367
 ------------------------
368 368
  o add example of msaplot in vignette <2015-05-22, Fri>
369 369
  o msaplot for adding multiple sequence alignment <2015-05-22, Fri>
370
- 
370
+
371 371
 CHANGES IN VERSION 1.1.6
372 372
 ------------------------
373 373
  o add vertical_only parameter to scaleClade and set to TRUE by default.
374 374
    only vertical will be scaled by default. <2015-05-22, Fri>
375 375
  o update add_colorbar & add_legend <2015-05-21, Thu>
376
- o add example of add_legend and gheatmap in vignette <2015-05-18, Mon> 
376
+ o add example of add_legend and gheatmap in vignette <2015-05-18, Mon>
377 377
  o gheatmap implementation of gplot <2015-05-18, Mon>
378 378
  o add_legend for adding evolution distance legend <2015-05-18, Mon>
379
- 
379
+
380 380
 CHANGES IN VERSION 1.1.5
381 381
 ------------------------
382 382
  o implement scaleClade <2015-05-12, Tue>
383
- 
383
+
384 384
 CHANGES IN VERSION 1.1.4
385 385
 ------------------------
386 386
  o better performance of parsing beast tree  <2015-05-11, Mon>
... ...
@@ -388,13 +388,13 @@ CHANGES IN VERSION 1.1.4
388 388
    + support file that only contains one evidence for some of the nodes/tips
389 389
  o update add_colorbar to auto determine the position <2015-05-04, Mon>
390 390
  o add_colorbar function <2015-04-30, Thu>
391
- 
391
+
392 392
 CHANGES IN VERSION 1.1.3
393 393
 ------------------------
394 394
  o add space between residue substitution (e.g. K123R / E155D) <2015-04-30, Thu>
395 395
  o remove slash line in heatmap legend <2015-04-30, Thu>
396 396
  o update vignette to add example of merge_tree <2015-04-29, Wed>
397
- 
397
+
398 398
 CHANGES IN VERSION 1.1.2
399 399
 ------------------------
400 400
  o in addition to parsing beast time scale tree in XXX_year[\\.\\d]*, now supports XXX/year[\\.\\d]* <2015-04-29, Wed>
... ...
@@ -409,17 +409,17 @@ CHANGES IN VERSION 1.1.2
409 409
  o extend get.fields methods to support additional fields <2015-04-28, Tue>
410 410
  o extend tree class to support additional info by merging two tree <2015-04-28, Tue>
411 411
  o implement merge_tree function to merge two tree objects into one <2015-04-28, Tue>
412
- 
412
+
413 413
 CHANGES IN VERSION 1.1.1
414 414
 ------------------------
415 415
  o minor bug fixed in extracting node ID of rst file <2015-04-27, Mon>
416 416
  o update parsing beast time scale tree to support _year (originally supports _year.\\d+) <2015-04-27, Mon>
417 417
  o add Tommy in author <2015-04-27, Mon>
418
- 
418
+
419 419
 CHANGES IN VERSION 0.99.28
420 420
 ------------------------
421 421
  o update vignette with floating table of content <2015-04-08, Wed>
422
- 
422
+
423 423
 CHANGES IN VERSION 0.99.27
424 424
 ------------------------
425 425
  o bug fixed, see https://github.com/GuangchuangYu/ggtree/issues/4 <2015-03-07, Tue>
... ...
@@ -428,42 +428,42 @@ CHANGES IN VERSION 0.99.26
428 428
 ------------------------
429 429
  o update geom_tiplab <2015-03-31, Tue>
430 430
  o update plot method of beast <2015-03-17, Tue>
431
- 
431
+
432 432
 CHANGES IN VERSION 0.99.25
433 433
 ------------------------
434 434
  o implement groupClade <2015-03-13, Fri>
435
- 
435
+
436 436
 CHANGES IN VERSION 0.99.24
437 437
 ------------------------
438 438
  o use "round" segment end, look very better <2015-03-12, Thu>
439 439
  o update vignett <2015-03-11, Wed>
440
- 
440
+
441 441
 CHANGES IN VERSION 0.99.23
442 442
 ------------------------
443 443
  o mv geom_hilight to hilight <2015-03-11, Wed>
444 444
  o mv geom_phylopic to phylopic <2015-03-11, Wed>
445
- o implement collapse and expand for collapse and expand a selected clade <2015-03-11, Wed> 
446
- 
445
+ o implement collapse and expand for collapse and expand a selected clade <2015-03-11, Wed>
446
+
447 447
 CHANGES IN VERSION 0.99.22
448 448
 ------------------------
449 449
  o remove quote in beast tip/node labels <2015-03-10, Tue>
450
- 
450
+
451 451
 CHANGES IN VERSION 0.99.21
452 452
 ------------------------
453 453
  o fixed downloading png file in Windows platform, should explicitly setting mode="wb". <2015-03-03, Tue>
454
- 
454
+
455 455
 CHANGES IN VERSION 0.99.19
456 456
 ------------------------
457 457
  o for time scale tree inferred by BEAST, now user can use time_scale=TRUE parameter in ggtree function <2015-02-12, Thu>
458
- 
458
+
459 459
 CHANGES IN VERSION 0.99.18
460 460
 ------------------------
461 461
  o bug fixed in reorder the labels in gplot.heatmap <2015-02-12, Thu>
462
- 
462
+
463 463
 CHANGES IN VERSION 0.99.17
464 464
 ------------------------
465 465
  o add angle and branch.y variable in cladogram layout <2015-02-10, Tue>
466
- 
466
+
467 467
 CHANGES IN VERSION 0.99.16
468 468
 ------------------------
469 469
  o correct typo in vignette <2015-02-10, Tue>
... ...
@@ -471,7 +471,7 @@ CHANGES IN VERSION 0.99.16
471 471
 CHANGES IN VERSION 0.99.15
472 472
 ------------------------
473 473
  o fully support of replace operator, %<% <2015-02-09, Mon>
474
- 
474
+
475 475
 CHANGES IN VERSION 0.99.14
476 476
 ------------------------
477 477
  o add example in groupOTU for adding legend manually <2015-02-09, Mon>.
... ...
@@ -479,13 +479,13 @@ CHANGES IN VERSION 0.99.14
479 479
 CHANGES IN VERSION 0.99.13
480 480
 ------------------------
481 481
  o two dimensional tree <2015-02-06, Fri>
482
- 
482
+
483 483
 CHANGES IN VERSION 0.99.12
484 484
 ------------------------
485 485
  o update vignette <2015-02-04, Wed>
486 486
  o gzoom methods that supports all tree objects <2015-02-04, Wed>
487
- o geom_hilight layer for highlighting clade <2015-02-04, Wed> 
488
- 
487
+ o geom_hilight layer for highlighting clade <2015-02-04, Wed>
488
+
489 489
 CHANGES IN VERSION 0.99.11
490 490
 ------------------------
491 491
  o add scale_color to support colored lines and text based on numerical values and update vignette <2015-02-04, Wed>
... ...
@@ -499,12 +499,12 @@ CHANGES IN VERSION 0.99.10
499 499
 CHANGES IN VERSION 0.99.9
500 500
 ------------------------
501 501
  o update vignette <2015-02-02, Mon>
502
- 
502
+
503 503
 CHANGES IN VERSION 0.99.8
504 504
 ------------------------
505 505
  o add get.phylopic function to read the online phylo pic and convert it to grob object,
506 506
    which can be use to annotate ggplot figure using annotation_custom <2015-01-30, Fri>
507
- 
507
+
508 508
 CHANGES IN VERSION 0.99.7
509 509
 ------------------------
510 510
  o add angle information for 'fan' & 'unrooted' layout <2015-01-29, Thu>
... ...
@@ -513,7 +513,7 @@ CHANGES IN VERSION 0.99.6
513 513
 ------------------------
514 514
  o read.beast now supports support values of sets such as {x, y, z} <2015-01-19, Mon>
515 515
  o now read.beast supports characters in support values <2015-01-18, Sun>
516
- o add example of gzoom and groupOTU in vignette <2015-01-14, Wed> 
516
+ o add example of gzoom and groupOTU in vignette <2015-01-14, Wed>
517 517
  o implement groupOTU methods <2015-01-14, Wed>
518 518
  o export get.offspring.tip <2015-01-14, Wed>
519 519
 
... ...
@@ -524,7 +524,7 @@ CHANGES IN VERSION 0.99.5
524 524
  o add gzoom function, similar to zoom function in ape <2015-01-07, Wed>
525 525
  o add examples in man pages of %<% and %<+% operators <2015-01-06, Tue>
526 526
  o remove <<- and update vignette <2015-01-06, Tue>
527
- o update vignette and use BibTex and CSL for references <2015-01-05, Mon>  
527
+ o update vignette and use BibTex and CSL for references <2015-01-05, Mon>
528 528
  o update cladogram layout <2015-01-05, Mon>
529 529
  o read.baseml function and update vignette with baseml example <2015-01-04, Sun>
530 530
  o plot method for hyphy and hyphy example in vignette <2015-01-04, Sun>
... ...
@@ -532,9 +532,9 @@ CHANGES IN VERSION 0.99.5
532 532
 
533 533
 CHANGES IN VERSION 0.99.4
534 534
 ------------------------
535
- o ggtree now support branch.length = "none" to only draw tree topology <2015-01-03, Sat> 
535
+ o ggtree now support branch.length = "none" to only draw tree topology <2015-01-03, Sat>
536 536
  o get.subs method for hyphy object <2015-01-03, Sat>
537
- o show, get.tree and get.subs methods of hyphy <2015-01-02, Fri> 
537
+ o show, get.tree and get.subs methods of hyphy <2015-01-02, Fri>
538 538
  o export read.hyphy <2015-01-02, Fri>
539 539
  o export hyphy class <2015-01-01, Thu>
540 540
  o plot method for beast class and get.tree method for codeml class <2014-12-31, Wed>
... ...
@@ -547,7 +547,7 @@ CHANGES IN VERSION 0.99.4
547 547
  o update man file and add example file of beast output <2014-12-26, Fri>
548 548
  o get.tree and get.fileds methods of beast class <2014-12-26, Fri>
549 549
  o read.beast <2014-12-26, Fri>
550
- o beast class and show method <2014-12-26, Fri> 
550
+ o beast class and show method <2014-12-26, Fri>
551 551
  o coplot prototype<2014-12-24, Wed>
552 552
  o parse translation matrix in beast nexus <2014-12-24, Wed>
553 553
  o extract beast stats info <2014-12-23, Tue>
... ...
@@ -560,7 +560,7 @@ CHANGES IN VERSION 0.99.3
560 560
  o write.jplace and fully supports of jplace by ggtree. <2014-12-21, Sun>
561 561
  o support unrooted layout in ggplot. <2014-12-21, Sun>
562 562
  o support fan, radial, dendrogram layout in geom_tree. <2014-12-21, Sun>
563
- 
563
+
564 564
 CHANGES IN VERSION 0.99.2
565 565
 ------------------------
566 566
  o layout of unrooted tree, implemented equal-angle algorithm that described in Chapter 34
... ...
@@ -90,7 +90,7 @@ setMethod("groupOTU", signature(object="paml_rst"),
90 90
 
91 91
 ##' group tree based on selected OTU, will traceback to MRCA
92 92
 ##'
93
-##' 
93
+##'
94 94
 ##' @rdname groupOTU-methods
95 95
 ##' @exportMethod groupOTU
96 96
 setMethod("groupOTU", signature(object="phylo"),
... ...
@@ -111,21 +111,26 @@ setMethod("groupOTU", signature(object="r8s"),
111 111
 
112 112
 
113 113
 ##' @importFrom ape which.edge
114
-gfocus <- function(phy, focus, group_name) {
114
+gfocus <- function(phy, focus, group_name, focus_label=NULL) {
115 115
     if (is.character(focus)) {
116 116
         focus <- which(phy$tip.label %in% focus)
117 117
     }
118
-    
118
+
119 119
     n <- getNodeNum(phy)
120 120
     if (is.null(attr(phy, group_name))) {
121 121
         foc <- rep(0, n)
122 122
     } else {
123 123
         foc <- attr(phy, group_name)
124 124
     }
125
-    i <- max(foc) + 1
125
+    i <- max(suppressWarnings(as.numeric(foc)), na.rm=TRUE) + 1
126 126
     ## sn <- phy$edge[which.edge(phy, focus),] %>% as.vector %>% unique
127 127
     sn <- unique(as.vector(phy$edge[which.edge(phy, focus),]))
128
-    foc[sn] <- i
128
+    if (is.null(focus_label)) {
129
+        foc[sn] <- i
130
+    } else {
131
+        foc[sn] <- focus_label
132
+    }
133
+
129 134
     attr(phy, group_name) <- foc
130 135
     phy
131 136
 }
... ...
@@ -133,7 +138,7 @@ gfocus <- function(phy, focus, group_name) {
133 138
 
134 139
 ##' group OTU
135 140
 ##'
136
-##' 
141
+##'
137 142
 ##' @title groupOTU.phylo
138 143
 ##' @param phy tree object
139 144
 ##' @param focus tip list
... ...
@@ -144,8 +149,8 @@ groupOTU.phylo <- function(phy, focus, group_name="group") {
144 149
     attr(phy, group_name) <- NULL
145 150
     if ( is(focus, "list") ) {
146 151
         for (i in 1:length(focus)) {
147
-            phy <- gfocus(phy, focus[[i]], group_name)
148
-        } 
152
+            phy <- gfocus(phy, focus[[i]], group_name, names(focus)[i])
153
+        }
149 154
     } else {
150 155
         phy <- gfocus(phy, focus, group_name)
151 156
     }
... ...
@@ -167,14 +172,14 @@ groupOTU.ggplot <- function(object, focus, group_name) {
167 172
     df <- object$data
168 173
     df[, group_name] <- 0
169 174
     object$data <- groupOTU.df(df, focus, group_name)
170
-    return(object)     
175
+    return(object)
171 176
 }
172 177
 
173 178
 
174
-groupOTU.df <- function(df, focus, group_name) {    
179
+groupOTU.df <- function(df, focus, group_name) {
175 180
     if (is(focus, "list")) {
176 181
         for (i in 1:length(focus)) {
177
-            df <- gfocus.df(df, focus[[i]], group_name)
182
+            df <- gfocus.df(df, focus[[i]], group_name, names(focus)[i])
178 183
         }
179 184
     } else {
180 185
         df <- gfocus.df(df, focus, group_name)
... ...
@@ -183,13 +188,16 @@ groupOTU.df <- function(df, focus, group_name) {
183 188
     return(df)
184 189
 }
185 190
 
186
-gfocus.df <- function(df, focus, group_name) {
191
+gfocus.df <- function(df, focus, group_name, focus_label=NULL) {
187 192
     focus <- df$node[which(df$label %in% focus)]
193
+    if (is.null(focus_label))
194
+        focus_label <- max(suppressWarnings(as.numeric(df[, group_name])), na.rm=TRUE) + 1
195
+
188 196
     if (length(focus) == 1) {
189
-        df[match(focus, df$node), group_name] <- max(df(df[, group_name])) + 1
197
+        df[match(focus, df$node), group_name] <-focus_label
190 198
         return(df)
191 199
     }
192
-    
200
+
193 201
     anc <- getAncestor.df(df, focus[1])
194 202
     foc <- c(focus[1], anc)
195 203
     for (j in 2:length(focus)) {
... ...
@@ -200,7 +208,7 @@ gfocus.df <- function(df, focus, group_name) {
200 208
         foc <- c(foc, comAnc[1])
201 209
     }
202 210
     idx <- match(foc, df$node)
203
-    df[idx, group_name] <- max(df[, group_name]) + 1
211
+    df[idx, group_name] <- focus_label
204 212
     return(df)
205 213
 }
206 214