As promised a few weeks back, I recently (more or less) completed some pretty substantial changes in the curation tool. Specifically, I have changed the process of specifying ‘participants’ (actors, objects) associated with behavior events. Participants typically include a spider or its anatomical parts and possibly another organism (mate, prey) or a substrate (silk, plant parts, a surface). The old version simply allowed choice of a term for (spider) taxon and anatomy as the primary participant and a secondary substrate participant. This allowed capturing simple events, but was completely inadequate for capturing social or predation interactions. The old version did have the virtue of simplicity, and may return in some form of ‘wizard tool’ in the future.
The new version runs rather closer to the OWL that ultimately gets generated. Claims consist of a ‘root’ element that captures the behavior term and a set of participants, each a tree structure (potentially, though most commonly a chain) of participant ‘elements’ that correspond to OWL classes, linked by arcs corresponding to OWL predicates (aka OBO relations). The tree for a participant more or less corresponds to an OWL class or individual expression. The interface still requires a great deal of polish, but I’ve added a simple d3 graph display that should make the structure of what’s being created a little clearer.
The ‘table of associated participants’ lists each participant using pidgin English and indicates its level of participation: ‘active participant’ or (passive) ‘participant’. The graph below the table shows the relations between the participant elements (squares) and the root with predicates indicated by the color of connecting lines (red = active participant, orange = participant, blue = part of). The link table on the right will (when I’ve finished implementing it) show more details about the ‘active’ participant element. This table, along with color changing when an element is selected, remain to be implemented, though the selection mechanism is there. Like many d3 graphs, node placement is ‘force-driven’ and can be tweaked by dragging with your pointing device. The graph display is largely a transformation and simplification of this molecule example.
The corresponding upper part of the page looks like this:
This has been changed relatively little, except that drop selection fields for terms from taxon, anatomy, and environment terms have disappeared, they now appear during the element creation dialog that appears as an ajax form in the participant element section. The text fields for publication taxon, anatomy and substrate remain. These text metadata fields are associated with the participant as a whole, rather than the corresponding elements.
I’ve started writing some tests for the curation tool. Adding Selenium to walk through the screens was relatively straightforward. Unit tests have been rather more of a challenge, due, in part, to the eccentricities of the web2py framework. But the issues I’ve encountered with web2py are large enough to deserve a post of their own. Suffice it to say, there are some doctests in the code, but traditional unit tests remain in the future.
This is what I had been working on, as time permitted, over the second half of 2014. I’ve now switched back to the owl generation side, which, as you may remember is a java tool that pulls from the database to build using the OWLAPI. There is a lot of work to do there as well. Since I switched I’ve started using the EclEmma test coverage module to try to improve the rather pathetic test harness I had for the owl generation. At least unit testing has been fairly straightforward for now.