OpenBEL / openbel-framework

An open platform for capturing, integrating, storing, and sharing biological knowledge in and across organizations.
http://openbel.org
Apache License 2.0
22 stars 7 forks source link

Compiling two documents is not a commutative operation #49

Closed abargnesi closed 11 years ago

abargnesi commented 11 years ago

Compiling two documents produces different results when the compilation order is switched. For example if you compile document A.bel and B.bel like:

./belc.sh -f A.bel -f B.bel ...

you will receive different KAM results when compared to:

./belc.sh -f B.bel -f A.bel

The compilation should be commutative with respect to document order.

The following test case exhibits this issue.

A.bel

p(HGNC:MAPK1, pmod(P, T)) => kin(p(HGNC:MAPK1))

B.bel

kin(p(HGNC:MAPK8)) -> p(HGNC:DUSP1)

If A is compiled first then the term p(HGNC:MAPK1) and the edges p(HGNC:MAPK1) actsIn kin(p(HGNC:MAPK1)), p(HGNC:MAPK1) hasModification p(HGNC:MAPK1, pmod(P,T)) are missing. If B is compiled first then the term p(HGNC:MAPK8) and the edge p(HGNC:MAPK8) actsIn kin(p(HGNC:MAPK8)) are missing.

The symptom of this issue is the loss of expanded knowledge (actsIn, hasModification, degredation, etc.) to one of the documents. The expanded knowledge is lost when merging both networks in Phase II.