Last active
August 29, 2015 14:08
substructure_ora
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cx_oracle | |
conn=cx_oracle.connect("dbname='template1' user='dbuser' password='mypass'") | |
cur = conn.cursor() | |
cur.execute("""SELECT * | |
FROM compound_mols | |
INNER JOIN molecule_dictionary ON (compound_mols.molregno = molecule_dictionary.molregno) | |
LEFT OUTER JOIN compound_structures ON (molecule_dictionary.molregno = compound_structures.molregno) | |
INNER JOIN chembl_id_lookup ON (molecule_dictionary.chembl_id = chembl_id_lookup.chembl_id) | |
LEFT OUTER JOIN compound_properties ON (molecule_dictionary.molregno = compound_properties.molregno) | |
WHERE (((sss(ctab,'O=C(Oc1ccccc1C(=O)O)C','ignore=all')=1)) | |
AND compound_structures.molregno IS NOT NULL | |
AND chembl_id_lookup.entity_type = 'COMPOUND' | |
AND compound_properties.molregno IS NOT NULL);""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment