Debian Codegraph @

TODO

raw
1 TODO for future releases:
2 =========================
3
4 * Remove DendSer.dendrogram - I don't think it adds any value (but DO add examples for using seriation to rotate the dendrogram...)
5
6
7 Interactive tanglegrams using plotly?!
8
9
10 Maybe add this function:
11 http://stackoverflow.com/questions/33567508/how-to-color-the-same-labels-on-dendorgram-in-one-colour-in-r/33580763#33580763
12
13
14
15 add Bk class, and plot.Bk method (this makes more sense
16 than having a plot_Bk function)
17
18
19 Help make:
20 aheatmap(NMF pkg)
21 pheatmap
22 compatible with dendextend
23
24
25
26 Next action
27 --------------
28
29
30 add to vignette:
31 0) get_leaves_branches_col - Get the colors of the branches of a dendrogram's leaves. This function is actually the point of the two other functions. It is meant to help match the color of the labels with that of the branches - after running color_branches.
32
33
34 לתקן את המשפט על דנדאקסטנד שמופיע כאן:
35 http://cran.r-project.org/web/views/Phylogenetics.html
36
37
38 להוסיף ל installr
39 עוד תפריט של "להתקין חבילת ZIP מ URL" - שיקפיץ חלון טקסט, ואז יריץ את
40 install.packages.zip("http://www.christophheibl.de/phyloch_1.5-5.zip")
41
42
43 * Make a cheat sheet!
44
45 * tanglegram - add a default color to the lines, so that streight lines will be green, and the red ones will be red. (like in the vignette)
46
47
48 * fix the following case!
49
50
51
52 dend_flat <- structure(list(structure(88L, members = 1L, height = 0, label = "mel Ch m pe", leaf = TRUE, value = 83),
53 structure(list(structure(92L, members = 1L, height = 0, label = "mel Ch f fo", leaf = TRUE, value = 84),
54 structure(list(structure(90L, members = 1L, height = 0, label = "mel Ch f he", leaf = TRUE, value = 85),
55 structure(list(structure(84L, label = "mel Ch m he", members = 1L, height = 0, leaf = TRUE, value = 86),
56 structure(86L, label = "mel Ch m fo", members = 1L, height = 0, leaf = TRUE, value = 87)), members = 2L, midpoint = 0.5, height = 0, value = 86.5)), members = 3L, midpoint = 0.75, height = 0, value = 85.75)), members = 4L, midpoint = 0.875, height = 0, value = 84.875)), members = 5L, midpoint = 0.9375, height = 0.0697674418604651, value = 83.9375, class = "dendrogram")
57
58 dend_flat %>% color_labels %>% plot # doesn't work in 0.17.2, but it is fixed in 0.17.3
59 dend_flat %>% color_labels(col = 1:2) %>% plot # doesn't work in 0.17.2, but it is fixed in 0.17.3
60 # And this is because of:
61 nleaves(dend_flat) # 5
62 # fix the following two!
63 cutree(dend_flat, k = 5) # results in a vector of 0's.
64 heights_per_k.dendrogram(tree)
65 get_nodes_attr(dend_flat, "height")
66
67
68 # debug(cutree)
69
70 # nice example:
71 dend1 <- 1:5 %>% dist %>% hclust %>% as.dendrogram
72 dend1 %>% plot
73 get_nodes_attr(dend1, "height")
74 dend2 <- dend1 %>% raise.dendrogram(-1)
75 dend2 %>% plot
76 cutree(dend2, k = 5)
77 dend2 %>% color_labels %>% plot # works
78 dend2 %>% color_labels %>% plot # works
79
80
81
82
83
84
85
86 * add:
87 randomForest 4.6-10
88 Type rfNews() to see new features/changes/bug fixes.
89 > rfNews()
90 > rfNews
91 function ()
92 {
93 newsfile <- file.path(system.file(package = "randomForest"),
94 "NEWS")
95 file.show(newsfile)
96 }
97 <environment: namespace:randomForest>
98
99
100 * maybe add?
101 http://stackoverflow.com/questions/22749634/how-to-append-bootstrapped-values-of-clusters-tree-nodes-in-newick-format-in
102
103
104 * in hang.dendrogram, check if hang_height can accept a vector (and recycle)
105
106 * a tanglegram with different labels. (via J. Aravind)
107 As far as I have understood, it can compare only dendrograms from the same dataset with the same labels. Is there a way to create tanglegrams with dissimilar data? Right now I am resorting to using the same labels in both the dendrograms and finally manually editing the labels in one of the dendrograms in Inkscape. However such an exercise in large dendrograms is difficult. So a feature to use dissimilar labels will be great.
108
109 * a tanglegram for multiple cases. (via J. Aravind)
110 Further is there any way to extend the one-to-one comparison to comparison of multiple cases like in these tanglegrams [ http://www.biomedcentral.com/content/figures/1471-2148-12-1-1-l.jpg , http://origin-ars.els-cdn.com/content/image/1-s2.0-S0966842X14000900-gr2.jpg]. Will such comparisons mess up the entanglement? Right now what I am doing is repeating the elements in one dendrogram wherever multiple comparisons occur. I have tried to merge the repeated elements later in the dendrogram, but not getting the desired results. A feature to do such comparisons in a dendrogram will be useful for creating tanglegrams for cophylogenies.
111
112
113
114 * a mini Vignette (like: http://cran.r-project.org/package=caret)
115 * Adjust the Vignette to be a website (like http://caret.r-forge.r-project.org/)
116
117 * announce the package on [email protected]
118 * create a relevant tag wiki in SO, just like: http://stackoverflow.com/tags/rcpp/info (do only after intro vignettes is done)
119 * get added here: http://bioinfo.unice.fr/biodiv/Tree_editors.html
120 * go through this: http://stackoverflow.com/questions/tagged/dendrogram
121
122 * intersect_trees - add intersect_trees.dendlist method.
123
124 * vignette: mention options warn = FALSE
125
126 * add tests to nodes_with_condition.
127
128 * ask the maintainer of "ape" to have rotate S3ed
129
130 * Invite other package authors to use dendextend and add it to their "suggests" (including pvclut, dynamicTreeCut, gplots, ape, who else?)
131
132 * Maybe add a global package option for printing debugging information, and have many of the logical warn and print stuff be related to these...
133
134 * maybe use "abs" in min(-diff(our_dend_heights))/2 in dendextend_options("heights_per_k.dendrogram") ?
135
136 New functions
137 --------------
138 * add a print/warn parameter to intersect_trees
139 * intersect_trees.dendlist
140 * Mention I've used this rect.hclust.nice code for implementation on my verison of the function. http://stackoverflow.com/questions/4720307/change-dendrogram-leaves
141 * Give this a thought: http://stackoverflow.com/questions/10088117/exporting-dendrogram-as-table-in-r?rq=1
142 * create rect.dendrogram (and make rect generic). http://stackoverflow.com/questions/717747/how-do-i-color-edges-or-draw-rects-correctly-in-an-r-dendrogram
143 http://stackoverflow.com/questions/4720307/change-dendrogram-leaves
144 * hide some function's doc (labels<-.stuff)
145
146 * manipulate tanglegram using click_rotate
147
148 * maybe allow pruning of labels based on their location (since if we get a tree with two identical labels, we may wish to fix it). maybe unique.dendrogram? It can be done by finding duplicate(labels), giving these a new name, and then prune it.
149
150
151 New GUIs
152 ---------
153 * GUI for Rcmdr
154 * GUI for Deducer
155 * GUI with Shiny
156
157
158 More DOCS
159 ---------
160 * Fix the demo / or work on a nice vignette
161 * cross-ref untangle functions docs
162
163 Questions to answer
164 ------------------
165 * reply here: http://stackoverflow.com/questions/10571266/colouring-branches-in-a-dendrogram-in-r?rq=1
166
167 Places to publish?!
168 ------------------
169 * http://www.software.ac.uk/resources/guides/which-journals-should-i-publish-my-software?mpw
170 * http://www.statsci.org/compjour.html
171
172 General ideas
173 ------------------
174 * An algorithm to find subtrees that are topologically identical between the two trees - and color them accordingly.
175 * Get stats::midcache.dendrogram to work for non-binary trees...
176 * cut_replace - make it in Rcpp - to make cutree_1h.dendrogram faster...
177 * See this code: https://github.com/andrie/ggdendro/blob/master/R/dendro_rpart.R
178 for creating an rpart plotting machanism using dendrograms!
179 This will enable hilighting one branch/rule.
180 Note that more "attr" will need to be added to the tree in order to
181 include all of the rpart information. This could also allow the merging of plots from rpart/party etc.
182
183 * Add as.dendrogram.ctree . Example code for further work:
184 require(party)
185 set.seed(290875)
186 ### regression
187 airq <- subset(airquality, !is.na(Ozone))
188 airct <- ctree(Ozone ~ ., data = airq,
189 controls = ctree_control(maxsurrogate = 3))
190 airct
191 plot(airct)
192 str(airct@tree)
193 # as.dendrogram.ctree will need to work with the above object
194 # to extract the elements needed for detecting the tree's parameters...
195
196 * Create: as.dendrogram.randomForest (a template is available in the R folder)
197 * Check if I need to implement something from here: http://r.789695.n4.nabble.com/dendrogram-plot-does-not-draw-long-labels-td3235843.html
198 * Also good: get the conditions in a tree: http://stats.stackexchange.com/questions/41443/how-to-actually-plot-a-sample-tree-from-randomforestgettree
199 * Look into the proximity matrix produced from a randomForest:
200 data(iris)
201 require(randomForest)
202 mod.rf <- randomForest(Species ~ ., data=iris, proximity=TRUE)
203 hc <- hclust(as.dist(mod.rf$proximity))
204 plot(as.dendrogram(hc))
205 MDSplot(mod.rf, iris$Species)
206
207 * Combine with gridBase to include sub plots like in {party: ?plot.BinaryTree}
208 Sources:
209 http://cran.r-project.org/web/packages/party/vignettes/party.pdf
210 http://sublogo.r-forge.r-project.org/
211 http://casoilresource.lawr.ucdavis.edu/drupal/node/1007
212 http://cran.r-project.org/web/packages/gridBase/vignettes/gridBase.pdf
213 * give examples with http://cran.r-project.org/web/packages/treemap/index.html
214
215
216 * Ideas for improving the package: http://robjhyndman.com/hyndsight/jss-rpackages/ - DONE
217
218 * Improve the visualization of Pvclust results
219 http://bioinformatics.oxfordjournals.org/content/22/12/1540.full
220 * and compare it on two clustering algorithms using tanglegram