Heatmap of molecules + parameter

Dear KNIME community members,

Here is what I would like to achieve:

  1. Extract content from an SD file
  2. Display molecules in cells of a table
  3. Have the background color of these cells determined by a parameter

For 1, the nodes SDF Reader and Extractor do the trick. I then plug the output into a Molecule to CDK/Indigo/RDKit node.

Plugging the output of the previous node into a Column to Grid node takes care of 2.

Now, how can I achieve point #3?

I have tried R View (Local) and Plate Viewer nodes. I do get a heatmap but not superimposed on the molecule cells. Alternatively, something like Erl Wood's Similarity Viewer would be ok, but with a different parameter than distance/similarity.

Any ideas?





Hi Fred,

hmm. We do have a Heatmap, you can finde the node in the jfreechart category.

You can feed this heatmap with a column containing a list of doubles. So it is not of interest which kind of similarities you want to use as long as you can generate this list. (you can also give it a distance matrix as produced by the distance calculate node)

But I don't see a possibility to get the molecules in this view as well.

Cheers, Iris

Hi Fred,

I have achieved this recently - steps 1&2 essentially as you describe, then using BIRT to do step 3 - it almost works perfectly, but I had to settle for heat map cells holding smaller white-background molecules, as I couldn't quickly figure-out setting a transparency...

if it sounds of any use, I can see what I can share when at my PC tomorrow. 


Kind regards




Thank you Iris, I had not updated my JFreeChart collection so had no HeatMap node there. This node does not quite fit my purpose but I now know it exists, thanks to you.


James, I would definitely be interested in knowing how you did this, as I could not set a table cell color in BIRT according to a workflow parameter. If, for some reason, you cannot share your workflow, could you tell me a little bit more so that I can try here?


Thank you all,


Hi Fred,

I struggled for a while on this as well.  The key bit is that you need to add a script to the table cells of interest in BIRT.  This can be either done by highlighting the cell of interest, then clicking the 'Advanced' property tab and adding the script to the onCreate property value; or you can highlight the cell and choose the 'Script' tab, choose the 'onCreate' option from the dropdown, and paste the script into the editor.  Either way, you can use something like:


this.getStyle().backgroundColor = row["hex (0)"];


I was passing in hexadecimal codes for the colours - these were being generated using the 'Extract Color' node followed by a java snippet.

Anyway, I have attached some fake output - heatmap colouring across a 96-well plate, showing colouring based on (fake) activity relative to a control.  The structures are pre-processed to just show the varying R-groups.

I have attached the workflow with data, and the PPT version of the output from BIRT.  Hope this gives some ideas (and if someone wants to look into adding pre-processing of the molecules to image and setting a transparent colour, that would be great!)


Kind regards