Grid view with chemical structures and IDs

Hi,

I would like to use the Reporting functionality to create a grid view of a table containing chemical structures and their IDs. I can easily create a table by reading an SD file with structures and names, but I want to convert this to a grid (say 8 columns wide) that is automatically filled with the structures and IDs. How would I go about doing this?

Any tips appreciated!

Have you tried the column to grid node prior to the  Data To Report node for reporting.

simon.

Hi,

Yes, I had a look at it. I hooked it up before the reporting node, and then tried to fill a grid in the report. However, I only get data from the first table row to choose from. How would I fill the grid in the report automatically with data from all the rows in the table? Ideally the result should be a grid with compound IDs and structure in the same cell (or alternatively on alternating rows).

Thanks!

There should be a Reporting tutorial on the KNIME website which shows you how to set it up so that all rows are reported. Here is the screencast link

http://tech.knime.org/screencasts-0

 

Simon.

Thansk for this tip, Simon. I got it working by first using the Column to Grid node, and creating a 5-column grid. Then in the Reporting editor I created a 5-column 2-row table (not Grid!), where I filled the top row with Compound IDs 1 through 5, and the seconds row with images for structures 1 through 5. Upon creating the preview, the table is automatically filled with the remaining structures and their IDs.

Cheers!

You can do this in a single row in the table if you prefer - just add the molecule name and the image for the structure to the same cell. In this case, I’m not sure if there are any advantages to doing it in one row or in two, but sometimes putting multiple data into a single report table cell can help with complicated layouts.
You could also (but there is little point, for this simple case) put a 2 row x 1 column grid into each cell in a single row table, and put the name in one box and structure in the other. Again, this allows much more complex report layouts to be built.

Steve

PS - Unfortunately, where you will enter the KNIME / BIRT pain zone is if you want to let the workflow change the number of columns in the grid.  As far as I have been able to discern, the only way to do this is to create a separate table for each number of columns you are going to allow, and use the Visibility options to only show the right one, as BIRT (KNIME Reporter) gets very grumpy of extra columns appear or disappear!

If anyone has an easier solution to that...

Steve

Thanks Steve, I had figured out the 2-objects-in-1-cell trick in the mean time, but your comments are much appreciated.

Cheers!