Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allen JSON structuregraph to OWL converter #9

Open
dosumis opened this issue Mar 2, 2022 · 5 comments
Open

Allen JSON structuregraph to OWL converter #9

dosumis opened this issue Mar 2, 2022 · 5 comments
Assignees

Comments

@dosumis
Copy link
Contributor

dosumis commented Mar 2, 2022

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.

@dosumis
Copy link
Contributor Author

dosumis commented Mar 2, 2022

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

@cmungall
Copy link
Member

cmungall commented Mar 2, 2022

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

@cmungall
Copy link
Member

cmungall commented Mar 2, 2022

I can also have Harshad implement this if you like

@dosumis
Copy link
Contributor Author

dosumis commented Mar 2, 2022

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.

cmungall added a commit to linkml/linkml-owl that referenced this issue Mar 3, 2022
Two steps (1) map to the JSON to a formal schema (independent of OWL)
(2) provide mappings in schema to OWL interpretations
TODO: the solution of hardcoding a prefix for the integer id->iri is not
ideal
Addresses obophenotype/ABA_Uberon#9
hkir-dev added a commit that referenced this issue Mar 8, 2022
hkir-dev added a commit that referenced this issue Mar 8, 2022
hkir-dev added a commit that referenced this issue Mar 8, 2022
@hkir-dev
Copy link
Contributor

hkir-dev commented Mar 9, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants