External Classes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

External Classes

matthew_crowther
Hi,

So I created an ontology and some classes contain equivalent_to properties for example:
'''
    class Effector(SmallMolecule):
        equivalent_to = [SmallMolecule & (role.value(chebi.Effector) | role.value(i_chebi.Effector))]
'''

From this, I build/save the ontology.
However, when I load again and attempt to use the ontology I get SPARQL query results like:

'''
[ufabo.role.value(None), 29, 'http://identifiers.org/chebi/CHEBI:35224']
'''

I assume this is because certain identifiers are unbound thus why
ufabo.role.value(None) is not something like: ufabo.role.value(chebi.CHEBI:35224)

I think I need to add classes to my ontology that specific to these external ontology terms.
Therefore, the question is:
How do I add a class referencing a term within a different ontology into my ontology?
I would expect something like
    <owl:Class rdf:about="http://identifiers.org/chebi/CHEBI:35224"/>
within the serialised rdf.

Any help is appreciated, also If you believe my reasoning is wrong please let me know I am not an expert with OWL or ontologies in general.
Reply | Threaded
Open this post in threaded view
|

Re: External Classes

Jiba
Administrator
Hi,

I think the problem is in the creation of the classes, in "chebi.Effector". You should verify that "chebi.Effector" is not None.

If Chebi use arbitrary class names, e.g. number like 35224 instead of names like "Effector", you need to use those arbitrary names, for example:

    class Effector(SmallMolecule):
        equivalent_to = [SmallMolecule & (role.value(chebi[35224]) | role.value(i_chebi[35224]))]

Jiba