Wednesday, December 8, 2010

Circular Plasmids

The above picture was the old version (not good). Below is the "new" version (much better because the black bars are removed). The "upstream" and "downstream" calculations are performed by taking the starting node and walking along the circle in increments of 0.02 * PI degrees (i.e. 100 points on the circle). If any part is smaller than that (hope not), it might get skipped. The AutoGeneRegulatoryTool now has two functions -- allPartsLinear and allPartsCircular -- one is used for linear arrangement of parts and the other for circular.

Octave Interpreter issues in Windows

On Windows, there is an issue when passing Swig types into Octave functions. Since Octave works with matrices, converting tc_matrix to Octave matrix is most important. The "fromTC" function does the job in Linux, but in windows, the OctaveInterpreter does a regex-replace of fromTC and replaces it with a double-for-loop that converts the tc_matrix into Octave's matrix.

Also, setInterpreter method has been added to the ConsoleWindow class. Here is how to use it (taken from SimpleDesigner.cpp):

ConsoleWindow * console = mainWindow.console();
OctaveInterpreterThread * octaveInterpreter = new OctaveInterpreterThread("tinkercell.oct", "libtcoct", &mainWindow);