Skip to content

Commit

Permalink
updating for new SABIO-RK cross references to chemspider
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Jan 4, 2019
1 parent 73cb181 commit 0052886
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datanator/data_source/sabio_rk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1633,10 +1633,12 @@ def load_compounds(self, compounds=None):
namespace = 'biocyc'
elif url.startswith('https://www.metanetx.org/chem_info/'):
namespace = 'metanetx.chemical'
elif url.startswith('http://www.chemspider.com/Chemical-Structure.'):
namespace = 'chemspider'
elif url.startswith('http://sabiork.h-its.org/newSearch?q=sabiocompoundid:'):
continue
else:
namespace = html.unescape(node.parent.parent.parent.find_all('td').get_text()).strip()
namespace = html.unescape(node.parent.parent.parent.find_all('td')[0].get_text()).strip()
warnings.warn('Compound {} has unkonwn cross reference type to namespace {}'.format(c.id, namespace),
data_source.DataSourceWarning)

Expand Down

0 comments on commit 0052886

Please sign in to comment.