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

Revisit how the Allen ontologies are imported into composite-metazoan #3133

Closed
gouttegd opened this issue Dec 4, 2023 · 5 comments
Closed
Assignees

Comments

@gouttegd
Copy link
Collaborator

gouttegd commented Dec 4, 2023

Among the components that make up composite-metazoan are the 5 “ontologies“ derived from the Allen brain atlases: HBA/DHBA (human), MBA/DMBA (mouse), and PBA (primate).

They are included into composite-metazoan by a very specific process in which we download some JSON representation from the brain-map.org API server and transform the result into OBO files:

$(TMPDIR)/allen-mba.json: | $(TMPDIR)
        wget https://api.brain-map.org/api/v2/structure_graph_download/1.json -O $@

$(IMPORTDIR)/local-allen-%.obo: $(TMPDIR)/allen-%.json $(SCRIPTSDIR)/allen-json2obo.pl
        $(SCRIPTSDIR)/allen-json2obo.pl $< > $@

There are at least two problems with this approach:

a) The first is that the allen-json2obo.pl script is hardcoding some axioms when creating the OBO files from the JSON structure:

print "is_a: UBERON:0002616 ! regional part of brain\n";

This line is executed unconditionally and therefore forcibly makes any term from the Allen ontologies a subclass of UBERON:0002616. As it was recently found out (#2903), this classification is actually wrong, at least for some Allen terms.

b) The second is that the Allen ontologies are switching (or have already switched) to using PURLs that do not depend on purl.obolibrary.org (https://purl.brain-bican.org/ontology/). Because of that, it’s a bad idea to use the OBO format to import those ontologies, since support for “non-OBO” PURLs in the OBO format is still under development. When we merge those OBO files to create composite-metazoan, the IDs they contain are forcibly interpreted as being OBO PURLs.

Both those problems could easily be solved if we (Uberon) stopped generating the Allen ontologies ourselves from whatever JSON is provided by the Allen institute. It seems the Allen folks are now providing “ready-to-use“ ontologies (e.g. https://github.com/brain-bican/human_brain_atlas_ontology for HBA, https://github.com/brain-bican/developing_mouse_brain_atlas_ontology for DMBA, etc.), we could/should use them instead.

That is, instead of downloading https://api.brain-map.org/api/v2/structure_graph_download/1.json and turning it into an ontology on our side, we would download https://github.com/brain-bican/mouse_brain_atlas_ontology/blob/main/mbao-base.owl and use it directly as provided.

@dosumis Any objection to that?

@gouttegd
Copy link
Collaborator Author

gouttegd commented Dec 7, 2023

Done in #3134. If there is a late objection we can always revert that.

@gouttegd gouttegd closed this as completed Dec 7, 2023
@dosumis
Copy link
Contributor

dosumis commented Dec 7, 2023

I think it's good. @hkir-dev and I will review.

@cmungall
Copy link
Member

It's good that Allen are producing the OWL themselves.

I wish that they provided a central source of truth with table of downloads

Right now one has to navigate to individual repos like https://github.com/brain-bican/developing_human_brain_atlas_ontology/, test the URLs in the README, discover they don't work, then fall back on the uberon makefile as SoT

@dosumis
Copy link
Contributor

dosumis commented Apr 30, 2024

It's good that Allen David's group are producing the OWL themselves.

I wish that they provided a central source of truth with table of downloads

Right now one has to navigate to individual repos like https://github.com/brain-bican/developing_human_brain_atlas_ontology/, test the URLs in the README, discover they don't work, then fall back on the uberon makefile as SoT

Strongly agree that we need to provide resolution for everything. I believe that the files should resolve (if not we have PURL server problems at Allen), but we didn't get around to getting the IDs to resolve yet. @hkir-dev I think we talked about having the Allen host an OLS 4 instance, but that might be slow to organise. Other options:

  • Host OLS4 instance at Sanger
  • Submit to OLS

I think I prefer the latter. The ontologies lack text definitions but they do have links to Allen atlases, and I'd like to aim for displaying masks or 3D for each brain region on OLS using depicts links. I would argue that this is in some ways just as good as a text definition. Obtaining/linking to images has always been hard to achieve in the past, but we should be able to work through BICAN and I believe HubMap has had some success in re-using HBA 3D images.

@hkir-dev - can you think about where this comment belongs as a ticket (EPIC) we can fold into our sprints. Thanks!

@hkir-dev
Copy link

hkir-dev commented Apr 30, 2024

I've fixed the PURL links in the README files. They are now functioning properly: https://purl.brain-bican.org/ontology/dhbao/dhbao.owl

Related task created in one of our private project boards: https://github.com/orgs/brain-bican/projects/2/views/2?pane=issue&itemId=61427336

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

No branches or pull requests

4 participants