GFtbox: Difference between revisions

From BanghamLab
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
{| border="0" cellpadding="15" cellspacing="3"
{| border="0" cellpadding="15" cellspacing="3"
|[[Image:GPT_why_matlab-2011-05-05-000000-0003.png|288px|left|The Labguide logo]]
|[[Image:GPT_why_matlab-2011-05-05-000000-0003.png|288px|left|The Labguide logo]]
||<wikiflv width="352" height="288" loop="true" background="white">WhymatlabC_0.flv|GPT_why_matlab-2011-05-05-000000-0003.png‎</wikiflv>
||<wikiflv width="352" height="288" loop="true" background="white">WhymatlabC_0.flv|GPT_why_matlab-2011-05-05-000001-0001.png‎</wikiflv>
|-
|-align="top"
|Mesh, blue is factor A, Green factor B||Play then red is growth rate  
|<center>Fig. 1. Mesh with two patterns of growth factors.  Blue is factor A, Green factor B</center>||<center>Play and the mesh will grow and subdivide. Normally we do not want to see the mesh. Red is growth rate</center>
|}
|}
'''Why Matlab?'''' The syntax suites our purpose. We represent tissue by a thin 3D mesh. variables such as ''A'' or ''B'' can represent matrices (Matlab - ''Mat''rix ''Lab''). This means that we can represent the concept of factor ''A'' inhibited by an amount ''K'' by factor ''B'' where ''B'' might be active in the tissue (we call it a canvas). The expression is: ''A .* inh(K, B)'', what could be simpler? It means that programming a growth model closely follows thoughts about the underlying biology. However, we also find it essential to be able to see spatial patterns of growth factors and to see growth as a dynamic process. We do, therefore, use an extensive graphical user interface to monitor and control the model.
'''Why Matlab?'''' The syntax suites our purpose - the argument goes like this. Tissue is represented by a thin 3D mesh. Growth factors levels vary spatially forming patterns, e.g. Fig. 1. Here there are two, ''A'' and ''B''. We might make the hypothesis that the growth rate is specified by ''A'' but inhibited by ''B''. This simple idea can be expressed in Matlab simply by ''Growth=A .* inh(K, B)'' because variables ''A'' and ''B'' can represent vectors - in this case a level for each node in the mesh - and we can also define a general inhibition function (''inh'').  It means that it is straightforward to convert our thoughts on the biology into a programmatic description of the computational model. In addition, Matlab has an extensive library of portable GUI functions - and this is convenient for producing tools to visualise the mesh and patterns of growth factors.  
 
 
Matlab runs on Windows, Mac and Linux. It is freely available and well supported - but not free of cost. Programmers have to earn a living. We prefer our paid experts to focus on our speciality and let Mathworks maintain compatibility with new processors, OpenGL interfaces, multi-threading, algebraic algorithms (appropriate LAPACK and machine-specific BLAS libraries), user interfaces and handle multi-platform problems. The key numerical algorithms are documented and generally visible and there is a large user-base providing lots of web based help. The computational bottleneck in ''GFtbox'' is solving the equations: we find that the Matlab cgs function is quicker and more accurate than alternatives from other sources (lsqr, culaSgesv). The speed is likely to be limited by memory-cpu bandwidth.


Matlab is is a weakly typed language and that too is an advantage whilst we develop the necessary concepts for ''GFtbox''. (Whilst it is possible to create a dedicated class library, we defer that until we are clearer about what functionality will be needed to model most biology.) In addition, Matlab is sufficiently flexible that inexperienced programmers, half our team are biologists, can pick it up on-the-fly. It behaves as an interpreted language, which makes it easy to break and step through code to follow what is happening.


Matlab is is a weakly typed language and that too is an advantage whilst we develop the necessary concepts for ''GFtbox''. (Whilst it is possible to create a dedicated class library, we defer that until we are clearer about what functionality will be needed to model most biology.) In addition, Matlab is sufficiently flexible that inexperienced programmers, half our team are biologists, can pick it up on-the-fly. It behaves as an interpreted language, which makes it easy to break and step through code to follow what is happening.  
Matlab runs on Windows, Mac and Linux. It is freely available and well supported - but not free of cost. Programmers have to earn a living. We prefer our paid experts to focus on our speciality and let Mathworks maintain compatibility with new processors, OpenGL interfaces, multi-threading, algebraic algorithms (appropriate LAPACK and machine-specific BLAS libraries), user interfaces and handle multi-platform problems. The key numerical algorithms are documented and generally visible and there is a large user-base providing lots of web based help. The computational bottleneck in ''GFtbox'' is solving the equations: we find that the Matlab [http://www.mathworks.com/help/techdoc/ref/cgs.html cgs] function is quicker and more accurate than alternatives from other sources ([http://software.intel.com/en-us/articles/intel-mkl/ lsqr], [http://www.culatools.com/forums/viewtopic.php?f=14&t=721 culaSgesvd]). The speed of ''GFtbox'' appears to be limited by memory-cpu bandwidth rather than cpu speed. It runs best on a 64 bit machine, lots of memory and a silicon hard-drive.


==How to start using ''GFtbox''==
==How to start using ''GFtbox''==

Revision as of 11:34, 5 May 2011

Why write GFtbox?

GPT-logo-460.png

To understand how patterns of gene activity in biological organs influence the developing shape. A key notion is that genes may regulate growth direction independently of growth rate. We formalised our ideas in the Growing Polarised Tissue Framework (GPT-framework, ref).

Intuition is not, however, a good guide to how patterns of growth interact with each other and a continuous sheet of material to produce complex shapes. It is therefore necessary to translate intuition into a mathematical form (as a computable model) and compute the results. Rather than writing specific, custom software for each model we chose to produce a general purpose package: GFtbox within which individual computable models can be created.

This allowed us to test the veracity of the computational kernal using simple examples (Supplemental Text 1 in ref) before building a library of examples illustrating the properties of the GPT-framework (Results in ref) and embarking on modelling biological tissues (ref Green). Using GFtbox one can start with a simple sheet of tissue (the canvas), lay out experimentally observed, or hypothesised, patterns of regulator activity and then grow the canvas in 3D. Patterning can continue during growth and the final shape can be compared quantitatively with it's biological counterpart - so testing the hypotheses (ref Cui).

What does GFtbox require?

GFtbox is written in Matlab. GFtbox does not require any extra Mathworks toolboxes. Matlab is available as a 30 day free trial and there is a student edition.

The Labguide logo
<wikiflv width="352" height="288" loop="true" background="white">WhymatlabC_0.flv|GPT_why_matlab-2011-05-05-000001-0001.png‎</wikiflv>
Fig. 1. Mesh with two patterns of growth factors. Blue is factor A, Green factor B
Play and the mesh will grow and subdivide. Normally we do not want to see the mesh. Red is growth rate

Why Matlab?' The syntax suites our purpose - the argument goes like this. Tissue is represented by a thin 3D mesh. Growth factors levels vary spatially forming patterns, e.g. Fig. 1. Here there are two, A and B. We might make the hypothesis that the growth rate is specified by A but inhibited by B. This simple idea can be expressed in Matlab simply by Growth=A .* inh(K, B) because variables A and B can represent vectors - in this case a level for each node in the mesh - and we can also define a general inhibition function (inh). It means that it is straightforward to convert our thoughts on the biology into a programmatic description of the computational model. In addition, Matlab has an extensive library of portable GUI functions - and this is convenient for producing tools to visualise the mesh and patterns of growth factors.

Matlab is is a weakly typed language and that too is an advantage whilst we develop the necessary concepts for GFtbox. (Whilst it is possible to create a dedicated class library, we defer that until we are clearer about what functionality will be needed to model most biology.) In addition, Matlab is sufficiently flexible that inexperienced programmers, half our team are biologists, can pick it up on-the-fly. It behaves as an interpreted language, which makes it easy to break and step through code to follow what is happening.

Matlab runs on Windows, Mac and Linux. It is freely available and well supported - but not free of cost. Programmers have to earn a living. We prefer our paid experts to focus on our speciality and let Mathworks maintain compatibility with new processors, OpenGL interfaces, multi-threading, algebraic algorithms (appropriate LAPACK and machine-specific BLAS libraries), user interfaces and handle multi-platform problems. The key numerical algorithms are documented and generally visible and there is a large user-base providing lots of web based help. The computational bottleneck in GFtbox is solving the equations: we find that the Matlab cgs function is quicker and more accurate than alternatives from other sources (lsqr, culaSgesvd). The speed of GFtbox appears to be limited by memory-cpu bandwidth rather than cpu speed. It runs best on a 64 bit machine, lots of memory and a silicon hard-drive.

How to start using GFtbox

Limitations of GFtbox


The following is parked here - just to remind me how it is done

[GFtbox]

<sgallery width="200" height="200" showarrows="true" showcarousel="true" showinfopane="true" timed="true" delay="6000"> Cycdich.jpg|This is the description for picture1 Arabidopsis_Leaf_ATH8bbg.png|This is the description for picture1 Grandison-Simulation.png|This is the description for picture1 PaulProjectPic.png|This is the description for picture1 Pierre_project_image.jpg|This is the description for picture1 </sgallery>