assignSubSystems

PURPOSE ^

assignSubSystems Assign each reaction a subsystem in the model structure

SYNOPSIS ^

function model = assignSubSystems(model,gpraFile)

DESCRIPTION ^

assignSubSystems Assign each reaction a subsystem in the model structure

 model = assignSubSystems(model,gpraFile)

INPUTS
 model         COBRA model structure
 gpraFile      SimPheny GPRA file

OUTPUT
 model         COBRA model structure with subsystem assignment

 Markus Herrgard

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function model = assignSubSystems(model,gpraFile)
0002 %assignSubSystems Assign each reaction a subsystem in the model structure
0003 %
0004 % model = assignSubSystems(model,gpraFile)
0005 %
0006 %INPUTS
0007 % model         COBRA model structure
0008 % gpraFile      SimPheny GPRA file
0009 %
0010 %OUTPUT
0011 % model         COBRA model structure with subsystem assignment
0012 %
0013 % Markus Herrgard
0014 
0015 gpraModel = parseSimPhenyGPRA(gpraFile);
0016 
0017 [isInList,rxnInd] = ismember(model.rxns,gpraModel.rxns);
0018 
0019 for i = 1:length(model.rxns)
0020     if (isInList(i))
0021         model.subSystems{i} = gpraModel.subSystems{rxnInd(i)};
0022     else
0023         model.subSystems{i} = 'Exchange';
0024     end
0025 end
0026 
0027 model.subSystems = model.subSystems';

Generated on Thu 21-Jun-2012 15:39:23 by m2html © 2003