Skip to content

Commit

Permalink
Merge pull request #310 from FoodOntology/issue-309
Browse files Browse the repository at this point in the history
Add changes to fix #309
  • Loading branch information
ddooley authored Jun 17, 2024
2 parents e24bb69 + 897f7ea commit d0dc2e6
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 d0dc2e6

Please sign in to comment.