Skip to content

Commit

Permalink
fix incorrect equivalences from metabolights
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesamcl committed Jun 11, 2024
1 parent 1ead99b commit 68a5882
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 01_ingest/grebi_ingest_metabolights/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def parse_metabolights_xml(xml_content):
entry_data["grebi:type"]="metabolights:Study"
elif entry_id.startswith("MTBLC"):
entry_data["grebi:type"]="metabolights:Chemical"
entry_data["grebi:equivalentTo"]=entry_data["metabolights:ref"]
entry_data["metabolights:chemical"]=entry_data["metabolights:ref"]
if "metabolights:inchi" in entry_data:
entry_data["grebi:equivalentTo"]=entry_data["grebi:equivalentTo"]+entry_data["metabolights:inchi"]
entry_data["metabolights:chemical"]=entry_data["metabolights:chemical"]+entry_data["metabolights:inchi"]
if "metabolights:formula" in entry_data:
entry_data["grebi:equivalentTo"]=entry_data["grebi:equivalentTo"]+entry_data["metabolights:formula"]
entry_data["metabolights:chemical"]=entry_data["metabolights:chemical"]+entry_data["metabolights:formula"]
else:
assert False

Expand Down

0 comments on commit 68a5882

Please sign in to comment.