Team:Groningen/Brainstorm/Modelling

From 2009.igem.org

(Difference between revisions)
m (Modelling a Genetic Circuit - TODO: Anchor)
(Interactive Graphs?: Added dojo version of graphs)
Line 72: Line 72:
<span id="chart2"></span>
<span id="chart2"></span>
</div>
</div>
 +
<table>
 +
<tr>
 +
<td id="dojochart1" style="width: 400px; height: 240px;"></td>
 +
<td id="dojochart2" style="width: 400px; height: 240px;"></td>
 +
</tr>
 +
<tr>
 +
<td align="center"><div id="dojolegend1"></div></td>
 +
<td align="center"><div id="dojolegend2"></div></td>
 +
</tr>
 +
</table>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
 +
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.3.0/dojo/dojo.xd.js" djConfig="isDebug: false"></script>
<script type="text/javascript">
<script type="text/javascript">
 +
 +
var loaded = 0;
 +
 +
function onLoadCallback() {
 +
  loaded++;
 +
  if (loaded==2) {
 +
    initialize(); // Google, Dojo is called when results from the query return.
 +
  } 
 +
}
 +
 +
<!-- Google part -->
// Load the Visualization API and the scatterchart package.
// Load the Visualization API and the scatterchart package.
Line 79: Line 101:
// Set a callback to run when the API is loaded.
// Set a callback to run when the API is loaded.
-
google.setOnLoadCallback(initialize);
+
google.setOnLoadCallback(onLoadCallback);
var data, chart = [], view = [];
var data, chart = [], view = [];
 +
var dojochart = [], dojolegend = [];
function initialize() {
function initialize() {
Line 89: Line 112:
   google.visualization.events.addListener(chart[0], 'select', function() { handleSelect(0); } );
   google.visualization.events.addListener(chart[0], 'select', function() { handleSelect(0); } );
   google.visualization.events.addListener(chart[1], 'select', function() { handleSelect(1); } );
   google.visualization.events.addListener(chart[1], 'select', function() { handleSelect(1); } );
 +
 +
  dojochart[0] = new dojox.charting.Chart2D("dojochart1");
 +
  dojochart[0].addPlot("default", {type: "Lines"});
 +
  dojochart[0].addAxis("x");
 +
  dojochart[0].addAxis("y", {vertical: true});
 +
  dojolegend[0] = new dojox.charting.widget.Legend({chart: dojochart[0]}, "dojolegend1");
 +
  dojochart[1] = new dojox.charting.Chart2D("dojochart2");
 +
  dojochart[1].addPlot("default", {type: "Lines"});
 +
  dojochart[1].addAxis("x");
 +
  dojochart[1].addAxis("y", {vertical: true});
 +
  dojolegend[1] = new dojox.charting.widget.Legend({chart: dojochart[1]}, "dojolegend2");
   // Query spreadsheet and let result be drawn
   // Query spreadsheet and let result be drawn
Line 108: Line 142:
   chart[0].draw(view[0], {width: 400, height: 240, lineSize: 1});
   chart[0].draw(view[0], {width: 400, height: 240, lineSize: 1});
   chart[1].draw(view[1], {width: 400, height: 240, lineSize: 1});
   chart[1].draw(view[1], {width: 400, height: 240, lineSize: 1});
 +
 +
  makeCharts(); // Dojo call
}
}
Line 131: Line 167:
}
}
 +
<!-- Dojo part -->
 +
 +
function seriesFromDataTable(view) {
 +
  var seriesArray = [];
 +
  for(var c=1; c<view.getNumberOfColumns(); c++) {
 +
    var series = [];
 +
    for(var r=0; r<view.getNumberOfRows(); r++) {
 +
      series.push({x: view.getValue(r,0), y: view.getValue(r,c)});
 +
    }
 +
    seriesArray.push({title: view.getColumnLabel(c), data: series});
 +
  }
 +
  return seriesArray;
 +
}
 +
 +
dojo.require("dojox.charting.Chart2D");
 +
dojo.require("dojox.charting.widget.Legend");
 +
makeCharts = function(){
 +
  for(var s=0; s<view.length; s++) {
 +
    var series = seriesFromDataTable(view[s]);
 +
    for(var i=0; i<series.length; i++) {
 +
      dojochart[s].addSeries(series[i].title, series[i].data);
 +
    }
 +
    dojochart[s].render();
 +
    dojolegend[s].refresh();
 +
  }
 +
};
 +
dojo.addOnLoad(onLoadCallback);
</script>
</script>
</html>
</html>

Revision as of 19:13, 1 May 2009

[http://2009.igem.org/Team:Groningen http://2009.igem.org/wiki/images/f/f1/Igemhomelogo.png]


Software tools from previous years

Other potentially interesting software tools:

Interactive Graphs?

It might be interesting to use JavaScript to present simulation results. This would allow for some degree of interaction (like resizing graphs, linked views, etc.) and may even make it somewhat easier to use graphs, we'd simply have some on-line repository of simulation results (a spreadsheet for example) and we could select which graphs to use on the Wiki.

Below an example of a JavaScript generated graph is shown, based on [http://spreadsheets.google.com/pub?key=rRnyFyi-bgqsjT3SdJBdKKw this spreadsheet]. Note that the two views of the data are linked (although at this time both the kind of graph and the link is not optimal) and that it would be possible to create templates for creating these linked graphs. The current demo is based on Google technology, but it looks like [http://www.dojotoolkit.org/ the Dojo Toolkit] has more advanced charting capabilities at this moment (although I don't know how well they're supported in different browsers).

Questions that would have to be resolved include:

  • How can we make this easy to use?
  • What kinds of plots do we need?
  • How flexible do we need it to be? (Layout-wise.)
  • Can we make it that flexible? (And still easy to use.)
  • Do we want to keep referring to parts of a spreadsheet or do we want to be able to select parts by the parameters used?
  • Can we create a relatively easy way to let the viewer select different data for exploratory purposes? We will likely run more simulations than you would normally graph.
  •  ???

Taking this idea (much) further it would even be possible to run simulations using JavaScript (and charting the results), based on SBML models. However, this would involve much, much more effort than just showing a few interactive plots.

Modelling a Genetic Circuit - TODO

To model a genetic circuit the following must be done (TODO: more detail):

  • Determine which genes are involved and how they are regulated???
  • Model gene transcription? (How?)
  • Model gene translation? (How?)
  • Model interaction of relevant substances. This requires reaction formulas for all the substances with (known) reaction rates, as well as information on how the substance diffuses (unless it is assumed the model is "well-mixed").

This can be done using one of the following methods:

Questions:

  • What exactly is the role of a kinetic law in modelling a reaction?

Literature

See our literature list for a full overview of all literature. For our team members that are looking for books on the subject, have a look under code [http://opc.ub.rug.nl/DB=1/SET=2/TTL=1/CLK?IKT=8110&TRM=605B 605B] (Bernoulliborg library, lower floor), as well as 605C/D/E (A and Z also exist but seem to be less interesting) and 610A (and possibly 625, 715).