

Hello,
We would like to share with you a modelling problem, and to obtain advice about it. The problem consists in a type of restriction that we encountered frequently in the medical field. These restrictions involve a relation that occurs between all the instances of a domain class and all the instances of a range class. For example: NSAI (NonSteroidal AntiInflammatory drug) and VKA (Vitamin K Antagonist) are two classes of drugs, and there is a wellknown drug interaction between those two classes. This means that all NSAI instances have a drug interaction with all VKA instances. Or, in firstorder logic:
∀ a, NSAI(a), ∀ b, VKA(b) => has_drug_interaction(a, b)
However, we were unable to model this restriction in Protégé or in OWL 2. The current OWL 2 language supports only the following quantifier restrictions: SomeValuesFrom (or “ some ” in Protégé) and AllValuesFrom (or “ only ” in Protégé). However, the restriction in the previous example does not correspond to SomeValuesFrom neither to AllValuesFrom. In firstorder logic, SomeValuesFrom and AllValuesFrom would translate has following, respectively:
∀ a, NSAI(a) => ∃ b, VKA(b) and has_drug_interaction(a, b)
∀ a, NSAI(a), ∀ b, has_drug_interaction(a, b) => VKA(b)
Please also notice that the name of the “ allValuesFrom ” OWL quantifier is somehow misleading, and that the name in Protégé, “ only ”, sounds less error prone.
We found two solutions in the literature, but none was satisfactory. The first solution consists in using rules, such as SWRL. However this is problematic because the knowledge is expressed in a procedural way, while a declarative expression of the knowledge is preferable in an ontology. In the previous example, a declarative expression of knowledge allows various applications, such as listing the interactions of a drug or listing the interactions between a set of drugs; on the contrary, rules like “ NSAI + VKA => interaction ” allows only the second application, but makes it much difficult to extract the interactions of a given drug.
The second solution was detailed by Stephan Schulz in the Yearbook of Medical Informatics (2013). In this solution, the “ drug interaction ” relation is considered to be asserted only if the interaction really occurred, but not for a “ potential ” interaction. Therefore, we are not searching for interactions, but rather for the absence of interaction. Thus, the AllValuesFrom / only quantifier can be used to model our relation as following : “ NSAI can have drug interaction only with VKA ”. While this solution works in theory, it is difficult to apply in practice. Of course, NSAI have several drug interactions, thus one should say “ NSAI can have drug interaction only with VKA or Methotrexate or... ”. Moreover, inheritance becomes problematic. For instance, Phenylbutazone is a subclass of NSAI that also has drug interaction with oral antidiabetic drugs. Thus, we need to add this interaction with oral antidiabetic drugs to Phenylbutazone, but also to NSAI, since the parent class must be more general that the child class. Therefore, we need to assert that “ NSAI can have drug interaction only with VKA or Methotrexate or oral antidiabetic drugs ”, even if this last interaction is actually only documented for Phenylbutazone.
Any comment are welcome!
Kind regards,
JeanBaptiste Lamy
LIMICS, University Paris 13, University Paris 6, INSERM
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


On 21/10/2014 15:39, JeanBaptiste Lamy wrote:
> We found two solutions in the literature, but none was satisfactory. The first solution consists in using rules, such as SWRL. However this is problematic because the knowledge is expressed in a procedural way, while a declarative expression of the knowledge is preferable in an ontology.
There is nothing procedural about SWRL, it is purely declarative.
NDAI(?a) ^ VKA(?b) > has_drug_interaction(?a, ?b)
It's a pure declarative implication (horn clause).
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


On Oct 21, 2014, at 6:39 AM, JeanBaptiste Lamy < [hidden email]> wrote:
> Hello,
>
> We would like to share with you a modelling problem, and to obtain advice about it. The problem consists in a type of restriction that we encountered frequently in the medical field. These restrictions involve a relation that occurs between all the instances of a domain class and all the instances of a range class. For example: NSAI (NonSteroidal AntiInflammatory drug) and VKA (Vitamin K Antagonist) are two classes of drugs, and there is a wellknown drug interaction between those two classes. This means that all NSAI instances have a drug interaction with all VKA instances. Or, in firstorder logic:
>
> ∀ a, NSAI(a), ∀ b, VKA(b) => has_drug_interaction(a, b)
>
How about modeling this with 2 "some" restrictions:
NSAI subclassOf (has_drug_interaction some VKA) and
VKA subclassOf (has_drug_interaction some NSAI)
Every instance of NSAI interacts with some instance of VKA and
Every instance of VKA interacts with some instance of NSAI
> However, we were unable to model this restriction in Protégé or in OWL 2. The current OWL 2 language supports only the following quantifier restrictions: SomeValuesFrom (or “ some ” in Protégé) and AllValuesFrom (or “ only ” in Protégé). However, the restriction in the previous example does not correspond to SomeValuesFrom neither to AllValuesFrom. In firstorder logic, SomeValuesFrom and AllValuesFrom would translate has following, respectively:
>
> ∀ a, NSAI(a) => ∃ b, VKA(b) and has_drug_interaction(a, b)
> ∀ a, NSAI(a), ∀ b, has_drug_interaction(a, b) => VKA(b)
>
> Please also notice that the name of the “ allValuesFrom ” OWL quantifier is somehow misleading, and that the name in Protégé, “ only ”, sounds less error prone.
>
> We found two solutions in the literature, but none was satisfactory. The first solution consists in using rules, such as SWRL. However this is problematic because the knowledge is expressed in a procedural way, while a declarative expression of the knowledge is preferable in an ontology. In the previous example, a declarative expression of knowledge allows various applications, such as listing the interactions of a drug or listing the interactions between a set of drugs; on the contrary, rules like “ NSAI + VKA => interaction ” allows only the second application, but makes it much difficult to extract the interactions of a given drug.
>
> The second solution was detailed by Stephan Schulz in the Yearbook of Medical Informatics (2013). In this solution, the “ drug interaction ” relation is considered to be asserted only if the interaction really occurred, but not for a “ potential ” interaction. Therefore, we are not searching for interactions, but rather for the absence of interaction. Thus, the AllValuesFrom / only quantifier can be used to model our relation as following : “ NSAI can have drug interaction only with VKA ”. While this solution works in theory, it is difficult to apply in practice. Of course, NSAI have several drug interactions, thus one should say “ NSAI can have drug interaction only with VKA or Methotrexate or... ”. Moreover, inheritance becomes problematic. For instance, Phenylbutazone is a subclass of NSAI that also has drug interaction with oral antidiabetic drugs. Thus, we need to add this interaction with oral antidiabetic drugs to Phenylbutazone, but also to NSAI, since the parent class must be more general that the child class. Therefore, we need to assert that “ NSAI can have drug interaction only with VKA or Methotrexate or oral antidiabetic drugs ”, even if this last interaction is actually only documented for Phenylbutazone.
>
> Any comment are welcome!
>
> Kind regards,
> JeanBaptiste Lamy
> LIMICS, University Paris 13, University Paris 6, INSERM
> _______________________________________________
> protegeuser mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protegeuser
Samson Tu email: [hidden email]
Senior Research Scientist web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research phone: 16507253391
Stanford University fax: 16507257944
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


On 10/21/2014 03:57 PM, Samson Tu wrote:
> How about modeling this with 2 "some" restrictions:
>
> NSAI subclassOf (has_drug_interaction some VKA) and
> VKA subclassOf (has_drug_interaction some NSAI)
>
> Every instance of NSAI interacts with some instance of VKA and
> Every instance of VKA interacts with some instance of NSAI
Hello,
I do not thnink it meets JeanBaptiste requirements: indeed, for
every instance of NSAI, there is at least one instance of VKA it
interacts with (but there might be other instances of VKA it does not
interact with), whereas he wants to represent that it interacts with
every instance of VKA.
Maybe enumerations could do the trick, but it looks clumsy
olivier
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


> On 10/21/2014 03:57 PM, Samson Tu wrote:
> > How about modeling this with 2 "some" restrictions:
> >
> > NSAI subclassOf (has_drug_interaction some VKA) and
> > VKA subclassOf (has_drug_interaction some NSAI)
> >
> > Every instance of NSAI interacts with some instance of VKA and
> > Every instance of VKA interacts with some instance of NSAI
>
>
> Hello,
> I do not thnink it meets JeanBaptiste requirements: indeed, for
> every instance of NSAI, there is at least one instance of VKA it
> interacts with (but there might be other instances of VKA it does not
> interact with), whereas he wants to represent that it interacts with
> every instance of VKA.
No, it does not correspond to my requirements : asserting than "Every instance of NSAI interacts with some instance of VKA" does not implies that "Every instance of NSAI interacts with * EVERY * instances of VKA".
Kind regards,
JeanBaptiste Lamy
MCF, LIMICS, Université Paris 13
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


Hello, I do not thnink it meets JeanBaptiste requirements: indeed, for every instance of NSAI, there is at least one instance of VKA it interacts with (but there might be other instances of VKA it does not interact with), whereas he wants to represent that it interacts with every instance of VKA.
Maybe enumerations could do the trick, but it looks clumsy
Right, I misread the requirement. SWRL rule is probably the most direct solution. As Maxime said, SWRL rule is declarative.
With best regards, Samson
 Center for Biomedical Informatics Research phone: 16507253391 Stanford University fax: 16507257944
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


Hello,
I think SWRL rules can "do the job", however it is much difficult to use the knowledge expressed by the rules in different ways. For example, there is two basic uses for a drug interaction knowledge base: checking for interaction in a set of drugs, and listing the interaction associated to a drug. The rule you propose can easily be used for searching for existent interaction in a set of drugs including a NDAI and a VKA. But it would be more difficult to use such rules to obtain the list of all interactions for a given drug (e.g. NDAI). (This was what I was meaning by "procedural", but it was not the right word  sorry for that).
So we are searching for a more "universal" approach that would facilitate the reuse of the knowledge. Perhaps an approach could be to generate the rules from another knowledge representation ?
Thank you for your help,
Kind regards,
JeanBaptiste Lamy
MCF, LIMICS, Université Paris 13
> On 21/10/2014 15:39, JeanBaptiste Lamy wrote:
> > We found two solutions in the literature, but none was satisfactory. The first solution consists in using rules, such as SWRL. However this is problematic because the knowledge is expressed in a procedural way, while a declarative expression of the knowledge is preferable in an ontology.
>
> There is nothing procedural about SWRL, it is purely declarative.
>
> NDAI(?a) ^ VKA(?b) > has_drug_interaction(?a, ?b)
>
> It's a pure declarative implication (horn clause).
>
>
>
> _______________________________________________
> protegeuser mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protegeuser_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


On 21/10/2014 17:17, JeanBaptiste Lamy wrote:
> Hello,
>
> I think SWRL rules can "do the job", however it is much difficult to use the knowledge expressed by the rules in different ways. For example, there is two basic uses for a drug interaction knowledge base: checking for interaction in a set of drugs, and listing the interaction associated to a drug. The rule you propose can easily be used for searching for existent interaction in a set of drugs including a NDAI and a VKA. But it would be more difficult to use such rules to obtain the list of all interactions for a given drug (e.g. NDAI). (This was what I was meaning by "procedural", but it was not the right word  sorry for that).
>
Then, I am not sure I understand your use case.
But with
NDAI(?a) ^ VKA(?b) > has_drug_interaction(?a, ?b)
you can query your ontology about drug interactions in any ways:
 has_drug_interaction(?x, ?y)
 has_drug_interaction(someDrug, ?y)
 has_drug_interaction(?x, someDrug)
 has_drug_interaction(someDrug1, someDrug2)
Hope that helps...
Max.
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


On 21.10.2014, at 15:39, JeanBaptiste Lamy < [hidden email]> wrote:
> ∀ a, NSAI(a), ∀ b, VKA(b) => has_drug_interaction(a, b)
Hi JeanBaptiste,
there is a technique that allows to do this in OWL, see the following paper:
Sebastian Rudolph, Markus Krötzsch, Pascal Hitzler. All Elephants are Bigger than All Mice. In Proceedings of the 21st International Workshop on Description Logics (DL08). CEUR Workshop Proceedings 2008. PDF available at http://korrekt.org/page/All_Elephants_are_Bigger_than_All_MiceThe construction is described in Lemma 5.
Cheers
Thomas

Dr. Thomas Schneider
Universität Bremen, FB 03
Postfach 330440
28334 Bremen
Germany
+49 421 21864432
http://www.informatik.unibremen.de/~ts/For visits: Cartesium, Room 2.56

Stutton (n.)
Tiny melted plastic nodule which fails to help fasten a duvet cover.
Douglas Adams, John Lloyd: The Deeper Meaning of Liff
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


Might a library of SPARQL construct queries work?
This construct query would create statements asserting that all instances of drug:NSAI interacts_with all instances of drug:VKA and drug:XYZ and ...
CONSTRUCT {?nsai drug:interacts_with ?drug}
WHERE {
?nsai rdf:type drug:NSAI .
?drug rdf:type drug:VKA .
?drug rdf:type drug:XYZ . (in other words you could add to the query as additional interactions were discovered)
}
As far as querying, You could create a rules ontology consisting of classes "Rule", "Consequents" (the construct clauses) and "Antecedents" (the where clauses). Instances of Consequents and Antecedents would be of type rdf:Statement. Searching for all of the interactions of a drug would then come down to writing a SPARQL query against this rules ontology that went something like this:
Select ?interactive_drug
WHERE {
?rule rdf:type rules:Rule . (gets all the rules)
?rule has_part ?consequent .
?consequent rdf:type rule:Consequent . (gets the construct clauses)
?consequent rdf:subject ?drug . (gets the parameter holding the instances of the drug of interest e.g. "?nsai"
?rule has_part ?antecedent1 .
?antecedent1 rdf:type rule:Antecedent . (gets all where clauses)
?antecedent1 rdf:subject ?drug . (filters the where clauses to those whose subjects are the drug of interest e.g. "?nsai"
?antecedent1 rdf:object <drug:NSAI> . (filters the where clauses further so that drug of interest is now of the correct type e.g. <drug:NSAI>
?rule has_part ?antecedent . (gets all the where clauses)
?antecedent rdf:object ?interactive_drug . (gets all the drug types from the where clauses
FILTER (?interactive_drug != <drug:NSAI> . (filters out the drug of interest leaving just a list of drug types that interact with it
}
Original Message
From: protegeuser [mailto: [hidden email]] On Behalf Of JeanBaptiste Lamy
Sent: Tuesday, October 21, 2014 11:17 AM
To: User support for WebProtege and Protege Desktop
Cc: Sylvie Despres
Subject: Re: [protegeuser] How to model relations occurring between all the instances of a domain class and all the instances of a range class ?
Hello,
I think SWRL rules can "do the job", however it is much difficult to use the knowledge expressed by the rules in different ways. For example, there is two basic uses for a drug interaction knowledge base: checking for interaction in a set of drugs, and listing the interaction associated to a drug. The rule you propose can easily be used for searching for existent interaction in a set of drugs including a NDAI and a VKA. But it would be more difficult to use such rules to obtain the list of all interactions for a given drug (e.g. NDAI). (This was what I was meaning by "procedural", but it was not the right word  sorry for that).
So we are searching for a more "universal" approach that would facilitate the reuse of the knowledge. Perhaps an approach could be to generate the rules from another knowledge representation ?
Thank you for your help,
Kind regards,
JeanBaptiste Lamy
MCF, LIMICS, Université Paris 13
> On 21/10/2014 15:39, JeanBaptiste Lamy wrote:
> > We found two solutions in the literature, but none was satisfactory. The first solution consists in using rules, such as SWRL. However this is problematic because the knowledge is expressed in a procedural way, while a declarative expression of the knowledge is preferable in an ontology.
>
> There is nothing procedural about SWRL, it is purely declarative.
>
> NDAI(?a) ^ VKA(?b) > has_drug_interaction(?a, ?b)
>
> It's a pure declarative implication (horn clause).
>
>
>
> _______________________________________________
> protegeuser mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protegeuser_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


On Tue, Oct 21, 2014 at 9:39 AM, JeanBaptiste Lamy
< [hidden email]> wrote:
> Hello,
>
> We would like to share with you a modelling problem, and to obtain advice about it. The problem consists in a type of restriction that we encountered frequently in the medical field. These restrictions involve a relation that occurs between all the instances of a domain class and all the instances of a range class. For example: NSAI (NonSteroidal AntiInflammatory drug) and VKA (Vitamin K Antagonist) are two classes of drugs, and there is a wellknown drug interaction between those two classes. This means that all NSAI instances have a drug interaction with all VKA instances. Or, in firstorder logic:
>
> ∀ a, NSAI(a), ∀ b, VKA(b) => has_drug_interaction(a, b)
>
> However, we were unable to model this restriction in Protégé or in OWL 2. The current OWL 2 language supports only the following quantifier restrictions: SomeValuesFrom (or “ some ” in Protégé) and AllValuesFrom (or “ only ” in Protégé). However, the restriction in the previous example does not correspond to SomeValuesFrom neither to AllValuesFrom. In firstorder logic, SomeValuesFrom and AllValuesFrom would translate has following, respectively:
>
> ∀ a, NSAI(a) => ∃ b, VKA(b) and has_drug_interaction(a, b)
> ∀ a, NSAI(a), ∀ b, has_drug_interaction(a, b) => VKA(b)
>
> Please also notice that the name of the “ allValuesFrom ” OWL quantifier is somehow misleading, and that the name in Protégé, “ only ”, sounds less error prone.
>
> We found two solutions in the literature, but none was satisfactory. The first solution consists in using rules, such as SWRL. However this is problematic because the knowledge is expressed in a procedural way, while a declarative expression of the knowledge is preferable in an ontology. In the previous example, a declarative expression of knowledge allows various applications, such as listing the interactions of a drug or listing the interactions between a set of drugs; on the contrary, rules like “ NSAI + VKA => interaction ” allows only the second application, but makes it much difficult to extract the interactions of a given drug.
>
> The second solution was detailed by Stephan Schulz in the Yearbook of Medical Informatics (2013). In this solution, the “ drug interaction ” relation is considered to be asserted only if the interaction really occurred, but not for a “ potential ” interaction. Therefore, we are not searching for interactions, but rather for the absence of interaction. Thus, the AllValuesFrom / only quantifier can be used to model our relation as following : “ NSAI can have drug interaction only with VKA ”. While this solution works in theory, it is difficult to apply in practice. Of course, NSAI have several drug interactions, thus one should say “ NSAI can have drug interaction only with VKA or Methotrexate or... ”. Moreover, inheritance becomes problematic. For instance, Phenylbutazone is a subclass of NSAI that also has drug interaction with oral antidiabetic drugs. Thus, we need to add this interaction with oral antidiabetic drugs to Phenylbutazone, but also to NSAI, since the parent class must be more general that the child class. Therefore, we need to assert that “ NSAI can have drug interaction only with VKA or Methotrexate or oral antidiabetic drugs ”, even if this last interaction is actually only documented for Phenylbutazone.
>
> Any comment are welcome!
This can be difficult to model in a way that is efficient for
reasoners, but an exact solution is called "rolification". The idea
is to create a role rC for a class C such that rC(a,b) holds only when
a = b, and C(a). That is, rC holds only on instances of C and
themselves. Then, to say that a property p holds between every
instance of C and D, you can use a subproperty chain axiom:
rC o topObjectProperty o rD SubPropertyOf p
In first order logic, that would be written
rC(w,x) & topObjectProperty(x,y) & rD(y,z) => p(w,z)
since rC and rD only relate individuals to themselves, this is equivalent to
rC(x,x) & topObjectProperty(x,y) & rD(y,y) => p(x,y)
I've written about an implementation in a number of Stack Overflow
questions. [OWL 2
rolification]( http://stackoverflow.com/q/16989042/1281433) is the
first one, and on the right hand side, there's a list of Linked
questions that are mostly relevant and employ this technique.
//JT

Joshua Taylor, http://www.cs.rpi.edu/~tayloj/_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser


Agree with Maria. In the drugdrug interaction reality, the modeling case that JeanBaptiste raised may not be the sound one to model for the sake of drugdrug interaction research or knowledge discover. Besides the solutions given in this mail exchange, please check with your domain expert to make sure your primary question is correct.
Best, Asiyah
_______________________________________________
protegeuser mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protegeuser

