
newStr='Information Mining' newStr1=substr(newStr,1,4) newStr2=substr(newStr,12,6) RESULT: newStr1 = “Info” newStr2 = “Mining” Note. Cell Splitter By Position RESULT: a = “KNIFE“ OR 2. The “String Replacer” node allows the use of wildcards “*” 2. Substr() String Replacer and Cell Splitters SAS KNIME 1. The “Case Converter” node does not have an option for propcase(), to capitalize only the first letter of each word. Alternatively, you can use the “String Maniuplation” node with functions uppercase() / lowercase(). If you need my current workflow I am happy to upload that with the source files if required.Upcase()/lowcase()/propcase() convert a string from lowcase to upcase and vice versa SAS KNIME data = upcase() = lowcase() = propcase() run Case Converter Example: data xyz ContractID = upcase(ContractID) ContractID = lowcase(ContractID) ContractID = propcase(ContractID) run Note. Hopefully, someone can help me out with this.

I would also like this workflow to use only the open-source nodes available in KNIME and not proprietary nodes (Schrodinger etc.). Obviously doing this by hand is not an option. Therefore I am looking for a way to generate the SMARTS strings used in the example on my own sets of substituents. I also seem to have lost the attachment point information through these conversions which are likely to cause issues in the rest of the workflow. Note that the SMARTS strings that this last option (3.) generates are very different than the ones used in the example ( ()=O>1=NNN=N1). WARN RDKit One Component Reaction 0:40 Invalid Reaction SMARTS: missing I can then join these two smarts strings with > in between (output: (-)=>1:::::1) to create a SMARTS reaction string but this is not accepted as an input for the Rdkit One Component Reaction node.ĮRROR RDKit One Component Reaction 0:40 Creation of Reaction from SMARTS value failed: null This outputs the following SMARTS strings: showing this as a string in KNIME shows that the conversion is not carried out and the string is of SDF format : *filename*.sdf 0 0 0 0 0 0 0 V3000M V30 BEGIN etc.Ĭonverting the Source and Target molecules into RDkit first ( RDkit from Molecule node) then from RDkit into SMARTS ( RDkit to Molecule node, SMARTS option).
Knime string replacer code#
However, converting this reaction into a SMARTS string that is accepted by the Rdkit One Component Reaction node has proven tricky.Ĭonverting RXN to SMARTS ( Molecule Type Cast node) : gives the following error code : scanner: BufferScanner::read() errorĬonverting the Source and Target molecules into SMARTS ( Molecule Type Cast node) : gives the following error code : SMILES loader: unrecognised lowercase symbol: y So far, I can easily generate the reactions in RXN format using the Reaction Builder node from the Indigo node package. I suspect this is theĬause of many of the issues I am experiencing. NOTE: The input SDF files have the structures written with anĪttachment point (*COOH for the carboxylic acid for example) whichĭefines where the group to replace is attached. I would then combine these two in KNIME and generate a SMARTS string for the reaction to then be used in the Rdkit One Component Reaction node. I would like to input two SDF files (or another format, not particularly attached to SDF): one with the group to replace ( carboxylic acid) and one with the list of possible bioisosteric replacements ( tetrazole). My issue is the generation of a working SMARTS string describing the reaction. I cannot seem to replicate the SMARTS format used here.įor this, I plan to use the Rdkit One Component Reaction node which uses a set of compounds to carry out the reaction on as input and a SMARTS string that defines the reaction. NOTE: I am using the following workflow as inspiration : RDKit-bioisosteres ().



I am trying to create a KNIME workflow that would accept a list of compounds and carry out bioisosteric replacements (we will use the following example here: carboxylic acid to tetrazole) automatically.
