KNIME - Workflows and instructions
|Line 48:||Line 48:|
To the end of what you pasted.
To the end of what you pasted.
Revision as of 02:56, 19 April 2013
The workflow "HTML Lab Book" can be used to generate tables for online lab books and webpages. The workflow can be download from this link.
Once downloaded the zip file can be imported into KNIME via file, import KNIME Workflow.
This only works for tables containing text, images can't be automated as they need to be uploaded somewhere before they an be viewed on a website.
An exampple can be found here - 
The workflow contains 12 nodes but most of these can be ignored, you only need to edit 4 nodes to generate the table you require.
1. You need to tell KNIME what sdf file you want it to read. Do this by double clicking the top left node - "SDF Reader". A new pop up window should appear, click the top browse and select the SDF file you want to use. Other SDF files can be added if required in the rows below the first one. Make sure the "Extract SDF blocks" box is checked and none of the other ones are. Click Apply and OK to close the window.
Click the green button at the top of the screen with the two white arrows (like a fast forward sign)
2. Column Filter. This node selects what you want in your final table. The SDF file will already contain some columns of data and the workflow will calculate other properties for you. Double click the node to open the pop up window. If the properties you want are in the left hand excluded column select them and click "add>>". Likewise, is properties are in the included column and you don't want them in your table select them and click "<<remove". Once happy click "apply" and "OK" to close the window.
3. Column Resorter. This lets you sort the columns in you table in the order you require them. Double click to open the pop up window and reorder as you require. Once happy click "apply" and "OK" to close the window.
4. Table to HTML. This is the last node and will save the html file somewhere on your computer. Double click to open the pop up window. Under file settings, select a location and name for your output file. Once happy click "apply" and "OK" to close the window.
If your table is not going to contain links in it then the two "String Replacer" nodes can be deleted. These convert a web address into a clickable link in the final html table.
You are now ready to press the green button again and your html table should save to where you directed it to save. Open the file, it should open in your default browser, and right click and "view page source" (this may change slightly depending on what browsers you are using). This will open up the hmtl code, select all and copy.
The following steps are for LabTrove. In the post you want to paste the table, click "edit" then click "html" and paste the source into the editor. The first 60 or so line are not required and can be deleted to tidy up the table. delete down to
</div> </td> </tr> </table>
Also, the last few lines are not needed and can be deleted. Delete from