Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/FoodOntology/foodon
Browse files Browse the repository at this point in the history
  • Loading branch information
ddooley committed Jun 17, 2024
2 parents 9634d26 + d0dc2e6 commit ec09c47
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ontology/scripts/organism_parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ def main():

if item['parent class'] is None:
parent_class = ''
# Special case for row with FOODON:00003004 set parent class to be 'animal_parent' from species list
elif s['animal_parent'] and item['ID'] == 'FOODON:00003004':
parent_class = s['animal_parent']
else:
parent_class = item['parent class'].format(organism=species_label, organism_base=s['species'])

Expand Down Expand Up @@ -262,6 +265,10 @@ def main():
else:
if item['Equivalence axiom'] is None:
equivalence = ''
# Special case for row with FOODON:00003004 and row has an Equivalence axiom
elif s['animal_parent'] and item['ID'] == 'FOODON:00003004':
equivalence = item['Equivalence axiom'].format(organism=s['species'], organism_base=s['species'], taxon=s['ID'])
equivalence = equivalence.replace("animal", s['animal_parent'])
else:
equivalence = item['Equivalence axiom'].format(organism=species_label, organism_base=s['species'], taxon=s['ID'])

Expand Down

0 comments on commit ec09c47

Please sign in to comment.