Team:Alberta/Project/Modeling/FindEssentials

From 2009.igem.org

(Difference between revisions)
Line 1: Line 1:
-
  %start.m script
+
  %Any single gene knockout resulting in less than CutOffCoeff*InitialGrowthRate
-
  changeCobraSolver('glpk')
+
  %will be put into a list
-
  model = readCbModel() %('Ec_iAF1260_flux1.xml')
+
function [Essentials,grRatio,grRateKO,grRateWT,hasEffect,fluxSolution] = FindEssentials(Model,CutOffCoeff)
-
  solution1 = optimizeCbModel(model, 'max', 'false', 'false');
+
  Essentials=cell(1);
-
  essgenes=cell(1)
+
b=1;
-
  fValue = solution1.f
+
  solution1 = optimizeCbModel(Model, 'max', 'false', 'false');
-
  startSays = 'Copy & paste your literature/suspected gene list into essgenes!'
+
  InitialGrowthRate = solution1.f; %For clarity
 +
g=CutOffCoeff*InitialGrowthRate;
 +
[grRatio,grRateKO,grRateWT,hasEffect,fluxSolution]=singleGeneDeletion(Model);
 +
   
 +
%This part uses the results of singleGeneDeletion to make a list
 +
%containing all of the genes whose deletion caused a growth rate less than
 +
%g
 +
 +
for a=(1:length(grRateKO))
 +
    if grRateKO(a)<g
 +
        Essentials(b) = Model.genes(a);
 +
        b=b+1;
 +
    end
 +
  end
 +
 +
NumberOfEssentialGenes = length(Essentials)
 +
Essentials = Essentials';

Revision as of 06:31, 2 October 2009

%Any single gene knockout resulting in less than CutOffCoeff*InitialGrowthRate
%will be put into a list
function [Essentials,grRatio,grRateKO,grRateWT,hasEffect,fluxSolution] = FindEssentials(Model,CutOffCoeff)
Essentials=cell(1);
b=1;
solution1 = optimizeCbModel(Model, 'max', 'false', 'false');
InitialGrowthRate = solution1.f; %For clarity
g=CutOffCoeff*InitialGrowthRate;
[grRatio,grRateKO,grRateWT,hasEffect,fluxSolution]=singleGeneDeletion(Model);

%This part uses the results of singleGeneDeletion to make a list
%containing all of the genes whose deletion caused a growth rate less than
%g

for a=(1:length(grRateKO))
    if grRateKO(a)<g
        Essentials(b) = Model.genes(a);
        b=b+1;
    end
end

NumberOfEssentialGenes = length(Essentials)
Essentials = Essentials';