Sunday, December 6, 2009

libSBML via Antimony

The following functions (C and Python) are now available for reading and writing SBML:

loadSBMLString load SBML model using the XML string as input.
loadAntimonyString load Antimony model using the model string as input.
loadSBMLFile load SBML model using the file name as input.
loadAntimonyFile load Antimony model using the file name as input.
getSBMLString get SBML as a string from either a subset of items or all items.
getAntimonyString get Antimony model string from either a subset of items or all items.
writeSBMLFile write the SBML to an xml file.
writeAntimonyFile write the Antimony model to a text file.

Thursday, December 3, 2009

Changes to module implementation

The Module Tool originally used the merge items option from the Core library in order to merge two connected items. Upon deletion, the command was undone. The problem was during copy/paste, because the original handle was hidden, so it would not get copied. Since this was creating a complicated situation, I opted to change the direction entirely:

Now, the ModuleTool does not merge any items. Instead, it just provides the visual connections and interface. It also provides a very important function:

connectedItems( list of graphics items, list of handles, list of handles )

The above function searches the list of graphics items and fills in the two other lists provided in the argument (so those are outputs). The two lists will contain the set of nodes that are replaced and the set of new nodes that replace the old ones. Other tools use this information when generating the model. So, the responsibility of modular deconstruction has been shifted to the other tools instead of a single tool.

For example, the getRates function in StoichiometryTool does the following:
QList from, to;
ModuleTool::connectedItems(handles, from,to);

for each rate
rates[i].replace(from[i]->fullName(),to[i]->fullName());



A summary of the tool categories and their dependencies ( right side = more dependent)