Team:Paris/Modeling/Implementation

From 2008.igem.org

(Difference between revisions)
(Parameters Finder for our Example)
(Parameters Finder for our Example)
Line 25: Line 25:
<html><pre class="codeinput">
<html><pre class="codeinput">
<span class="keyword">function</span> optimal_parameters = find_FP(X_data, Y_data, initial_parameters)
<span class="keyword">function</span> optimal_parameters = find_FP(X_data, Y_data, initial_parameters)
-
<span class="comment">% gives the 'best parameters' involved in f4, f5, f6, f7 or f8  
+
<span class="comment">% gives the 'best parameters' involved in f4, f5, f6, f7 or f8
</span><span class="comment">% with FlhDC = 0 or FliA = 0 by least-square optimisation
</span><span class="comment">% with FlhDC = 0 or FliA = 0 by least-square optimisation
-
</span>
+
</span>  
<span class="comment">% X_data = vector of given values of [FliA]i or [FlhDC]i (experimentally
<span class="comment">% X_data = vector of given values of [FliA]i or [FlhDC]i (experimentally
</span><span class="comment">% controled)
</span><span class="comment">% controled)
Line 35: Line 35:
</span><span class="comment">%                      or simply guessed
</span><span class="comment">%                      or simply guessed
</span><span class="comment">%                    = [beta, K -> (K)/(coef), n]
</span><span class="comment">%                    = [beta, K -> (K)/(coef), n]
-
</span>
+
</span>  
-
 
+
     <span class="keyword">function</span> output = expr_pProm(parameters, X_data)
     <span class="keyword">function</span> output = expr_pProm(parameters, X_data)
         <span class="keyword">for</span> k = 1:length(X_data)
         <span class="keyword">for</span> k = 1:length(X_data)
                 output(k) = parameters(1)*hill(X_data(k), parameters(2), parameters(3));
                 output(k) = parameters(1)*hill(X_data(k), parameters(2), parameters(3));
-
         end
+
         <span class="keyword">end</span>
-
     end
+
     <span class="keyword">end</span>
-
 
+
options = optimset(<span class="string">'LevenbergMarquardt'</span>,<span class="string">'on'</span>,<span class="string">'TolX'</span>,1e-10,...
options = optimset(<span class="string">'LevenbergMarquardt'</span>,<span class="string">'on'</span>,<span class="string">'TolX'</span>,1e-10,...
                     <span class="string">'MaxFunEvals'</span>,1e10,<span class="string">'TolFun'</span>,1e-10,<span class="string">'MaxIter'</span>,1e4);
                     <span class="string">'MaxFunEvals'</span>,1e10,<span class="string">'TolFun'</span>,1e-10,<span class="string">'MaxIter'</span>,1e4);
<span class="comment">% options for the function lsqcurvefit
<span class="comment">% options for the function lsqcurvefit
-
</span>
+
</span>  
optimal_parameters = lsqcurvefit( @(parameters, X_data) expr_pProm(parameters, X_data),...
optimal_parameters = lsqcurvefit( @(parameters, X_data) expr_pProm(parameters, X_data),...
     initial_parameters, X_data, Y_data, 1/10*initial_parameters, 10*initial_parameters, options );
     initial_parameters, X_data, Y_data, 1/10*initial_parameters, 10*initial_parameters, options );
<span class="comment">% search for the fittest parameters, between 1/10 and 10 times the initial
<span class="comment">% search for the fittest parameters, between 1/10 and 10 times the initial
</span><span class="comment">% parameters
</span><span class="comment">% parameters
-
</span>
+
</span>  
<span class="keyword">end</span>
<span class="keyword">end</span>
</pre></html>
</pre></html>

Revision as of 10:02, 28 October 2008

Implementation


[Back to "Workflow on an Example"]

We use Matlab for all implementations.

Parameters Finder Programs

the datas

The experimental datas consist typically in two tables, X_data (various concentrations of the transcription factor) and Y_data (corresponding output values).

  • controlling X_data : thanks to the prior characterization of the inductible promoters that control the transcription factor concentrations, we can deduce from the Inv_f1.m and Inv_f2.m functions the necessary concentrations of aTc and arabinose to introduce in the medium to get the wanted concentrations of transcription factor.
  • getting Y_data : the linear conversion between the fluorescence of GFP at maturation and its concentration gives us directly the expected datas.

Parameters Finder for our Example

We just write here the annoted program find_FP that is used to estimate, for instance, the parameters in :

  • ƒ5( [FlhDC], 0 ) = β24 * ƒhill( [FlhDC], K2, n2 ) and
  • ƒ5( 0, [FliA] ) = β25 * ƒhill( [FliA], K8, n8 )

function optimal_parameters = find_FP(X_data, Y_data, initial_parameters)
% gives the 'best parameters' involved in f4, f5, f6, f7 or f8  
% with FlhDC = 0 or FliA = 0 by least-square optimisation
 
% X_data = vector of given values of [FliA]i or [FlhDC]i (experimentally
% controled)
% Y_data = vector of experimentally measured values f4, f5, f6, f7 or f8
% corresponding of the X_data
% initial_parameters = values of the parameters proposed by the literature
%                       or simply guessed
%                    = [beta, K -> (K)/(coef), n]
 
 
     function output = expr_pProm(parameters, X_data)
         for k = 1:length(X_data)
                 output(k) = parameters(1)*hill(X_data(k), parameters(2), parameters(3));
         end
     end
 
options = optimset('LevenbergMarquardt','on','TolX',1e-10,...
                     'MaxFunEvals',1e10,'TolFun',1e-10,'MaxIter',1e4);
% options for the function lsqcurvefit
 
optimal_parameters = lsqcurvefit( @(parameters, X_data) expr_pProm(parameters, X_data),...
     initial_parameters, X_data, Y_data, 1/10*initial_parameters, 10*initial_parameters, options );
% search for the fittest parameters, between 1/10 and 10 times the initial
% parameters
 
end