obophenotype / ABA_Uberon

Ontologized versions of the ABA structureGraphs - with mappings to Uberon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allen JSON structuregraph to OWL converter

dosumis opened this issue · comments

Functional Spec:

JSON input

{
         "id": 567,
         "acronym": "CH",
         "name": "Cerebrum",
         "parent_structure_id": 8,
         "children": [
}

Other inputs:

ID prefix + mapping to base_iri, e.g. MBA

Each entry in the JSON becomes an OWL class:

"id": 567 --> id: MBA:567 ( = purl.obolibrary.org/obo/MBA_567)
name --> rdfs:label
"acronym": "CH" --> exact_synonym
"parent_structure_id": 8, --> part_of some MBA:8

All classes get
subClassOf: UBERON:0002616 # regional part of brain

Tech Spec:
Python processes JSON from Allen -> Robot templates. Simple Makefile controls ROBOT template build.

@cmungall - This is to rewrite the original JSON -> OBO scripts. Presumably PERL so not worth reviving or reviewing.

We could use https://linkml.io/linkml-owl/ for this - may seem overkill but IMO it keeps everything very explicit and declarative

Do we want to keep our existing prefixes (and register them with bioregistry) or go with something like ABA:{someKindOfAtlasId}-{internalId}

Note we have an open issue about the correspondence or lack of correspondence between the IDs in this JSON and everything that is public on the Allen site: obophenotype/uberon#1419 - do we also need some kind of annotation axioms in the ontology to make this all more transparent? In particular for HBA which seems to be the main issue

I can also have Harshad implement this if you like

re linkML approach - is the idea to use a schema mapping file that converts structureGraph JSON to OWL? Happy to go with that approach. I'm sure @hkir-dev would be interested to learn how & we should have more awareness/understanding of linkML in the group.

Note we have an open issue about the correspondence or lack of correspondence between the IDs in this JSON and everything that is public on the Allen site: obophenotype/uberon#1419

I no longer believe this is a problem - see comment on ticket. Although we should check diffs once we have new conversions, and it would be good if we could find some programatic way to check whether URLs rolled with ids from the structuregraphs resolve on the corresponding atlases in the mapping table.

Implementation completed using linkml-owl #12
But I couldn't find an example about processing nested jsons, so needed to generate intermediate flat tsv tables.