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

HBA bridge unsatisfiable classes #2903

Closed
hkir-dev opened this issue May 26, 2023 · 15 comments
Closed

HBA bridge unsatisfiable classes #2903

hkir-dev opened this issue May 26, 2023 · 15 comments
Assignees
Labels
bridge-files Issues related to the generation of bridge files from Uberon to other ontologies. Stale upstream issue This issue needs to be fixed in an upstream resource

Comments

@hkir-dev
Copy link

When uberon, uberon-bridge-to-hba and hba ontologies merged and reasoned, 203 unsatisfiable classes are identified.

robot merge -I http://purl.obolibrary.org/obo/uberon/uberon.owl -I https://raw.githubusercontent.com/obophenotype/uberon/master/src/ontology/bridge/uberon-bridge-to-hba.obo -I https://raw.githubusercontent.com/obophenotype/ABA_Uberon/master/src/ontology/sources/10.ofn explain --reasoner ELK  -M unsatisfiability --unsatisfiable all --explanation unsats.md --output unsat_all_explanation.ofn

List of unsat classes: unsats.md

My usecase is utilizing a subset of the human brain atlas, so I'm primarily interested in these unsatisfiable classes: HBA:9418, HBA:9419, HBA:9710, HBA:9377, HBA:9421, HBA:9422, HBA:9708, HBA:9352, HBA:9353

Can you help me solve these unsat classes?

@hkir-dev hkir-dev added the bridge-files Issues related to the generation of bridge files from Uberon to other ontologies. label May 26, 2023
@dosumis
Copy link
Contributor

dosumis commented May 26, 2023

Prelim notes:

Lots of inconsistencies stem from general classification under regional part of brain - in the main HBA file, rather than the bridge. This causes problems for structures mapped to terms for spaces or to structures that extend outside the brain. A quick fix would be to remove this classification for all cases where we have a more specific classification in the bridge. In the case of spaces though, we might want to consider some remapping as we almost certainly need to be referring to the tissue surrounding the space.

@hkir-dev
Copy link
Author

HBA ontology is automatically generated from the structure graph (http://api.brain-map.org/api/v2/structure_graph_download/10.json) using linkml-owl.

Copy link

This issue has not seen any activity in the past 6 months; it will be closed automatically one year from now if no action is taken.

@github-actions github-actions bot added the Stale label Nov 23, 2023
@anitacaron
Copy link
Collaborator

@gouttegd could you please check if there still are unsats with HBA bridge?

@gouttegd gouttegd self-assigned this Nov 23, 2023
@gouttegd gouttegd removed the Stale label Nov 23, 2023
@gouttegd
Copy link
Collaborator

Yes. And I concur with @dosumis ’s preliminary notes above: Most, if not all, of the unsats seem to be caused by the fact that HBA’s terms for sulci are explicitly classified under Uberon’s regional part of brain, in addition to being mapped to the corresponding sulcus term in Uberon.

That is, we have things like that:

This is problematic because in Uberon, a sulcus is considered to be an anatomical space (“a depression or fissure in the surface of the brain”), ergo an immaterial entity, whereas a regional part of brain is an anatomical structure, ergo a material entity (which may happen to contain some anatomical spaces, but cannot be an anatomical space itself).

HBA seems to use sulcus to refer to the regions around the depression, rather than the depression itself. I have no strong opinion as to whether this is more correct than Uberon’s acceptation of the term (in particular, no idea how neuroscientists typically use “sulcus”), but in any case the two acceptations are clearly incompatible.

And more generally, I don’t think it is a good idea to have a term that is both (1) explicitly classified under a Uberon term and (2) mapped to another Uberon term, as is the case here. The purpose of the mapping is to create a bridging axiom between the foreign term and the Uberon term, and the purpose of that bridging axiom is to place the foreign term at a correct position within Uberon’s hierarchy when the two ontologies are merged. If the foreign term already has an explicit SubClassOf relationship with a Uberon term, then it already has a place within the hierarchy and does not need the bridging axiom.

Possible solutions:

  1. Change Uberon’s classification of sulcus as a anatomical space, so that the term makes no assertion about the “materiality” or “immateriality” of a sulcus. It’s the easiest solution as it’s basically just one axiom to remove in Uberon, but it’s also the worst in my opinion. Uberon is internally consistent around its use of “sulcus” defined as an anatomical space, I don’t like the idea of removing a useful axiom just to fix this particular problem.

  2. Stop classifying HBA’s “sulcus” terms as regional part of brain. Assuming Uberon is correct in considering that the sulci are only the fissures and not the tissues around them, this would be the most correct solution IMHO. But then it must happen in HBA, there’s nothing we can do about that in Uberon.

  3. Stop mapping HBA’s “sulcus” terms with Uberon’s “sulcus” terms. If HBA wants to keep using those terms to refer to more than the fissures, then we can just admit that this is incompatible with Uberon’s definition of a sulcus, and so the HBA terms and the Uberon terms should not be mapped since they do not mean the same thing.

3a) Create new terms in Uberon to represent “the neuronal tissues that surround a sulcus” (classified as anatomical structures, not anatomical spaces), and re-map HBA’s “sulcus” terms to those new terms.

@patrick-lloyd-ray
Copy link
Collaborator

After discussion on our end, solution 2 is correct.

@gouttegd
Copy link
Collaborator

gouttegd commented Dec 1, 2023

OK, I’ll leave this issue here open until the changes have been done in HBA, just in case there are other unsats beyond the ones caused by the “sulcus” terms.

@dosumis
Copy link
Contributor

dosumis commented Dec 4, 2023

The way Allen Brain Atlas classified and marks these is consistent with solution 2:

image image

@hkir-dev I think the simplest way to do this is to remove classification under 'brain region' from https://purl.brain-bican.org/ontology/hbao/HBA_9352 and all its children. No need to add back an alternative as everything is classified already in this branch.

Notes -

the reason there are 2 classifications is that the the base HBA file* has a general classification for cases where no specific mapping has been made. It would probably be better to fix this by adding general classifications to the bridge file only for cases where there is no specific mapping.

Also note - bridge files should use updated PURL (see above for example).

* It seems the based files all got merged when we set up a single repo to work these a couple of years back & the merged file has remained when we split https://github.com/brain-bican/human_brain_atlas_ontology/blob/main/src/ontology/components/all_templates.owl need to think through splitting out.

@gouttegd
Copy link
Collaborator

gouttegd commented Dec 4, 2023

bridge files should use updated PURL

The MBA and DMBA bridge files are now fetched directly from https://github.com/brain-bican/mouse_brain_atlas_ontology and https://github.com/brain-bican/developing_mouse_brain_atlas_ontology, so they already use whatever PURLs are set upstream (https://purl.brain-bican.org/ontology/mbao/MBA_???? and https://purl.brain-bican.org/ontology/dmbao/DMBA_????).

The HBA, DHBA, and PBA bridges are still locally generated and currently use “OBO” PURLs (http://purl.obolibrary.org/obo), but I can switch them to https://purl.brain-bican.org/ontology-type PURLs anytime.

Of note though, support for non-OBO PURLs in the OBO format is still theoretical at best (such support has been mandated in the format specification for years but in reality it is still under development). This means that while composite-metazoan.owl will correctly contain references to the purl.brain-bican.org IRIs, the OBO version will contain stuff like that:

[Term]
id: DMBA:15569

and for now almost OBO-reading tools (in particular all the OWLAPI-based ones) will interpret that as meaning http://purl.obolibrary.org/obo/DMBA_15569.

@dosumis
Copy link
Contributor

dosumis commented Dec 4, 2023

The HBA, DHBA, and PBA bridges are still locally generated and currently use “OBO” PURLs (http://purl.obolibrary.org/obo), but I can switch them to https://purl.brain-bican.org/ontology-type PURLs anytime.

That would be good.

@gouttegd
Copy link
Collaborator

gouttegd commented Jan 8, 2024

A large part of the unsats were fixed with brain-bican/human_brain_atlas_ontology#1, but I still count ~120 remaining unsats.

Many of them involve cranial nerves.

But:

which results in cranial nerves (HBA) being part of both the CNS and the PNS, something that Uberon does not allow (there’s an explicit disjointness axiom between 'part of some central nervous system' and 'part of some peripheral nervous system'

I believe the faulty axiom is the first: cranial nerves (HBA) is part of some myelencephalic white matter (HBA). “white matter” belongs to the CNS while “nerve“ is strictly defined (in Uberon at least) as belonging to the PNS, so stating that “cranial nerves” are part of the “white matter“ is inconsistent.

@patrick-lloyd-ray
Copy link
Collaborator

Thanks for this, @gouttegd. I'm going to look into these and work through them.

@dosumis
Copy link
Contributor

dosumis commented Jan 11, 2024

Worth searching through previous tickets. We've definitely been here before. One possible solution is to classify as nerve roots rather than nerves. See https://www.ebi.ac.uk/ols4/ontologies/uberon/classes/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0006843?lang=en

Copy link

This issue has not seen any activity in the past 6 months; it will be closed automatically one year from now if no action is taken.

@github-actions github-actions bot added the Stale label Jul 10, 2024
@anitacaron
Copy link
Collaborator

When I ran the initial merge, it didn't show any unsats. The PR #3281 fixed the issue.

robot merge -I http://purl.obolibrary.org/obo/uberon/uberon.owl \
-I https://raw.githubusercontent.com/obophenotype/uberon/master/src/ontology/bridge/uberon-bridge-to-hba.obo \
-I https://raw.githubusercontent.com/obophenotype/ABA_Uberon/master/src/ontology/sources/10.ofn \
explain --reasoner ELK -M unsatisfiability --unsatisfiable all --explanation unsats.md --output unsat_all_explanation.ofn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge-files Issues related to the generation of bridge files from Uberon to other ontologies. Stale upstream issue This issue needs to be fixed in an upstream resource
Projects
None yet
Development

No branches or pull requests

5 participants