-
Notifications
You must be signed in to change notification settings - Fork 3
Utilities
Erik Segerdell edited this page Jun 14, 2019
·
6 revisions
The checkup.py
script loads the OBO version of the ontology, detects missing is_a parents, definitions, and start/end stages, and flags any inconsistencies in the stage ranges of related terms. Open a terminal, navigate to the root xao
directory and execute the following:
$ ./utilities/checkup.py
The parseont
module constructs a Python dictionary of all anatomy and stage terms in the ontology OBO file. You can load it via the command line after navigating to the utilities
directory:
$ python
>>> import parseont
>>> ont = parseont.dict()
Access term data by specifying its ID:
>>> print(ont["XAO:0002000"])
{'namespace': 'xenopus_anatomy', 'subset': ['frequent_anatomy_items'], 'synonym': ['head kidney', 'pronephros', 'vorniere'], 'name': 'pronephric kidney', 'def': 'Transient embryonic organ that serves as a kidney, providing osmoregulation during early developmental stages, and then degenerates during metamorphosis (starting at NF stage 53) as the mesonephric kidney develops and becomes functional.', 'xref': 'UBERON:0002120', 'is_a': 'XAO:0005243', 'develops_from': ['XAO:0000264'], 'end_stage': 'XAO:1000076', 'part_of': ['XAO:0004521'], 'start_stage': 'XAO:1000044'}
To find the most recently used anatomy ID, execute the following:
>>> ont = parseont.dict(rm_obsoletes=False)
>>> ids = [k for k in ont.keys() if ont[k]["namespace"] != "xenopus_developmental_stage"]
>>> max(ids)