Nelson,
Can you provide details on which exact version of drools (5.0.1?) you are
using and what is the error/stack trace you are receiving?
Thanks,
Edson
2010/1/19 Axelrod, Nelson <naxelrod(a)jcvi.org>
Hi,
I’ve encountered problems constructing nested Boolean expressions in Drools
5.0 using the prefixOr syntax. We’re using Drools to build a genome
annotation system at the Venter Institute. The following example rule
assigns an annotation if there is a blast hit to a gene GB|AAQ16631.1, or
either a blast hit to gene GB|AAQ16631.1, or to any gene within 500 bases of
a gene with an HMM hit to TIGR00905. I’ve left off some details to focus on
how we are structuring the syntax of our prefixOr and prefixAnd expressions.
The Drools parser throws errors when it encounters the 2nd “blast_hit”
statement in the example below. Our prefixOr and prefixAnd expressions work
as expected when we use similar syntax, at least until we attempt to use
nested or expressions.
*rule* "2645|lysine decarboxylase CadA"
*when*
(*or*
(*and*
blast_hit : BlastHit( hitId=='GB|AAQ16631.1')
gene1 : Feature( featureId == blast_hit.queryId )
)
(*or*
(*and*
blast_hit : BlastHit( hitId=='GB|AAQ16631.1' )
gene1 : Feature( featureId == blast_hit.queryId )
)
(*and*
hmm_hit1 : HmmHit( hitId=='TIGR00905' )
gene1 : Feature( featureId == hmm_hit1.queryId )
gene2 : Feature( *eval*(gene2.isWithin(gene1,
500)) )
)
)
)
*then*
Annotation a = *new* Annotation("lysine decarboxylase CadA");
gene1.addAnnotation(a);
*end*
Any suggestions are much appreciated.
Thanks,
Nelson
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @
www.jboss.com