Size: 5108
Comment: Added matrix instructions
|
Size: 5911
Comment: Mathematical representation added
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
== Useful tools == | == Useful Tools == |
Line 23: | Line 23: |
== 1. Functions, parameters and variables == | == 1. Functions, Parameters and Variables == |
Line 48: | Line 48: |
== 2. Calculating time courses == | == 2. Calculating Time Courses == |
Line 56: | Line 56: |
== Matrices and Vectors == | == 3. Matrices and Vectors == |
Line 58: | Line 58: |
1. [[/matrices.pdf|Here]] are the slides. | 1. [[attachment:matrices.pdf|Here]] are the slides. |
Line 63: | Line 63: |
Enter the solution vector, y, as a column vector (3 x 1) Select a block of empty cells of the same size as A |
Enter the solution vector, y, as a column vector (3 x 1). Select a block of empty cells of the same size as A for the output. |
Line 67: | Line 67: |
EXCEL users only: with the solution array still selected, press F2 and then CTRL+SHIFT+Enter to create an array formula. | EXCEL users only: with the outputn array still selected, press F2 and then CTRL+SHIFT+Enter to create an array formula. |
Line 69: | Line 69: |
Now select a set of empty cells as a vector the size of y. | Now select a set of empty cells as a vector the size of y for the answer vector. |
Line 72: | Line 72: |
EXCEL users only: with the solution vector still selected, press F2 and then CTRL+SHIFT+Enter to create an array formula. | EXCEL users only: with the answer vector still selected, press F2 and then CTRL+SHIFT+Enter to create an array formula. |
Line 76: | Line 76: |
a. For Matlab and Octave: {{{ Enter the coefficient array as: A = [a11 a12 a13; a21 a22 a23; a31 a32 a33], replacing a11 with the appropriate numerical value. Enter the solution vector y as: y = [y1; y2; y3], again with numeric values. The inverse of A is calculated as A1 = inv(A) The answer is obtained with x = A1*y }}} 1. In fact, solving a linear equation set such as this is generally best done by Gauss-Jordan elimination (with pivoting) to minimise numerical errors. Matlab/Oxtvae users can ask for the solution to be obtained this way by typing: {{{ x = A\y }}} == 4. Mathematical Representation of Cellular Systems == [[attachment:metamodels14.pdf|Here]] are the slides for this session. No exercises yet! |
Mathematical Biochemistry in a Nutshell
David Fell
Innsbruck 2 March 2014
This precourse is designed for those less familiar with the mathematical aspects of modelling and systems biology. The aim is not to improve anyone's competence in mathematics, but to provide a basic introduction to some of the main mathematical concepts and computational techniques used to represent and model biological systems. The selection of topics is designed to underpin the main course and consists of:
- Functions, parameters and variables
- Calculating time courses from ordinary differential equations
- Matrices and vectors
- Mathematical representation of cellular systems
- Sensitivity analysis - illustrated with metabolic control analysis
Useful Tools
For the exercises, it will be useful to have the following available:
- A plotting program, such as
Gnuplot, described at http://www.gnuplot.info/. Versions are available for for Linux (from your repository), Windows and Mac.
- Matlab (or Octave, but Octave uses Gnuplot).
- A spreadsheet program such as
- Excel, with the solver add-in activated.
LibreOffice Calc. (There is an nlp-solver add-in, but I can't get it to activate.)
1. Functions, Parameters and Variables
The slides are available to download. Only the problem answers are missing!
Download enzymes.zip and unzip it in a folder/directory. For the gnuplot examples to work, this directory will have to be gnuplot's working directory. Contents are:
MMplot.xls/.ods are examples of function plotting with a spreadsheet, as needed for the exercise on slide 6. Much easier and far superior is gnuplot. Open gnuplot and type:
gnuplot> mm(s) = s*V/(Km + s) gnuplot> V = 100 gnuplot> Km = 2 gnuplot> set xlabel '[S]' gnuplot> set ylabel 'rate' gnuplot> plot [s=0:5*Km] mm(s) gnuplot> Km = 4 gnuplot> replot gnuplot>
twoenz.gnu generates the two enzyme steady state graph shown in the slides. To plot the graph, open gnuplot and type
gnuplot> load 'twoenz.gnu'
viewlogcont.gnu and viewcontmap.gnu plot the sum of squared residuals against Km and V as in the lecture slide. The mouse will rotate the 3-D plot.
enzfitter.gnu determines Km and V for the data in enz1.dat. Open enzfitter.gnu with a text editor to see the commands you will need to modify to fit the data in enz2.dat as specified on slide 22.
EnzFitter.xls is an Excel spreadsheet that fits Km and V. It contains the same data as enz1.dat; the initial estimates are in cells B3 and D3. Go to cell G14 and then select the 'solver' menu item to minimise this cell by altering cells B3 and D3. (This sheet does not work in other spreadsheet software as they don't have the solver add-in.)
If you've got time on your hands, follow the gnuplot exercise 2 at http://mudshark.brookes.ac.uk/Meetings/Delhi2013/Practicals/Practical_1.
2. Calculating Time Courses
Open the spreadsheet file euler.ods or euler.xls (with Excel). Check that you understand how the column of substrate concentration values is calculated.
Using the tabs to select the sheets for t=0.01 and t=1.0, look at how the solutions change with increase of the Km or decrease of the V.
- Can you add a column that computes the product concentration at each time point?
3. Matrices and Vectors
Here are the slides.
To solve the matrix formula A.x = y for x, follow the appropriate instructions below:
- For Calc and Excel:
Open a spreadsheet and enter the coefficient array, A, in a square block of cells (3 x 3 for the question on the slides). Enter the solution vector, y, as a column vector (3 x 1). Select a block of empty cells of the same size as A for the output. Select the 'Insert function' menu item and choose MINVERSE from the Array functions. Select the array A as the argument of the function and press OK. EXCEL users only: with the outputn array still selected, press F2 and then CTRL+SHIFT+Enter to create an array formula. In either case you now have the matrix inverse of A. Now select a set of empty cells as a vector the size of y for the answer vector. Select the 'Insert function' menu item and choose MMULT from the Array functions. For the first function argument select the inverse, and for the second the vector y and press OK. EXCEL users only: with the answer vector still selected, press F2 and then CTRL+SHIFT+Enter to create an array formula. The answer is the x vector. Of course, the two steps above could be combined into one function without explicitly creating the inverse on the spreadsheet. Try it.
- For Matlab and Octave:
Enter the coefficient array as: A = [a11 a12 a13; a21 a22 a23; a31 a32 a33], replacing a11 with the appropriate numerical value. Enter the solution vector y as: y = [y1; y2; y3], again with numeric values. The inverse of A is calculated as A1 = inv(A) The answer is obtained with x = A1*y
- For Calc and Excel:
- In fact, solving a linear equation set such as this is generally best done by Gauss-Jordan elimination (with pivoting) to minimise numerical errors. Matlab/Oxtvae users can ask for the solution to be obtained this way by typing:
x = A\y
4. Mathematical Representation of Cellular Systems
Here are the slides for this session.
- No exercises yet!