Repository 'chembl'
hg clone https://toolshed.g2.bx.psu.edu/repos/bgruening/chembl

Changeset 6:a57de37f12c2 (2020-10-07)
Previous changeset 5:1ade252ebe08 (2020-07-28) Next changeset 7:1d6fb7967ae9 (2020-10-10)
Commit message:
"planemo upload for repository https://github.com/chembl/chembl_webresource_client commit 78f2261af4e00c830ea311337d0aed9b297aad8e"
modified:
chembl.py
chembl.xml
added:
chembl_structure_pipeline.xml
structure_pipeline.py
test-data/10mol.sdf
test-data/check.mol
test-data/o_molblock.mol
test-data/parent_molblock.mol
test-data/pipeline_multi.sdf
test-data/std_molblock.mol
b
diff -r 1ade252ebe08 -r a57de37f12c2 chembl.py
--- a/chembl.py Tue Jul 28 08:20:47 2020 -0400
+++ b/chembl.py Wed Oct 07 09:31:40 2020 +0000
[
@@ -1,62 +1,73 @@
+import argparse
+
+from chembl_webresource_client.new_client import new_client
 from chembl_webresource_client.settings import Settings
+
 Settings.Instance().CACHING = False
-from chembl_webresource_client.new_client import new_client
-import argparse
+
 
 def open_file(filename):
     with open(filename) as f:
         return f.readline().split()[0]
 
+
 def get_smiles(res):
     """
     Get a list of SMILES from function results
-    """ 
+    """
     smiles = set()
-    for smi in res: 
+    for smi in res:
         try:
             smiles.add('{}\t{}'.format(smi['molecule_structures']['canonical_smiles'], smi['molecule_chembl_id']))
         except TypeError:
             continue
     return smiles
 
+
 def sim_search(smiles, tanimoto):
     """
     Return compounds which are within a Tanimoto range of the SMILES input
     """
     similarity = new_client.similarity
     return similarity.filter(smiles=smiles, similarity=tanimoto).only(['molecule_structures', 'molecule_chembl_id'])
-    
+
+
 def substr_search(smiles):
     """
     Return compounds which contain the SMILES substructure input
     """
     substructure = new_client.substructure
     return substructure.filter(smiles=smiles).only(['molecule_structures', 'molecule_chembl_id'])
-    
+
+
 def filter_drugs(mols):
     """
     Return only compounds which are approved drugs
     """
     return mols.filter(max_phase=4)
 
+
 def filter_biotherapeutic(mols):
     """
     Return only biotherapeutic molecules
     """
     return mols.filter(biotherapeutic__isnull=False)
 
+
 def filter_nat_prod(mols):
     """
     Return only natural products
     """
     return mols.filter(natural_product=1)
 
+
 def filter_ro5(mols):
     """
     Return only compounds with no RO5 violations
     """
     return mols.filter(molecule_properties__num_ro5_violations=0)
 
+
 def main():
     parser = argparse.ArgumentParser(description='Search ChEMBL database for compounds')
     parser.add_argument('-i', '--input', help='SMILES input')
@@ -101,7 +112,7 @@
     # write to file
     with open(args.output, 'w') as f:
         f.write('\n'.join(mols))
-    
+
 
 if __name__ == "__main__":
     main()
b
diff -r 1ade252ebe08 -r a57de37f12c2 chembl.xml
--- a/chembl.xml Tue Jul 28 08:20:47 2020 -0400
+++ b/chembl.xml Wed Oct 07 09:31:40 2020 +0000
b
@@ -1,9 +1,9 @@
 <tool id="chembl" name="Search ChEMBL database" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
+    <description>for compounds which are similar to a SMILES string</description>
     <macros>
         <token name="@TOOL_VERSION@">0.10.1</token>
         <token name="@GALAXY_VERSION@">2</token>
     </macros>
-    <description>for compounds which are similar to a SMILES string</description>
     <requirements>
         <requirement type="package" version="@TOOL_VERSION@">chembl_webresource_client</requirement>
     </requirements>
b
diff -r 1ade252ebe08 -r a57de37f12c2 chembl_structure_pipeline.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chembl_structure_pipeline.xml Wed Oct 07 09:31:40 2020 +0000
[
@@ -0,0 +1,85 @@
+<tool id="chembl_structure_pipeline" name="ChEMBL structure pipeline" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
+    <description>for curation and standardizing of molecular structures</description>
+    <macros>
+        <token name="@TOOL_VERSION@">1.0.0</token>
+        <token name="@GALAXY_VERSION@">0</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">chembl_structure_pipeline</requirement>
+    </requirements>  
+    <command><![CDATA[
+        python '$__tool_directory__/structure_pipeline.py' 
+            --input '$input'
+            --output '$output'
+            $standardize
+            $get_parent
+            $check
+]]>
+    </command>
+    <inputs>
+        <param label="SDF/MOL input" type="data" name="input" format="sdf,mol" argument="--input"/>
+        <param label="Standardize" checked="false" type="boolean" name="standardize" argument="--standardize" truevalue="--standardize" falsevalue="" help="Apply the 'Standardize' pipeline component"/>
+        <param label="Get parent" checked="false" type="boolean" name="get_parent" argument="--get_parent" truevalue="--get_parent" falsevalue="" help="Apply the 'GetParent' pipeline component"/>
+        <param label="Check" checked="false" type="boolean" name="check" argument="--check" truevalue="--check" falsevalue="" help="Apply the 'Check' pipeline component"/>
+    </inputs>
+    <outputs>
+        <data name="output" format="sdf" label="Processed molecules"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="o_molblock.mol" />
+            <param name="standardize" value="true" />
+            <output name="output" value="std_molblock.mol"/>
+        </test>
+        <test>
+            <param name="input" value="o_molblock.mol" ftype="mol" />
+            <param name="get_parent" value="true" />
+            <output name="output" value="parent_molblock.mol"/>
+        </test>
+        <test>
+            <param name="input" value="o_molblock.mol" ftype="mol" />
+            <param name="check" value="true" />
+            <output name="output" value="check.mol"/>
+        </test>
+        <test>
+            <param name="input" value="10mol.sdf" ftype="sdf" />
+            <param name="standardize" value="true" />
+            <param name="get_parent" value="true" />
+            <param name="check" value="true" />
+            <output name="output" value="pipeline_multi.sdf"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+Apply the ChEMBL chemical curation pipeline to a set of chemical structures in SDF
+format. The pipeline is described in detail in the citation provided (Bento et al.,
+2020).
+
+The pipeline consists of three components:
+ - a Standardizer which formats compounds according to defined rules and conventions, based mostly on FDA/IUPAC guidelines.
+ - a GetParent component that removes any salts and solvents from the compound to create its parent.
+ - a Checker to test the validity of chemical structures and flag any serious errors. Errors are given a code from 0 (least serious) to 10 (most serious), the highest of which is stored in the SDF field `<MaxPenaltyScore>`. A list of all errors encountered is recorded under `<IssueMessages>`.
+
+Either one or more of these protocols can be applied in a single Galaxy job.
+
+-----
+
+.. class:: infomark
+
+**Input**
+
+One or more molecules in MOL/SDF format.
+
+-----
+
+.. class:: infomark
+
+**Output**
+
+A MOL/SD-file containing the processed molecules.
+
+]]></help>
+    <citations>
+        <citation type="doi">10.1186/s13321-020-00456-1</citation>
+    </citations>
+</tool>
b
diff -r 1ade252ebe08 -r a57de37f12c2 structure_pipeline.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/structure_pipeline.py Wed Oct 07 09:31:40 2020 +0000
[
@@ -0,0 +1,59 @@
+import argparse
+
+from chembl_structure_pipeline import checker, standardizer
+
+
+def load_mols(input_file):
+    """
+    Returns a list of strings, each a molblock
+    """
+    with open(input_file) as f:
+        mols = [''.join(('\n', mol.strip())) for mol in f.read().strip().split('$$$$\n')]
+    return mols
+
+
+def write_mols(mols, output_file):
+    """
+    Writes a list of molblocks to an SDF
+    """
+    with open(output_file, 'w') as f:
+        f.write('\n$$$$'.join(mols))
+
+
+def standardize_molblock(mol):
+    return standardizer.standardize_molblock(mol)
+
+
+def get_parent_molblock(mol):
+    return standardizer.get_parent_molblock(mol)[0]
+
+
+def check_molblock(mol):
+    issues = checker.check_molblock(mol)
+    max_penalty_score = str(max([issue[0] for issue in issues])) if issues else '0'
+    message = '; '.join([issue[1] for issue in issues])
+    mol_with_issues = '\n'.join((mol, '> <MaxPenaltyScore>', max_penalty_score, '> <IssueMessages>', message))
+    return mol_with_issues
+
+
+def main():
+    parser = argparse.ArgumentParser(description='Search ChEMBL database for compounds')
+    parser.add_argument('-i', '--input', help='SDF/MOL input')
+    parser.add_argument('-o', '--output', help="Standardized output")
+    parser.add_argument('--standardize', action='store_true', help="Standardize molblock")
+    parser.add_argument('--get_parent', action='store_true', help="Get parent molblock.")
+    parser.add_argument('--check', action='store_true', help="Check molblock")
+    args = parser.parse_args()
+
+    mols = load_mols(args.input)
+    if args.standardize:
+        mols = [standardize_molblock(mol) for mol in mols]
+    if args.get_parent:
+        mols = [get_parent_molblock(mol) for mol in mols]
+    if args.check:
+        mols = [check_molblock(mol) for mol in mols]
+    write_mols(mols, args.output)
+
+
+if __name__ == "__main__":
+    main()
b
diff -r 1ade252ebe08 -r a57de37f12c2 test-data/10mol.sdf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/10mol.sdf Wed Oct 07 09:31:40 2020 +0000
[
b'@@ -0,0 +1,759 @@\n+\r\n+  SciTegic01171120562D\r\n+\r\n+ 26 30  0  0  0  0            999 V2000\r\n+   -8.6396    0.9568    0.0000 O   0  0\r\n+   -7.6023    1.5602    0.0000 C   0  0\r\n+   -7.6071    3.0602    0.0000 C   0  0\r\n+   -6.3104    3.8143    0.0000 C   0  0\r\n+   -5.0090    3.0685    0.0000 C   0  0\r\n+   -5.0040    1.5682    0.0000 C   0  0\r\n+   -6.3008    0.8143    0.0000 C   0  0\r\n+   -3.7006    0.8244    0.0000 C   0  0\r\n+   -3.7006   -0.6045    0.0000 N   0  0\r\n+   -2.4915   -1.3190    0.0000 C   0  0\r\n+   -2.5059   -2.8197    0.0000 N   0  0\r\n+   -1.2156   -3.5847    0.0000 C   0  0\r\n+   -1.2329   -5.0846    0.0000 C   0  0\r\n+   -2.5404   -5.8196    0.0000 O   0  0\r\n+   -3.8308   -5.0547    0.0000 C   0  0\r\n+   -3.8135   -3.5548    0.0000 C   0  0\r\n+   -1.2274   -0.6045    0.0000 C   0  0\r\n+    0.0000   -1.3190    0.0000 O   0  0\r\n+    1.2274   -0.6045    0.0000 C   0  0\r\n+    2.4732   -1.3190    0.0000 N   0  0\r\n+    3.7372   -0.6045    0.0000 C   0  0\r\n+    3.7372    0.8244    0.0000 C   0  0\r\n+    2.4732    1.5389    0.0000 C   0  0\r\n+    1.2274    0.8244    0.0000 C   0  0\r\n+   -1.2274    0.8244    0.0000 C   0  0\r\n+   -2.4915    1.5389    0.0000 N   0  0\r\n+  1  2  1  0\r\n+  2  3  1  0\r\n+  3  4  2  0\r\n+  4  5  1  0\r\n+  5  6  2  0\r\n+  6  7  1  0\r\n+  2  7  2  0\r\n+  6  8  1  0\r\n+  8  9  1  0\r\n+  9 10  2  0\r\n+ 10 11  1  0\r\n+ 11 12  1  0\r\n+ 12 13  1  0\r\n+ 13 14  1  0\r\n+ 14 15  1  0\r\n+ 15 16  1  0\r\n+ 11 16  1  0\r\n+ 10 17  1  0\r\n+ 17 18  1  0\r\n+ 18 19  1  0\r\n+ 19 20  2  0\r\n+ 20 21  1  0\r\n+ 21 22  2  0\r\n+ 22 23  1  0\r\n+ 23 24  2  0\r\n+ 19 24  1  0\r\n+ 24 25  1  0\r\n+ 17 25  2  0\r\n+ 25 26  1  0\r\n+  8 26  2  0\r\n+M  END\r\n+> <mr_id>\r\n+4358263\r\n+\r\n+> <SMI>\r\n+Oc1cccc(c1)c2nc(N3CCOCC3)c4oc5ncccc5c4n2\r\n+\r\n+$$$$\r\n+\r\n+  SciTegic01171120562D\r\n+\r\n+ 43 51  0  0  1  0            999 V2000\r\n+   -4.7204    3.3431    0.0000 C   0  0\r\n+   -4.1471    2.2890    0.0000 O   0  0\r\n+   -2.6500    2.2500    0.0000 C   0  0  2  0  0  0\r\n+   -1.8100    3.5000    0.0000 C   0  0  1  0  0  0\r\n+   -0.2400    3.5200    0.0000 C   0  0\r\n+    0.5000    2.1800    0.0000 C   0  0  1  0  0  0\r\n+   -1.0600    2.1800    0.0000 O   0  0\r\n+   -1.8300    0.9300    0.0000 C   0  0  1  0  0  0\r\n+   -3.0300    0.9300    0.0000 C   0  0\r\n+   -0.9800   -0.7800    0.0000 N   0  0\r\n+   -2.1300   -1.4600    0.0000 C   0  0\r\n+   -3.3200   -0.7600    0.0000 C   0  0\r\n+   -4.5500   -1.4800    0.0000 C   0  0\r\n+   -4.5800   -2.7700    0.0000 C   0  0\r\n+   -3.3400   -3.4700    0.0000 C   0  0\r\n+   -2.1300   -2.7900    0.0000 C   0  0\r\n+    0.2400   -2.7700    0.0000 C   0  0\r\n+    1.4300   -3.4700    0.0000 C   0  0\r\n+    1.7600   -4.9700    0.0000 C   0  0\r\n+    3.2600   -5.0800    0.0000 N   0  0\r\n+    3.8500   -3.6300    0.0000 C   0  0\r\n+    4.9971   -3.2777    0.0000 O   0  0\r\n+    2.6600   -2.7500    0.0000 C   0  0\r\n+    2.6800   -1.4600    0.0000 C   0  0\r\n+    3.7900    0.5600    0.0000 C   0  0\r\n+    4.9600    1.2800    0.0000 C   0  0\r\n+    4.9600    2.6300    0.0000 C   0  0\r\n+    3.8100    3.2900    0.0000 C   0  0\r\n+    2.6400    2.5900    0.0000 C   0  0\r\n+    2.6400    1.2400    0.0000 C   0  0\r\n+    1.4900    0.5400    0.0000 N   0  0\r\n+    1.4500   -0.7600    0.0000 C   0  0\r\n+    0.2400   -1.4400    0.0000 C   0  0\r\n+   -2.5511    4.8030    0.0000 N   0  0\r\n+   -1.9442    5.8382    0.0000 C   0  0\r\n+   -4.0519    4.8135    0.0000 C   0  0\r\n+   -4.6588    3.7783    0.0000 O   0  0\r\n+   -4.7941    6.1180    0.0000 C   0  0\r\n+   -6.2940    6.1306    0.0000 C   0  0\r\n+   -7.0331    7.4359    0.0000 C   0  0\r\n+   -6.2722    8.7286    0.0000 C   0  0\r\n+   -4.7723    8.7160    0.0000 C   0  0\r\n+   -4.0332    7.4108    0.0000 C   0  0\r\n+  1  2  1  0\r\n+  3  2  1  6\r\n+  3  4  1  0\r\n+  4  5  1  0\r\n+  6  5  1  6\r\n+  6  7  1  0\r\n+  7  8  1  0\r\n+  3  8  1  0\r\n+  8  9  1  1\r\n+  8 10  1  0\r\n+ 10 11  1  0\r\n+ 11 12  1  0\r\n+ 12 13  2  0\r\n+ 13 14  1  0\r\n+ 14 15  2  0\r\n+ 15 16  1  0\r\n+ 11 16  2  0\r\n+ 16 17  1  0\r\n+ 17 18  1  0\r\n+ 18 19  1  0\r\n+ 19 20  1  0\r\n+ 20 21  1  0\r\n+ 21 22  2  '..b'  0.0000 C   0  0\r\n+   -2.6500    2.2500    0.0000 C   0  0  2  0  0  0\r\n+   -4.1471    2.2892    0.0000 O   0  0\r\n+   -4.7748    1.2665    0.0000 C   0  0\r\n+   -0.9800   -0.7800    0.0000 N   0  0\r\n+   -2.1300   -1.4600    0.0000 C   0  0\r\n+   -3.3200   -0.7600    0.0000 C   0  0\r\n+   -4.5500   -1.4800    0.0000 C   0  0\r\n+   -4.5800   -2.7700    0.0000 C   0  0\r\n+   -3.3400   -3.4700    0.0000 C   0  0\r\n+   -2.1300   -2.7900    0.0000 C   0  0\r\n+    0.2400   -2.7700    0.0000 C   0  0\r\n+    1.4300   -3.4700    0.0000 C   0  0\r\n+    1.7600   -4.9700    0.0000 C   0  0\r\n+    3.2600   -5.0800    0.0000 N   0  0\r\n+    3.8500   -3.6300    0.0000 C   0  0\r\n+    4.9971   -3.2777    0.0000 O   0  0\r\n+    2.6600   -2.7500    0.0000 C   0  0\r\n+    2.6800   -1.4600    0.0000 C   0  0\r\n+    3.7900    0.5600    0.0000 C   0  0\r\n+    4.9600    1.2800    0.0000 C   0  0\r\n+    4.9600    2.6300    0.0000 C   0  0\r\n+    3.8100    3.2900    0.0000 C   0  0\r\n+    2.6400    2.5900    0.0000 C   0  0\r\n+    2.6400    1.2400    0.0000 C   0  0\r\n+    1.4900    0.5400    0.0000 N   0  0\r\n+    1.4500   -0.7600    0.0000 C   0  0\r\n+    0.2400   -1.4400    0.0000 C   0  0\r\n+  1  2  1  0\r\n+  3  2  1  6\r\n+  3  4  1  0\r\n+  5  4  1  6\r\n+  5  6  1  0\r\n+  6  7  1  0\r\n+  7  8  1  1\r\n+  7  9  1  0\r\n+  3  9  1  0\r\n+  9 10  1  6\r\n+ 10 11  1  0\r\n+  7 12  1  0\r\n+ 12 13  1  0\r\n+ 13 14  1  0\r\n+ 14 15  2  0\r\n+ 15 16  1  0\r\n+ 16 17  2  0\r\n+ 17 18  1  0\r\n+ 13 18  2  0\r\n+ 18 19  1  0\r\n+ 19 20  1  0\r\n+ 20 21  1  0\r\n+ 21 22  1  0\r\n+ 22 23  1  0\r\n+ 23 24  2  0\r\n+ 23 25  1  0\r\n+ 20 25  2  0\r\n+ 25 26  1  0\r\n+ 26 27  1  0\r\n+ 27 28  1  0\r\n+ 28 29  2  0\r\n+ 29 30  1  0\r\n+ 30 31  2  0\r\n+ 31 32  1  0\r\n+ 27 32  2  0\r\n+ 32 33  1  0\r\n+  5 33  1  0\r\n+ 33 34  1  0\r\n+ 26 34  2  0\r\n+ 34 35  1  0\r\n+ 12 35  1  0\r\n+ 19 35  2  0\r\n+M  END\r\n+> <mr_id>\r\n+66\r\n+\r\n+> <SMI>\r\n+CN[C@@H]1C[C@H]2O[C@@](C)([C@@H]1OC)n3c4ccccc4c5c6CNC(=O)c6c7c8ccccc8n2c7c35\r\n+\r\n+$$$$\r\n+\r\n+  SciTegic01171120562D\r\n+\r\n+ 32 35  0  0  1  0            999 V2000\r\n+    7.1381   -2.1568    0.0000 C   0  0\r\n+    6.0456   -2.6531    0.0000 C   0  0\r\n+    4.7409   -1.9129    0.0000 N   0  0\r\n+    3.6552   -2.9294    0.0000 C   0  0\r\n+    2.1855   -2.6254    0.0000 C   0  0\r\n+    1.7138   -1.2033    0.0000 C   0  0\r\n+    2.5889    0.0182    0.0000 C   0  0\r\n+    3.7889    0.0269    0.0000 O   0  0\r\n+    1.7138    1.2033    0.0000 N   0  0\r\n+    0.2917    0.7475    0.0000 C   0  0\r\n+   -1.0028    1.5132    0.0000 C   0  0\r\n+   -2.3155    0.7475    0.0000 C   0  0\r\n+   -2.3155   -0.7475    0.0000 C   0  0\r\n+   -3.3560   -1.3452    0.0000 F   0  0\r\n+   -1.0028   -1.5132    0.0000 C   0  0\r\n+    0.2917   -0.7475    0.0000 C   0  0\r\n+    4.2542   -4.2907    0.0000 C   0  0\r\n+    3.6559   -5.3308    0.0000 C   0  0\r\n+    5.7448   -4.1226    0.0000 C   0  0\r\n+    6.7580   -5.2264    0.0000 C   0  0\r\n+    6.3978   -6.3710    0.0000 O   0  0\r\n+    8.2231   -4.9012    0.0000 N   0  0\r\n+    9.2380   -6.0068    0.0000 C   0  0\r\n+   10.7032   -5.6816    0.0000 C   0  0  2  0  0  0\r\n+   11.0634   -4.5369    0.0000 O   0  0\r\n+   11.7181   -6.7872    0.0000 C   0  0\r\n+   13.1833   -6.4620    0.0000 N   0  0\r\n+   14.1993   -7.5656    0.0000 C   0  0\r\n+   15.6630   -7.2376    0.0000 C   0  0\r\n+   16.1108   -5.8060    0.0000 O   0  0\r\n+   15.0949   -4.7024    0.0000 C   0  0\r\n+   13.6312   -5.0304    0.0000 C   0  0\r\n+  1  2  1  0\r\n+  2  3  1  0\r\n+  3  4  1  0\r\n+  4  5  1  0\r\n+  5  6  2  0\r\n+  6  7  1  0\r\n+  7  8  2  0\r\n+  7  9  1  0\r\n+  9 10  1  0\r\n+ 10 11  1  0\r\n+ 11 12  2  0\r\n+ 12 13  1  0\r\n+ 13 14  1  0\r\n+ 13 15  2  0\r\n+ 15 16  1  0\r\n+  6 16  1  0\r\n+ 10 16  2  0\r\n+  4 17  2  0\r\n+ 17 18  1  0\r\n+ 17 19  1  0\r\n+  2 19  2  0\r\n+ 19 20  1  0\r\n+ 20 21  2  0\r\n+ 20 22  1  0\r\n+ 22 23  1  0\r\n+ 23 24  1  0\r\n+ 24 25  1  6\r\n+ 24 26  1  0\r\n+ 26 27  1  0\r\n+ 27 28  1  0\r\n+ 28 29  1  0\r\n+ 29 30  1  0\r\n+ 30 31  1  0\r\n+ 31 32  1  0\r\n+ 27 32  1  0\r\n+M  END\r\n+> <mr_id>\r\n+4362206\r\n+\r\n+> <SMI>\r\n+Cc1[nH]c(/C=C/2\\C(=O)Nc3ccc(F)cc23)c(C)c1C(=O)NC[C@H](O)CN4CCOCC4\r\n+\r\n+$$$$\r\n'
b
diff -r 1ade252ebe08 -r a57de37f12c2 test-data/check.mol
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/check.mol Wed Oct 07 09:31:40 2020 +0000
b
@@ -0,0 +1,17 @@
+
+Mrv1810 07121910172D          
+
+  4  3  0  0  0  0            999 V2000
+   -2.5038    0.4060    0.0000 C   0  0  3  0  0  0  0  0  0  0  0  0
+   -2.5038    1.2310    0.0000 O   0  5  0  0  0  0  0  0  0  0  0  0
+   -3.2182   -0.0065    0.0000 N   0  3  0  0  0  0  0  0  0  0  0  0
+   -1.7893   -0.0065    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
+  1  2  1  0  0  0  0
+  1  3  1  0  0  0  0
+  1  4  1  4  0  0  0
+M  CHG  2   2  -1   3   1
+M  END
+> <MaxPenaltyScore>
+5
+> <IssueMessages>
+molecule has a bond with an illegal stereo flag; InChI: Proton(s) added/removed; InChI: Omitted undefined stereo
\ No newline at end of file
b
diff -r 1ade252ebe08 -r a57de37f12c2 test-data/o_molblock.mol
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/o_molblock.mol Wed Oct 07 09:31:40 2020 +0000
b
@@ -0,0 +1,13 @@
+
+  Mrv1810 07121910172D          
+
+  4  3  0  0  0  0            999 V2000
+   -2.5038    0.4060    0.0000 C   0  0  3  0  0  0  0  0  0  0  0  0
+   -2.5038    1.2310    0.0000 O   0  5  0  0  0  0  0  0  0  0  0  0
+   -3.2182   -0.0065    0.0000 N   0  3  0  0  0  0  0  0  0  0  0  0
+   -1.7893   -0.0065    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
+  1  2  1  0  0  0  0
+  1  3  1  0  0  0  0
+  1  4  1  4  0  0  0
+M  CHG  2   2  -1   3   1
+M  END
b
diff -r 1ade252ebe08 -r a57de37f12c2 test-data/parent_molblock.mol
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/parent_molblock.mol Wed Oct 07 09:31:40 2020 +0000
b
@@ -0,0 +1,12 @@
+
+     RDKit          2D
+
+  4  3  0  0  0  0  0  0  0  0999 V2000
+   -2.5038    0.4060    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.5038    1.2310    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.2182   -0.0065    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.7893   -0.0065    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
+  1  2  1  0
+  1  3  1  0
+  1  4  1  0
+M  END
b
diff -r 1ade252ebe08 -r a57de37f12c2 test-data/pipeline_multi.sdf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/pipeline_multi.sdf Wed Oct 07 09:31:40 2020 +0000
b
b'@@ -0,0 +1,739 @@\n+\n+     RDKit          2D\n+\n+ 26 30  0  0  0  0  0  0  0  0999 V2000\n+   -8.6396    0.9568    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+   -7.6023    1.5602    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -7.6071    3.0602    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -6.3104    3.8143    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -5.0090    3.0685    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -5.0040    1.5682    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -6.3008    0.8143    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -3.7006    0.8244    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -3.7006   -0.6045    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.4915   -1.3190    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.5059   -2.8197    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.2156   -3.5847    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.2329   -5.0846    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.5404   -5.8196    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+   -3.8308   -5.0547    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -3.8135   -3.5548    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.2274   -0.6045    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    0.0000   -1.3190    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+    1.2274   -0.6045    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    2.4732   -1.3190    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+    3.7372   -0.6045    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    3.7372    0.8244    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    2.4732    1.5389    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    1.2274    0.8244    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.2274    0.8244    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.4915    1.5389    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+  1  2  1  0\n+  2  3  1  0\n+  3  4  2  0\n+  4  5  1  0\n+  5  6  2  0\n+  6  7  1  0\n+  2  7  2  0\n+  6  8  1  0\n+  8  9  1  0\n+  9 10  2  0\n+ 10 11  1  0\n+ 11 12  1  0\n+ 12 13  1  0\n+ 13 14  1  0\n+ 14 15  1  0\n+ 15 16  1  0\n+ 11 16  1  0\n+ 10 17  1  0\n+ 17 18  1  0\n+ 18 19  1  0\n+ 19 20  2  0\n+ 20 21  1  0\n+ 21 22  2  0\n+ 22 23  1  0\n+ 23 24  2  0\n+ 19 24  1  0\n+ 24 25  1  0\n+ 17 25  2  0\n+ 25 26  1  0\n+  8 26  2  0\n+M  END\n+\n+> <MaxPenaltyScore>\n+0\n+> <IssueMessages>\n+\n+$$$$\n+     RDKit          2D\n+\n+ 43 51  0  0  1  0  0  0  0  0999 V2000\n+   -4.7204    3.3431    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -4.1471    2.2890    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.6500    2.2500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.8100    3.5000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -0.2400    3.5200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    0.5000    2.1800    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.0600    2.1800    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.8300    0.9300    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -3.0300    0.9300    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -0.9800   -0.7800    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.1300   -1.4600    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -3.3200   -0.7600    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -4.5500   -1.4800    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -4.5800   -2.7700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -3.3400   -3.4700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.1300   -2.7900    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    0.2400   -2.7700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    1.4300   -3.4700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    1.7600   -4.9700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    3.2600   -5.0800    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+    3.8500   -3.6300    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    4.9971   -3.2777    0.'..b' 0  0\n+    3.8100    3.2900    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    2.6400    2.5900    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    2.6400    1.2400    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    1.4900    0.5400    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+    1.4500   -0.7600    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    0.2400   -1.4400    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+  1  2  1  0\n+  3  2  1  6\n+  3  4  1  0\n+  5  4  1  6\n+  5  6  1  0\n+  6  7  1  0\n+  7  8  1  1\n+  7  9  1  0\n+  3  9  1  0\n+  9 10  1  6\n+ 10 11  1  0\n+  7 12  1  0\n+ 12 13  1  0\n+ 13 14  1  0\n+ 14 15  2  0\n+ 15 16  1  0\n+ 16 17  2  0\n+ 17 18  1  0\n+ 13 18  2  0\n+ 18 19  1  0\n+ 19 20  1  0\n+ 20 21  1  0\n+ 21 22  1  0\n+ 22 23  1  0\n+ 23 24  2  0\n+ 23 25  1  0\n+ 20 25  2  0\n+ 25 26  1  0\n+ 26 27  1  0\n+ 27 28  1  0\n+ 28 29  2  0\n+ 29 30  1  0\n+ 30 31  2  0\n+ 31 32  1  0\n+ 27 32  2  0\n+ 32 33  1  0\n+  5 33  1  0\n+ 33 34  1  0\n+ 26 34  2  0\n+ 34 35  1  0\n+ 12 35  1  0\n+ 19 35  2  0\n+M  END\n+\n+> <MaxPenaltyScore>\n+2\n+> <IssueMessages>\n+molecule has a stereo bond in a ring\n+$$$$\n+     RDKit          2D\n+\n+ 32 35  0  0  1  0  0  0  0  0999 V2000\n+    7.1381   -2.1568    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    6.0456   -2.6531    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    4.7409   -1.9129    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+    3.6552   -2.9294    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    2.1855   -2.6254    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    1.7138   -1.2033    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    2.5889    0.0182    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    3.7889    0.0269    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+    1.7138    1.2033    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+    0.2917    0.7475    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.0028    1.5132    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.3155    0.7475    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -2.3155   -0.7475    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   -3.3560   -1.3452    0.0000 F   0  0  0  0  0  0  0  0  0  0  0  0\n+   -1.0028   -1.5132    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    0.2917   -0.7475    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    4.2542   -4.2907    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    3.6559   -5.3308    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    5.7448   -4.1226    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    6.7580   -5.2264    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+    6.3978   -6.3710    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+    8.2231   -4.9012    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+    9.2380   -6.0068    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   10.7032   -5.6816    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   11.0634   -4.5369    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+   11.7181   -6.7872    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   13.1833   -6.4620    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n+   14.1993   -7.5656    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   15.6630   -7.2376    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   16.1108   -5.8060    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n+   15.0949   -4.7024    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+   13.6312   -5.0304    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n+  1  2  1  0\n+  2  3  1  0\n+  3  4  1  0\n+  4  5  1  0\n+  5  6  2  0\n+  6  7  1  0\n+  7  8  2  0\n+  7  9  1  0\n+  9 10  1  0\n+ 10 11  1  0\n+ 11 12  2  0\n+ 12 13  1  0\n+ 13 14  1  0\n+ 13 15  2  0\n+ 15 16  1  0\n+  6 16  1  0\n+ 10 16  2  0\n+  4 17  2  0\n+ 17 18  1  0\n+ 17 19  1  0\n+  2 19  2  0\n+ 19 20  1  0\n+ 20 21  2  0\n+ 20 22  1  0\n+ 22 23  1  0\n+ 23 24  1  0\n+ 24 25  1  6\n+ 24 26  1  0\n+ 26 27  1  0\n+ 27 28  1  0\n+ 28 29  1  0\n+ 29 30  1  0\n+ 30 31  1  0\n+ 31 32  1  0\n+ 27 32  1  0\n+M  END\n+\n+> <MaxPenaltyScore>\n+0\n+> <IssueMessages>\n'
b
diff -r 1ade252ebe08 -r a57de37f12c2 test-data/std_molblock.mol
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/std_molblock.mol Wed Oct 07 09:31:40 2020 +0000
b
@@ -0,0 +1,12 @@
+
+     RDKit          2D
+
+  4  3  0  0  0  0  0  0  0  0999 V2000
+   -2.5038    0.4060    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
+   -2.5038    1.2310    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
+   -3.2182   -0.0065    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
+   -1.7893   -0.0065    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
+  1  2  1  0
+  1  3  1  0
+  1  4  1  0
+M  END