Skip to content

Commit

Permalink
id fields from HMDB added
Browse files Browse the repository at this point in the history
  • Loading branch information
for-hyde committed Nov 13, 2024
1 parent c71fc13 commit 7e81a47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions omnipath_metabo/schema/_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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)
Expand Down Expand Up @@ -119,6 +118,7 @@ def __iter__(self):
'monisotopic_molecular_weight',
'chemical_formula',
'inchi',
*sorted(f'{s}_id' for s in hmdb.ID_FIELDS)
):

yield {
Expand Down

0 comments on commit 7e81a47

Please sign in to comment.