From 4c9b981589f85eaf52525bf39b5f5fbbc89de8a0 Mon Sep 17 00:00:00 2001 From: Sarath Menon Date: Tue, 28 Nov 2023 15:35:46 +0100 Subject: [PATCH] fix ontology paths --- pyscal_rdf/network/ontology.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pyscal_rdf/network/ontology.py b/pyscal_rdf/network/ontology.py index 821b001..6d948e2 100644 --- a/pyscal_rdf/network/ontology.py +++ b/pyscal_rdf/network/ontology.py @@ -4,9 +4,12 @@ #prov = OntologyNetwork('pyscal_rdf/data/prov.rdf', delimiter='#') def read_ontology(): #read in ontologies - cmso = OntologyNetwork(os.path.join(os.path.dirname(__file__), '../pyscal_rdf/data/cmso.owl')) - pldo = OntologyNetwork(os.path.join(os.path.dirname(__file__), '../pyscal_rdf/data/pldo.owl')) - podo = OntologyNetwork(os.path.join(os.path.dirname(__file__), '../pyscal_rdf/data/podo.owl')) + file_location = os.path.dirname(__file__).split('/') + file_location = "/".join(file_location[:-1]) + + cmso = OntologyNetwork(os.path.join(file_location, 'data/cmso.owl')) + pldo = OntologyNetwork(os.path.join(file_location, 'data/pldo.owl')) + podo = OntologyNetwork(os.path.join(file_location, 'data/podo.owl')) #msmo = OntologyNetwork('../pyscal_rdf/data/msmo.owl') #combine them