Pellet and the ChemAxiom's

24 views
Skip to first unread message

Egon Willighagen

unread,
May 24, 2009, 11:43:21 AM5/24/09
to chem...@googlegroups.com
Hi all,

are there people here with experience with OWL axioms and OWL? I have
been banging my head against Pellet 2.0.0.RC4 regarding axioms...

Given this ChemAxiom:

<owl:Class rdf:ID="Solvent">
<rdfs:subClassOf>
<owl:Class rdf:about="#ChemicalSpecies"/>
</rdfs:subClassOf>
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<owl:Class rdf:about="#ChemicalSpecies"/>
<owl:Restriction>
<owl:someValuesFrom>
<owl:Class rdf:ID="SolventRole"/>
</owl:someValuesFrom>
<owl:onProperty rdf:resource="#hasRole"/>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>

And I define this:

<ChemDomain:ChemicalSpecies rdf:ID="benzene">
<ChemDomain:hasRole>
<ChemDomain:ChemicalRole rdf:about="ChemDomain:SolventRole"/>
</ChemDomain:hasRole>
</ChemDomain:ChemicalSpecies>

I would expect that the triple to be reasoned by Pellet: xxx:benzene
rdf:type ChemDomain:Solvent

I do see it typed as Continuent, Object, Thing, etc... but not Solvent...

What am I doing wrong? Is the assumption that the above triple is not
implied, or does Pellet simply not do this kind of reasoning?

Egon

--
Post-doc @ Uppsala University
http://chem-bla-ics.blogspot.com/

Michel Dumontier

unread,
May 24, 2009, 1:54:23 PM5/24/09
to chem...@googlegroups.com
Hi Egon,
 Can you provide us with the ontology document? It's hard to tell what is being said vis a vis namespaces

-=Michel=-
--
Michel Dumontier
Assistant Professor of Bioinformatics
http://dumontierlab.com

Egon Willighagen

unread,
May 24, 2009, 2:15:12 PM5/24/09
to chem...@googlegroups.com
On Sun, May 24, 2009 at 7:54 PM, Michel Dumontier
<michel.d...@gmail.com> wrote:
>  Can you provide us with the ontology document? It's hard to tell what is
> being said vis a vis namespaces

ChemAxiomDomain:

http://bitbucket.org/na303/chemaxiomchemdomain/src/53586b7f942e/ChemAxiomChemDomain.owl

The small benzene which I assign Chemical Role looks in full:

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns="http://rdf.openmolecules.net/name/#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:ChemDomain="http://www.polymerinformatics.com/ChemAxiom/ChemDomain.owl#"
xml:base="http://rdf.openmolecules.net/name/#">

<ChemDomain:ChemicalSpecies rdf:ID="benzene">
<ChemDomain:hasRole>
<ChemDomain:ChemicalRole rdf:about="ChemDomain:SolventRole"/>
</ChemDomain:hasRole>
</ChemDomain:ChemicalSpecies>

</rdf:RDF>

I did just notice that the ChemAxiomDomain actually defines the
owl:Restriction as owl:equivalentClass ... I overlooked this
earlier... If I understood correctly, this means that classes are
equivalent, but not that the Individuals of those classes take over
the Class type...

That would be done by owl:sameAs instead of owl:equivalentClass, but
that would make it OWL Full... but the following does not help in
Pellet either:

<owl:Class rdf:ID="Solvent">
<rdfs:subClassOf>
<owl:Class rdf:about="#ChemicalSpecies"/>
</rdfs:subClassOf>

<owl:sameAs>
<!-- owl:equivalentClass -->


<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<owl:Class rdf:about="#ChemicalSpecies"/>
<owl:Restriction>
<owl:someValuesFrom>
<owl:Class rdf:ID="SolventRole"/>
</owl:someValuesFrom>
<owl:onProperty rdf:resource="#hasRole"/>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>

<!-- /owl:equivalentClass -->
</owl:sameAs>
</owl:Class>

Alan Ruttenberg

unread,
May 25, 2009, 5:50:50 PM5/25/09
to Egon Willighagen, chem...@googlegroups.com
On Mon, May 25, 2009 at 4:15 PM, Egon Willighagen
<egon.wil...@gmail.com> wrote:
> Hi Alan,
>
> On Mon, May 25, 2009 at 9:21 PM, Alan Ruttenberg
> <alanrut...@gmail.com> wrote:
>> Not sure why this didn't make the list..
>
> Weird indeed... You were listed as member already before I sent my email...
>
>> ---------- Forwarded message ----------
>> Have a look at http://svn.mumble.net:8080/svn/lsw/trunk/owl/tests/benzene-solvent.lisp
>> and http://svn.mumble.net:8080/svn/lsw/trunk/owl/tests/benzene-solvent.png
>>
>> In the image (i) indicates an individual versus a class.
>
> Mmm... that works... so there must have been something wrong with my RDF... :(
>
> Thanx for the elaborate example with various alternatives... I see
> Pellet pick up:
>
> [http://example.com/benzeneMolecule1, http://example.com/benzeneMolecule,
> http://example.com/benzeneMolecule2]
>
> Only &CHEBI;CHEBI_16716 is missing, which has the anynomous class with
> the same definition  as the SolventChemical class...

It's there. It's a subclass of SolventChemical. The reason it's a
subclass is that SolventChemical is defined as "complete". I.e. it is
given necessary and sufficient conditions that define what an instance
must be like in order to be a member, completely. Any instance
satisfying that description is inferred to be a member of the class.
On the other hand, Benzene is given a superclass expression. This is a
necessary condition, but not sufficient. Consider that Benzene will
have other axioms associated with it, such as it's formula. Not all
members of SolventChemical will have the same formula as Benzene. You
might say - well I didn't add any other axioms -- that doesn't matter.
OWL knows that a class with a necessary condition is always a subclass
of a class with the same condition but given as necessary and
sufficient.

>
> Would you expect &CHEBI;CHEBI_16716 to be reasoned too?
>
>> There are several examples here.
>> Benzene defined as a class (as I think it should be)
>
> Just out of curiosity... why? Why would one want 21M classes (current
> count)... ?

Let's separate two things.

a) Lots of chemicals: 21M classes or 21M individuals - what do you
consider to be the difference, other than there being a few more
triples. If you want fewer chemicals, you could create a "slim"
version of Chebi that has only the classes you care about.

b) You want classes instead of individuals because then there can be
clarity on what you are modeling. The problem is that one has to
explain what Benzene (the individual) refers to. It's much clearer,
conceptually, to always have individuals represent particulars.
Moreover there are going to be cases where it doesn't cut it to use
individuals at all - where you will land up recapitulating, for
individuals, what can be said about classes. For example molecules
that have isomers. Which of the L-, R- or union of both is to be the
individual and which the class? Finally by modeling in a manner
consistent with Chebi there is a chance that people who consume
resources from different sites can be trivially integrated, because
they us e the same ontology - after all this is one of the goals of
the semantic web.


>
>> benzeneMolecule1 as I think you were attempting to define it. This
>> version classifies correctly.
>> benzeneMolecule2 demonstrating that you don't have to make an actual
>> individual of the role if you don't want to.
>> benzeneMolecule as one would use it wrt CHEBI - name individuals are
>> individual molecules (though one rarely names a single one of them,
>> that is aside from the representational point being made).
>
> Very useful examples. Thanx!
>
>> Let me encourage you to consider collaborating with CHEBI - they are
>> already working in the direction you suggest, they are a great team,
>
> Already been speaking with them. I'm a regular guest of Christoph's
> group, though primarily the metabolite elucidation part... I have been
> talking with Paula on donating Dutch translations of (some) ChEBI
> entries...
>
>> Feel free to ask any questions about what I've sent. It's authored in
>> LSW, a tool I wrote that uses pellet. What tool are you using for
>> authoring?
>
> Bioclipse :) I am writing a RDF plugin... the importance is that
> Bioclipse (and the CDK) know about chemistry... something RDF itself
> does not. Using this to validate existing and generating new chemical
> RDF. The plugin uses Jena and Pellet at this moment.
>
>> If you are writing raw rdfxml or rdf to author OWL you are
>> making life unnecessarily difficult for yourself.
>
> Well... not really. I want to know what is going on on the triple
> level... GUIs hide too much for me. But, agreed, GUIs around good
> tools do have the advantage of typically outputing good and consistent
> material... I am not so fluent in RDF yet...

GUIs are not necessary, but writing in something akin to the abstract
syntax, or in manchester syntax will be clearer and avoid dealing with
irritating rdf xml encoding issues. You are also welcome to use LSW,
the tool I used to write the example and which I use for all my semweb
development.
>
> I'm going to align your version with what I had and the online
> ChemAxiom OWL files has, and see if I can find what I did wrong...

Good luck,

Alan

Alan Ruttenberg

unread,
May 24, 2009, 5:13:17 PM5/24/09
to chem...@googlegroups.com
Hi Egon,
I've taken the liberty of using URIs that already correspond to the
entities you describe, from the relation ontology and from CHEBI.

There are several examples here.
Benzene defined as a class (as I think it should be)
benzeneMolecule1 as I think you were attempting to define it. This
version classifies correctly.
benzeneMolecule2 demonstrating that you don't have to make an actual
individual of the role if you don't want to.
benzeneMolecule as one would use it wrt CHEBI - name individuals are
individual molecules (though one rarely names a single one of them,
that is aside from the representational point being made).

Let me encourage you to consider collaborating with CHEBI - they are
already working in the direction you suggest, they are a great team,
have support in different areas (e.g. OWL, from me and others), and it
would be good to have the best people in the area working towards a
single artifact that we can share.

Feel free to ask any questions about what I've sent. It's authored in
LSW, a tool I wrote that uses pellet. What tool are you using for
authoring? If you are writing raw rdfxml or rdf to author OWL you are
making life unnecessarily difficult for yourself.

Regards,
Alan
Reply all
Reply to author
Forward
0 new messages