I have developed a workflow in which I construct a table as per the following Jython line:
newRow = DefaultRow(rowID,[mol1,StructName1,Act1,mol2,StructName2,Act2,Tann,DeltaAct])
When I then view this with the Interactive Table View, HTML view, or PDF, the columns come back in a different order. Specifically:
mol1, StructName1, Act1, DeltaAct, StructName2, Act2, Tanimoto, mol2
How do I (can I) prevent reordering the columns?
EDIT: If I write the tabl;e out as a CSV file, the columns come out in the expected order.
I suppose you are using the JPhython Script 1:1 node.
Maybe the ordering of the output columns you have specified in the dialog of this node is different from the ordering of the output row values in the script?
I have not made any specification on column ordering in the JPython module - I'm actually using a JPython 2:1 module. The table is built through the code specified in my previous post.
I have checked this node and had no problems with the ordering of the columns.
Is it possible for you to send me a small workflow-file that reproduces the problem?
I have just sent you a workflow. Let me know what you find...
For the rest of the world, here are the findings:
- the ordering of the columns after the 2d coordinates node was incorrect. We have identified this bug and fixed it. This fix will be part of a small bugfix-release, planed to be released soon.
- the JPhython script node could benefit from more DataTypes for the declaration of the DataTableSpec in its dialog. The problem here is that the python-plugin does not know which DataTypes are available (except for the standard int, double and string types of the KNIME core plugin). If you have the CDK plugin in your KNIME installation, you have further DataTypes but they would need to be advertised to the phython node. We are currently investigating an approach to have a global DataType Repository in KNIME that would solve this problem.