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

Fixes issue with punning that made the ontology non-DL #391

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/aopo.iris
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
+(http://aopkb.org/aop_ontology#AopEntity):http://aopkb.org/aop_ontology#AdverseOutcome AO
+(http://aopkb.org/aop_ontology#AopEntity):http://aopkb.org/aop_ontology#KeyEvent AO
+(http://aopkb.org/aop_ontology#AopEntity):http://aopkb.org/aop_ontology#MolecularInitiatingEvent MIE

-:http://purl.org/spar/cito/citesAsAuthority
1 change: 1 addition & 0 deletions config/clo.iris
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
+(http://purl.obolibrary.org/obo/CL_0000003):http://purl.obolibrary.org/obo/CL_1001603 lung macrophage
+(http://purl.obolibrary.org/obo/CL_0000000):http://purl.obolibrary.org/obo/CL_0001034 cell in vitro
+(http://purl.obolibrary.org/obo/CL_0001034):http://purl.obolibrary.org/obo/CL_0000010 cultured cell (including cell lines)
-:http://purl.org/spar/cito/citesAsAuthority
1 change: 1 addition & 0 deletions config/pato.iris
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
+(http://purl.obolibrary.org/obo/PATO_0000068):http://purl.obolibrary.org/obo/PATO_0002632 secondary
+(http://purl.obolibrary.org/obo/BFO_0000019):http://purl.obolibrary.org/obo/PATO_0000150 texture
+(http://purl.obolibrary.org/obo/PATO_0000150):http://purl.obolibrary.org/obo/PATO_0002012 coating
-:http://purl.org/spar/cito/citesAsAuthority
1 change: 1 addition & 0 deletions config/uberon.iris
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
+(http://purl.obolibrary.org/obo/UBERON_0000062):http://purl.obolibrary.org/obo/UBERON_0002530 gland
+(http://purl.obolibrary.org/obo/UBERON_0002530):http://purl.obolibrary.org/obo/UBERON_0006925 digestive system gland;digestive gland
+(http://purl.obolibrary.org/obo/UBERON_0001062):http://purl.obolibrary.org/obo/UBERON_0000479 tissue
-:http://purl.org/spar/cito/citesAsAuthority
13 changes: 12 additions & 1 deletion scripts/src/tests/test_owl_integrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ def test_owl_file_integrity(self):
for version in config['versions']:
file = os.path.join(self.repo_path, f'enanomapper{version}.owl')
self.assertTrue(self.is_owl_file_valid(file), f"Invalid eNanoMapper ontology OWL file: enanomapper{version}.owl")

internal = os.listdir('internal')
internal_dev = os.listdir('internal-dev')
for i in internal:
if 'OWL'.casefold() in i:
file = os.path.join(self.repo_path, 'internal', i)
self.assertTrue(self.is_owl_file_valid(file), f"Invalid eNanoMapper internal module OWL file: {i}")
for i in internal_dev:
if 'OWL'.casefold() in i:
file = os.path.join(self.repo_path, 'internal-dev', i)
self.assertTrue(self.is_owl_file_valid(file), f"Invalid eNanoMapper internal-dev module OWL file: {i}")
def load_configuration(self):
"""Load the configuration from the YAML file and return it as a dictionary."""

Expand All @@ -44,6 +53,7 @@ def is_owl_file_valid(self, file_path):
Returns:
bool: True if the file is valid, False otherwise.
"""

try:
graph = Graph()
graph.parse(file_path, format='xml')
Expand All @@ -53,5 +63,6 @@ def is_owl_file_valid(self, file_path):
return False



if __name__ == '__main__':
unittest.main()