Skip to content

Commit

Permalink
added identifiers for swiss lipids
Browse files Browse the repository at this point in the history
  • Loading branch information
for-hyde committed Nov 20, 2024
1 parent 9666016 commit 9184864
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
6 changes: 6 additions & 0 deletions omnipath_metabo/data/resource-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ lipidmaps:
LIPIDBANK_ID: LipidBank
PLANTFA_ID: PlantFAdb
NAME: Name
swisslipids:
CHEBI: ChEBI
LIPID MAPS: LIPID MAPS
HMDB: HMDB
MetaNetX: MetaNetX
Synonyms*: Synonym
17 changes: 15 additions & 2 deletions omnipath_metabo/schema/_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,17 @@ def __iter__(self):
}


class SwissLipids():
class SwissLipids(ResourceBase):
scheme = Structure
name = 'SwissLipids'
id_fields = [
'CHEBI',
'LIPID MAPS',
'HMDB',
'MetaNetX',
'Synonyms*'
]

def __iter__(self):
for met in swisslipids.swisslipids_lipids():
if met['Mass (pH7.3)'] == '':
Expand All @@ -160,7 +168,12 @@ def __iter__(self):
met['SMILES (pH7.3)'],
met['InChI (pH7.3)'],
),
'properties':(mass, 0, charge, met['Formula (pH7.3)'])
'properties':(mass, 0, charge, met['Formula (pH7.3)']),
'identifiers':[
(name, key)
for key in self.id_fields
if (name := met[key])
]
}


Expand Down

0 comments on commit 9184864

Please sign in to comment.