From 7e81a47fcf683e110b77e6b8ce0e6584caa46432 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2024 14:22:06 +0100 Subject: [PATCH] id fields from HMDB added --- omnipath_metabo/schema/_structure.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/omnipath_metabo/schema/_structure.py b/omnipath_metabo/schema/_structure.py index 11bbd32..0c9337f 100644 --- a/omnipath_metabo/schema/_structure.py +++ b/omnipath_metabo/schema/_structure.py @@ -34,10 +34,6 @@ class Structure(Base): backref='structure', foreign_keys='Identifier.structure_id' ) - #__table_args__ = ( - # Index('inchi_large_index', func.md5(inchi), unique=True ), - #) - class Identifier(Base): __tablename__ = 'identifiers' @@ -54,7 +50,10 @@ class Identifier(Base): nullable = False ) authoritative = Column(Boolean) - id_type = Column(Integer, ForeignKey('resources.id'), nullable = False) + id_type = Column( + Integer, + ForeignKey('resources.id'), + nullable = False) is_polymer = Column(Boolean) has_stereo = Column(Boolean) has_conformation = Column(Boolean) @@ -119,6 +118,7 @@ def __iter__(self): 'monisotopic_molecular_weight', 'chemical_formula', 'inchi', + *sorted(f'{s}_id' for s in hmdb.ID_FIELDS) ): yield {