Monday, October 13, 2008

Structure and Framework



TinkerCell is built using the wonderful Qt Toolkit

TinkerCell's core library  (Tinkercell.dll, Tinkercell.so, or Tinkercell.dylib)  is a very general framework that provides a structure and various services. It is not necessarily a program for biological networks, but initial set of plug-ins that come with TinkerCell are specifically designed with synthetic biology in mind. In this blog (and the rest), I will use the term "tool" to refer to plug-ins. 

TinkerCell has 5 different types of graphics items: texts (TextGraphicsItem.h), parts  (PartGraphicsItem.h), connections (ConnectionGraphicsItem.h), control points (PartGraphicsItem.h) , and graphic tools (Tool.h). Everything that is drawn on the screen is one of these. Parts themselves are composed of smaller shapes, but those cannot be selected separately, except in the PartGraphics program.



In TinkerCell, almost all graphical item belongs with a Handle, (ItemHandle.h). A handle brings together the graphics item(s), the tools associated with the graphics item(s), the data associated with the graphics item(s), and the family of the item(s). Each handle represents a single entity in the model. The graphics items inside that handle are the visual representations of that entity. A single entity can be represented using multiple graphics items -- for example, aliases are perfect examples of a single handle having two graphical items. Labels and other texts are also usually part of the same handle. Graphical items without handles include arrow-heads, graphic tools, and control points. Free floating text may not have handles either.


The "data" block is a key feature in TinkerCell. It allows a great amount of flexibility in what can be represented. 

Each handle contains a data item (ItemHandle.h). Each data item is a hash table, where the tools can store custom data tables (DataTable.h). The attributes and stoichiometry information are not part of the TinkerCell core. They are added by tools (plug-ins). Thus, new tools can add new information to the items in TinkerCell. 


The family information (ItemFamily.h) is used to classify and annotate each handle. Item families contain a name, initial set of attributes for handles in that family, and the default graphics item(s) for handles in that family. Families also have parents; they can have multiple parents. 


No comments: