Icon

01_​Chemistry_​basics_​solution

01_Chemistry_basics

This workflow demonstrates basic cheminformatics functionality within the KNIME Analytics platform:
Reading and writing various chemistry data formats; canonicalization of chemical structures; duplicate filtering; descriptor calculation; interactive filtering on multiple properties
Training sets were collected from the ChEMBL DB. Each set corresponds to a publication in which lipophilicity was determined experimentally

01_Chemistry_Basics


This workflow demonstrates basic cheminformatics functionality within the KNIME Analytics platform:
Reading and writing various chemistry data formats; canonicalization of chemical structures; duplicate filtering; descriptor calculation; interactive filtering on multiple properties
Training sets were collected from the ChEMBL DB. Each set corresponds to a publication in which lipophilicity was determined experimentally. Required: RDKit KNIME integration.


Tasks

1. Read data from multiple files using corresponding Reader nodes.
2. Generate canonical SMILES and remove duplicates.
3. Customize the data by adding column names and removing redundant columns.
4. Compute descriptors and use Parallel Coordinates Plot to filter data interactively on multiple properties. (Make sure to keep selection from the View)
5. Finally, save the data to Excel, Table and SDF files.

Step 1: Reading data from different sources


  1. Read data from different sources by dragging them from the "data" folder:
    Lipophilicity_CHEMBL3096849.csv; Lipophilicity_CHEMBL633737.xlsx; Lipophilicity_CHEMBL636806.sdf

  2. In the "Transformation" tab in the configuration of the CSV reader and the Excel reader, make sure that the "smiles" file type is selected for the SMILES column. Remember to extract all properties from the SD file, by going to the "Property Handling"-Tab in its configuration and scanning the file.

  3. Convert the molecules from the SDF reader into SMILES format with the RDKit Canon SMILES node.

  4. Do a union of all three branches into one data stream using the Concatenate node

Step 3: Customise the data


  1. Use the Column Filter node to remove redundant columns (keep IDs, structures (SMILES) and values).

  2. Use Column Renamer to customize the column names, for example:

    1. assay__chemblid to assay_id

    2. value to LogP_EXP

    3. parent_cmpd_chemblid to mol_chemblid

Step 4: Compute descriptors and filter data table on multiple properties


  • Compute phys. chem. properties using the RDKit Descriptor Calculation node:
    SlogP, TPSA, AMW, NumHBA, NumHBD, NumAtoms, NumRings, NumAromaticHeterocycles

  • Add colors to the data table based on the "assay_id" column with the given Color Manager node.

  • Configure the Parallel Coordinates Plot (JavaScript): Include lipophilicity and computed phys. chem. properties to be displayed (in other words, exclude the two IDs).

  • Adjust the Tile View (JavaScript) to display the image of the molecule and its LogP_EXP. Select "Show selected rows only" in the "Interactivity" tab.

  • Configure the GroupBy node: Group by assay. In the "Manual aggregation" tab, display the mean and standard deviation of LogP_EXP as well as the unique number of mol_chemblids for each assay. Enable the Hiliting checkbox to ensure interactivity!

  • Display the results of the GroupBy in a Table View (JavaScript).

  • Select the nodes after the "Add molecule images" metanode. Create Component from the selected nodes, either from the context menu or the top menu. Call it "Visualize molecules with lipophilicity data". Ctrl/Cmd + Double click on the component to open its content.

  • If the component has no output port yet: Create one by hovering over it and clicking the "plus" on the right side, select "Table". Go back inside the component (Ctrl/Cmd + double click) and connect the Row Filter to the newly created Component Output.

  • Adjust the layout of the component view by selecting "Component → Open Layout Editor". Feel free to look at the solution.

  • Execute the component and explore the interactive view. In the view select the compounds you are interested in and click apply (apply settings temporarily) and close.

Step 5: Save the data


  1. Filter out unwanted columns such as the selection information with a Column Filter.

  2. Write the resulting table to

    1. an SDF file, useful for cheminformatics applications.

    2. a Table file, useful for hassle-free reincorporation into KNIME workflows.

    3. an Excel file, useful for sharing. It can incorporate images of the molecules!

      Hint: use corresponding writer nodes.


Step 2: Remove duplicates


(Check file format of "smiles" column. If it is in string format, convert column to SMILES data format. Use Molecule Type Cast node.)

  1. Generate Canonical_SMILES using RDKit Canon SMILES node. Use smiles column as input. Call the column "Canonical_SMILES". You can remove the source columns.

  2. Remove duplicate molecules with the Duplicate Row Filter node, by including the column "Canonical_SMILES" and excluding everything else.

Reminder: You can specify the content type of the SMILES column under the "Transformation" tab in the node configuration.

Change it from string to smiles.


When you want to remove duplicate SMILES, these two nodes should always be used in tandem!

SDF Reader
physchemproperties
RDKit Descriptor Calculation
Column Filter
SDF Writer
Column Renamer
Add molecule images
Visualize molecules with lipophilicity data
RDKit Canon SMILES
Canonicalize SMILES
RDKit Canon SMILES
Table Writer
Concatenate
CSV Reader
Excel Reader
assay_id
Color Manager
Excel Writer
Column Filter
Remove duplicate rows
Duplicate Row Filter

Nodes

Extensions

Links