About

This blog will provide news and updates from the developers’ view about the new web services that we paln to release the next few month at our web serverĀ cactus.nci.nih.gov.

2 thoughts on “About

  1. Dear Markus,
    first of all thanks very much indeed for putting pychembl together! Great effort!
    I was trying to use it with chembl_11 and got the following error message (see below).
    Do you possibly have any pointer? Very many thanks in advance and kind regards, Andreas.
    File “examples.py”, line 7, in
    assays = chembldb.query(Assays).filter(Assays.description.like(‘%human%’))
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/session.py”, line 917, in query
    return self._query_cls(entities, self, **kwargs)
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/query.py”, line 106, in __init__
    self._set_entities(entities)
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/query.py”, line 115, in _set_entities
    self._setup_aliasizers(self._entities)
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/query.py”, line 130, in _setup_aliasizers
    _entity_info(entity)
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/util.py”, line 476, in _entity_info
    mapperlib.configure_mappers()
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/mapper.py”, line 2742, in configure_mappers
    mapper._post_configure_properties()
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/mapper.py”, line 1048, in _post_configure_properties
    prop.init()
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/interfaces.py”, line 121, in init
    self.do_init()
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/properties.py”, line 905, in do_init
    self._determine_synchronize_pairs()
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/properties.py”, line 1192, in _determine_synchronize_pairs
    True)
    File “/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-macosx-10.7-intel.egg/sqlalchemy/orm/properties.py”, line 1170, in _sync_pairs_from_join
    self
    sqlalchemy.exc.ArgumentError: Could not determine relationship direction for primaryjoin condition ‘molecule_hierarchy.active_molregno = molecule_dictionary.molregno’, on relationship MoleculeHierarchy.active. Ensure that the referencing Column objects have a ForeignKey present, or are otherwise part of a ForeignKeyConstraint on their parent Table, or specify the foreign_keys parameter to this relationship.

    MYSQL:
    mysql> desc molecule_hierarchy;
    +—————–+———+——+—–+———+——-+
    | Field | Type | Null | Key | Default | Extra |
    +—————–+———+——+—–+———+——-+
    | molregno | int(11) | NO | PRI | NULL | |
    | parent_molregno | int(11) | NO | MUL | NULL | |
    | active_molregno | int(11) | YES | | NULL | |
    +—————–+———+——+—–+———+——-+
    3 rows in set (0.00 sec)

    mysql> desc molecule_dictionary;
    +——————-+————–+——+—–+———+——-+
    | Field | Type | Null | Key | Default | Extra |
    +——————-+————–+——+—–+———+——-+
    | molregno | int(11) | NO | PRI | NULL | |
    | pref_name | varchar(255) | YES | | NULL | |
    | chembl_id | varchar(20) | YES | UNI | NULL | |
    | max_phase | int(11) | YES | | NULL | |
    | therapeutic_flag | int(11) | YES | | NULL | |
    | dosed_ingredient | int(11) | YES | | NULL | |
    | structure_type | varchar(10) | YES | | NULL | |
    | chebi_id | int(11) | YES | | NULL | |
    | chebi_par_id | int(11) | YES | | NULL | |
    | molecule_type | varchar(30) | YES | | NULL | |
    | first_approval | int(11) | YES | | NULL | |
    | oral | int(11) | YES | | NULL | |
    | parenteral | int(11) | YES | | NULL | |
    | topical | int(11) | YES | | NULL | |
    | black_box_warning | int(11) | YES | | NULL | |
    | natural_product | int(11) | YES | | NULL | |
    | prodrug | int(11) | YES | | NULL | |
    +——————-+————–+——+—–+———+——-+
    17 rows in set (0.01 sec)

    mysql>

Leave a Reply

Your email address will not be published. Required fields are marked *