-2

maybe this is not the place for this question, but maybe someone is an experienced user of D3.js.

I would like to create a dendrogram where I initially show nodes from different levels (precomputed) and nodes are colored differently. The nodes have different tooltips for colored part and for the grey part.

Also I would like to side that with a heatmap.

Do you think combining those thing is possible in D3? Since the work to do that is quite big I would like to know if it is reasonable to even start.

Part of the result I'm aiming for is here: Dendrogram with heatmap

Liis Kolberg
  • 153
  • 12
  • Before this question being closed: yes, it's possible. – Gerardo Furtado Jun 02 '16 at 11:47
  • So I started to find out the separate parts I need. Do you know any reference, where I could find a feature like that: if I click to the node of tree, the node expands and the heatmap part also expands. In the original view I show only random selection of heatmap. Or how can I connect the 2 parts- tree node and heatmap. – Liis Kolberg Jun 02 '16 at 13:51
  • No, I don't remember any reference, you'll have to do it all - it's a lot of work, but again, it's possible. – Gerardo Furtado Jun 02 '16 at 16:23
  • Hi Liis, maybe you could extend the new heatmaply package to do this (since it is a mixture of ggplot2 objects. So if you want to propose something like this, we can discuss it). See: https://github.com/talgalili/heatmaply – Tal Galili Jun 03 '16 at 14:54
  • Hi. My final goal is to create a web app that serves this kind of weirdly cut interactive dendrogram with heatmap. I'm doing the preprocessing in python. I can't see how to use this heatmaply in my app right now. If you can see how then let me know:) – Liis Kolberg Jun 05 '16 at 13:26

1 Answers1

-1

The short answer to your question is yes.

I'm looking into the same sort of problem/challenge and found a very nice example that almost exactly does what you describe: https://github.com/MaayanLab/clustergrammer

Since the solution involves 10k+ lines of code and this case is not a simple 'use this to do this' answer I'm not providing code excerpts (for details see their github). In short; it uses D3 libraries + javascript code for dynamic plotting, zooming and sorting of the heatmap and a collapsed dendrogram. It loads (meta)-data from a pre-computed json file that contains the information on clusters and some meta data.

I understand your question you don't prefer a pre-computed input. This is also the case for the application that I am buidling. I'm looking into generalising the generation of the json file from an SQLquery which can then hook up to the clustergrammer.js code. I will update this thread if I find out more/have a different/working solution that does everything on the fly.

Joep
  • 1
  • 3