0001
0002
0003 function tests = modelCurationTests
0004 tests = functiontests(localfunctions);
0005 end
0006
0007 function addExchangeRxnsTest(testCase)
0008 sourceDir = fileparts(which(mfilename));
0009 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0010
0011 modelNew=addExchangeRxns(model,'both','6pgl_c');
0012
0013
0014 modelManual=model;
0015 modelManual.rxns(end+1)={'EXC_BOTH_6pgl_c'};
0016 modelManual.lb(end+1)=-1000;
0017 modelManual.ub(end+1)=1000;
0018 modelManual.c(end+1)=0;
0019 modelManual.rev(end+1)=1;
0020 modelManual.rxnNames(end+1)={'6-phospho-D-glucono-1,5-lactone exchange (BOTH)'};
0021 modelManual.grRules(end+1)={''};
0022 modelManual.eccodes(end+1)={''};
0023 modelManual.rxnGeneMat(end+1,:)=sparse(zeros(1,numel(modelManual.genes)));
0024 modelManual.S(:,end+1)=sparse(zeros(numel(modelManual.mets),1));
0025 modelManual.S(5,end)=-1;
0026
0027 verifyEqual(testCase,modelNew,modelManual)
0028 end
0029
0030 function addTransportTest(testCase)
0031 sourceDir = fileparts(which(mfilename));
0032 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0033
0034 evalc('modelNew=addTransport(model,''c'',''e'',{''6-phospho-D-glucono-1,5-lactone''},false,false,''test_'');');
0035
0036
0037 modelManual=model;
0038 modelManual.rxns(end+1)={'test_0001'};
0039 modelManual.lb(end+1)=0;
0040 modelManual.ub(end+1)=Inf;
0041 modelManual.c(end+1)=0;
0042 modelManual.rev(end+1)=0;
0043 modelManual.rxnNames(end+1)={'6-phospho-D-glucono-1,5-lactone transport, Cytoplasm-Extraorganism'};
0044 modelManual.grRules(end+1)={''};
0045 modelManual.eccodes(end+1)={''};
0046 modelManual.rxnGeneMat(end+1,:)=sparse(zeros(1,numel(modelManual.genes)));
0047
0048 modelManual.S(:,end+1)=sparse(zeros(numel(modelManual.mets),1));
0049 modelManual.S(end+1,:)=sparse(zeros(1,numel(modelManual.rxns)));
0050 modelManual.S([5,73],end)=[-1,1];
0051
0052 modelManual.mets(end+1)={'m_0001'};
0053 modelManual.metNames(end+1)={'6-phospho-D-glucono-1,5-lactone'};
0054 modelManual.metMiriams(end+1)=modelManual.metMiriams(5);
0055 modelManual.b(end+1)=[0];
0056 modelManual.metFormulas(end+1)={'C6H9O9P'};
0057 modelManual.metComps(end+1)=[2];
0058
0059 verifyEqual(testCase,modelNew,modelManual)
0060 end
0061
0062 function addGenesRavenTest(testCase)
0063 sourceDir = fileparts(which(mfilename));
0064 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0065
0066 genesToAdd.genes={'testgene1','testgene2'};
0067 genesToAdd.geneShortNames={'short1','short2'};
0068 genesToAdd.geneMiriams{1}=struct('name',{{'testDB1';'testDB2'}},'value',...
0069 {{'testValue1';'testValue2'}});
0070 genesToAdd.geneMiriams{2}=struct('name',{{'testDB2';'testDB1'}},'value',...
0071 {{'testValue2';'testValue1'}});
0072
0073 modelNew=addGenesRaven(model,genesToAdd);
0074
0075
0076 modelManual=model;
0077 modelManual.geneMiriams(1:numel(modelManual.genes),1)={[]};
0078 modelManual.genes(end+1:end+2)=genesToAdd.genes;
0079 modelManual.geneShortNames(end+1:end+2)=genesToAdd.geneShortNames;
0080 modelManual.rxnGeneMat(:,end+1:end+2)=sparse(zeros(numel(modelManual.rxns),2));
0081 modelManual.geneMiriams(end+1:end+2)=genesToAdd.geneMiriams;
0082 verifyEqual(testCase,modelNew,modelManual)
0083 end
0084
0085 function removeGenesTest(testCase)
0086 sourceDir = fileparts(which(mfilename));
0087 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0088
0089 modelNew=removeGenes(model,'b1817',true,true,false);
0090
0091
0092 modelManual=model;
0093 modelManual.genes(54)=[];
0094 modelManual.geneShortNames(54)=[];
0095 modelManual.rxnGeneMat(:,54)=[];
0096 modelManual.rxnGeneMat(45,:)=[];
0097 modelManual.grRules(50)={'(b2415 and b1621 and b2417 and b2416) or (b2415 and b2417 and b2416 and b1101)'};
0098 modelManual.grRules(45)=[];
0099 modelManual.rxns(45)=[];
0100 modelManual.rxnNames(45)=[];
0101 modelManual.lb(45)=[];
0102 modelManual.ub(45)=[];
0103 modelManual.c(45)=[];
0104 modelManual.rev(45)=[];
0105 modelManual.S(:,45)=[];
0106 modelManual.eccodes(45)=[];
0107 verifyEqual(testCase,modelNew,modelManual)
0108 end
0109
0110 function addMetsTest(testCase)
0111 sourceDir = fileparts(which(mfilename));
0112 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0113
0114 metsToAdd.metNames={'metaboliteName','3-Phospho-D-glycerate'};
0115 metsToAdd.compartments={'c','e'};
0116 metsToAdd.metCharges=[2,0];
0117 metsToAdd.metNotes={'this is just a test','another one'};
0118 metsToAdd.metMiriams{1}=struct('name',{{'testDB1';'testDB2'}},'value',...
0119 {{'testValue1';'testValue2'}});
0120 metsToAdd.metMiriams{2}=struct('name',{{'testDB1'}},'value',...
0121 {{'testValue1'}});
0122
0123 evalc('modelNew=addMets(model,metsToAdd,true);');
0124
0125
0126 modelManual=model;
0127 modelManual.metNotes(1:numel(modelManual.mets),1)={''};
0128 modelManual.metCharges(1:numel(modelManual.mets),1)=NaN(numel(modelManual.mets),1);
0129 modelManual.mets(end+1:end+2)={'m_0001','m_0002'};
0130 modelManual.metNames(end+1:end+2)=metsToAdd.metNames;
0131 modelManual.metNotes(end+1:end+2)=metsToAdd.metNotes;
0132 modelManual.metMiriams(end+1:end+2)=metsToAdd.metMiriams;
0133 modelManual.metCharges(end+1:end+2)=[2,NaN];
0134 modelManual.b(end+1:end+2)=[0,0];
0135 modelManual.metFormulas(end+1:end+2)={'','C3H4O7P'};
0136 modelManual.metComps(end+1:end+2)=[1,2];
0137 modelManual.S(end+1:end+2,:)=sparse(zeros(2,numel(modelManual.rxns)));
0138
0139 verifyEqual(testCase,modelManual,modelNew)
0140 end
0141
0142 function addMets_oneCompTest(testCase)
0143 sourceDir = fileparts(which(mfilename));
0144 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0145
0146 metsToAdd.metNames={'metaboliteName','3-Phospho-D-glycerate'};
0147 metsToAdd.compartments={'e'};
0148 metsToAdd.metCharges=[2,0];
0149 metsToAdd.metNotes={'this is just a test','another one'};
0150 metsToAdd.metMiriams{1}=struct('name',{{'testDB1';'testDB2'}},'value',...
0151 {{'testValue1';'testValue2'}});
0152 metsToAdd.metMiriams{2}=struct('name',{{'testDB1'}},'value',...
0153 {{'testValue1'}});
0154
0155 evalc('modelNew=addMets(model,metsToAdd,true);');
0156
0157
0158 modelManual=model;
0159 modelManual.metNotes(1:numel(modelManual.mets),1)={''};
0160 modelManual.metCharges(1:numel(modelManual.mets),1)=NaN(numel(modelManual.mets),1);
0161 modelManual.mets(end+1:end+2)={'m_0001','m_0002'};
0162 modelManual.metNames(end+1:end+2)=metsToAdd.metNames;
0163 modelManual.metNotes(end+1:end+2)=metsToAdd.metNotes;
0164 modelManual.metMiriams(end+1:end+2)=metsToAdd.metMiriams;
0165 modelManual.metCharges(end+1:end+2)=[2,NaN];
0166 modelManual.b(end+1:end+2)=[0,0];
0167 modelManual.metFormulas(end+1:end+2)={'','C3H4O7P'};
0168 modelManual.metComps(end+1:end+2)=2;
0169 modelManual.S(end+1:end+2,:)=sparse(zeros(2,numel(modelManual.rxns)));
0170
0171 verifyEqual(testCase,modelManual,modelNew)
0172 end
0173
0174 function removeMetsTest(testCase)
0175 sourceDir = fileparts(which(mfilename));
0176 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0177
0178 modelNew=removeMets(model,'Acetate',true,true,true,true);
0179
0180
0181 modelManual=model;
0182 modelManual.mets(6:7)=[];
0183 modelManual.metNames(6:7)=[];
0184 modelManual.metMiriams(6:7)=[];
0185 modelManual.b(6:7)=[];
0186 modelManual.metFormulas(6:7)=[];
0187 modelManual.metComps(6:7)=[];
0188 modelManual.S(6:7,:)=[];
0189
0190 modelManual.rxnGeneMat(20,:)=[];
0191 modelManual.grRules(20)=[];
0192 modelManual.rxns(20)=[];
0193 modelManual.rxnNames(20)=[];
0194 modelManual.lb(20)=[];
0195 modelManual.ub(20)=[];
0196 modelManual.c(20)=[];
0197 modelManual.rev(20)=[];
0198 modelManual.S(:,20)=[];
0199 modelManual.eccodes(20)=[];
0200 verifyEqual(testCase,modelNew,modelManual)
0201 end
0202
0203 function addRxnsTest(testCase)
0204 sourceDir = fileparts(which(mfilename));
0205 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0206 rxnsToAdd.rxns='test1';
0207 rxnsToAdd.equations='2-Oxoglutarate => TEST';
0208 rxnsToAdd.rxnNames={'testRxn1'};
0209 rxnsToAdd.rxnMiriams{1}=struct('name',{{'testDB1';'testDB2'}},'value',...
0210 {{'testValue1';'testValue2'}});
0211 rxnsToAdd.grRules="b0008";
0212 evalc('modelNew=addRxns(model,rxnsToAdd,2,''c'',true);');
0213
0214 rxnsToAdd.rxns='test2';
0215 rxnsToAdd=rmfield(rxnsToAdd,'equations');
0216 rxnsToAdd.mets={{'6pgl_c','atp_c'}};
0217 rxnsToAdd.stoichCoeffs=[[-1,2]];
0218 rxnsToAdd.lb=-1000;
0219 rxnsToAdd.grRules='test';
0220 evalc('modelNew=addRxns(modelNew,rxnsToAdd,1,''c'',true,true);');
0221
0222
0223 modelManual=model;
0224
0225 modelManual.rxnMiriams=cell(numel(modelManual.rxns),1);
0226 modelManual.rxns(end+1:end+2)={'test1';'test2'};
0227 modelManual.mets(end+1)={'m_0001'};
0228 modelManual.S(end+1,:)=zeros(1,numel(modelManual.rxns)-2);
0229 modelManual.S(:,end+1:end+2)=zeros(numel(modelManual.mets),2);
0230 modelManual.S(end,96)=1;
0231 modelManual.S([14,73],end-1)=[-1,1];
0232 modelManual.S([5,17],end)=[-1,2];
0233 modelManual.lb(end+1:end+2)=[0;-1000];
0234 modelManual.ub(end+1:end+2)=[Inf;Inf];
0235 modelManual.rev(end+1:end+2)=[0;1];
0236 modelManual.c(end+1:end+2)=[0;0];
0237 modelManual.b(end+1)=[0];
0238 modelManual.rxnNames(end+1:end+2)={'testRxn1';'testRxn1'};
0239 modelManual.grRules(end+1:end+2)={'b0008';'test'};
0240
0241 modelManual.rxnGeneMat(end+1:end+2,:)=zeros(2,numel(modelManual.genes));
0242 modelManual.rxnGeneMat(:,end+1)=zeros(numel(modelManual.rxns),1);
0243 modelManual.rxnGeneMat(97,end)=1;
0244 modelManual.rxnGeneMat(end-1,1)=1;
0245 modelManual.rxnGeneMat(end,138)=1;
0246
0247 modelManual.eccodes(end+1:end+2)={'';''};
0248 modelManual.genes(end+1)={'test'};
0249 modelManual.geneShortNames(end+1)={''};
0250 modelManual.metNames(end+1)={'TEST'};
0251 modelManual.metComps(end+1)=[1];
0252 modelManual.metFormulas(end+1)={''};
0253 modelManual.metMiriams(end+1)={[]};
0254 modelManual.rxnMiriams(end+1:end+2)={struct('name',{{'testDB1';'testDB2'}},'value',...
0255 {{'testValue1';'testValue2'}})};
0256
0257 verifyEqual(testCase,modelManual,modelNew)
0258 end
0259
0260 function removeReactionsTest(testCase)
0261 sourceDir = fileparts(which(mfilename));
0262 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0263
0264 modelNew=removeMets(model,'Acetate',true,true,true,true);
0265
0266
0267 modelManual=model;
0268 modelManual.mets(6:7)=[];
0269 modelManual.metNames(6:7)=[];
0270 modelManual.metMiriams(6:7)=[];
0271 modelManual.b(6:7)=[];
0272 modelManual.metFormulas(6:7)=[];
0273 modelManual.metComps(6:7)=[];
0274 modelManual.S(6:7,:)=[];
0275
0276 modelManual.rxnGeneMat(20,:)=[];
0277 modelManual.grRules(20)=[];
0278 modelManual.rxns(20)=[];
0279 modelManual.rxnNames(20)=[];
0280 modelManual.lb(20)=[];
0281 modelManual.ub(20)=[];
0282 modelManual.c(20)=[];
0283 modelManual.rev(20)=[];
0284 modelManual.S(:,20)=[];
0285 modelManual.eccodes(20)=[];
0286 verifyEqual(testCase,modelNew,modelManual)
0287 end
0288
0289 function getMetsInCompTest(testCase)
0290
0291 sourceDir=fileparts(fileparts(fileparts(which(mfilename))));
0292 load(fullfile(sourceDir,'testing','unit_tests','test_data','ecoli_textbook.mat'), 'model');
0293
0294 evalc('[testOut.I, testOut.metNames]=getMetsInComp(model,''e'');');
0295
0296 testCheck.I=[false;false;false;false;false;false;true;false;true;false;false;false;false;false;true;false;false;false;false;true;false;false;false;false;true;false;false;false;true;true;false;true;false;false;true;false;true;false;true;false;false;true;false;true;false;false;true;false;true;false;false;false;false;false;true;false;true;false;false;false;true;false;true;false;false;false;false;false;false;true;false;false];
0297 testCheck.metNames={'Acetate';'Acetaldehyde';'2-Oxoglutarate';'CO2';'Ethanol';'Formate';'D-Fructose';'Fumarate';'D-Glucose';'L-Glutamine';'L-Glutamate';'H2O';'H+';'D-Lactate';'L-Malate';'Ammonium';'O2';'Phosphate';'Pyruvate';'Succinate'};
0298 verifyEqual(testCase,testOut,testCheck)
0299 end
0300
0301 function getRxnsInCompTest(testCase)
0302
0303 sourceDir=fileparts(fileparts(fileparts(which(mfilename))));
0304 load(fullfile(sourceDir,'testing','unit_tests','test_data','ecoli_textbook.mat'), 'model');
0305
0306 evalc('[testOut.I, testOut.rxnNames]=getRxnsInComp(model,''e'');');
0307
0308 testCheck.I=[20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39];
0309 testCheck.rxnNames={'Acetate exchange';'Acetaldehyde exchange';'2-Oxoglutarate exchange';'CO2 exchange';'Ethanol exchange';'Formate exchange';'D-Fructose exchange';'Fumarate exchange';'D-Glucose exchange';'L-Glutamine exchange';'L-Glutamate exchange';'H+ exchange';'H2O exchange';'D-lactate exchange';'L-Malate exchange';'Ammonia exchange';'O2 exchange';'Phosphate exchange';'Pyruvate exchange';'Succinate exchange'};
0310 verifyEqual(testCase,testOut,testCheck)
0311 end
0312
0313 function getAllRxnsFromGenesTest(testCase)
0314
0315 sourceDir=fileparts(fileparts(fileparts(which(mfilename))));
0316 load(fullfile(sourceDir,'testing','unit_tests','test_data','ecoli_textbook.mat'), 'model');
0317 evalc('testOut=getAllRxnsFromGenes(model,''ACONTa'');');
0318
0319 testCheck={'ACONTa';'ACONTb'};
0320 verifyEqual(testCase,testOut,testCheck)
0321 end
0322
0323 function changeRxnsTest(testCase)
0324
0325 sourceDir=fileparts(fileparts(fileparts(which(mfilename))));
0326 load(fullfile(sourceDir,'testing','unit_tests','test_data','ecoli_textbook.mat'), 'model');
0327
0328 evalc('modelNew=changeRxns(model,''ACKr'',''2-Oxoglutarate <=> TEST'',2,''c'',true);');
0329
0330 equations.mets={{'2-Oxoglutarate','TEST'}};
0331 equations.stoichCoeffs={[-1,1]};
0332
0333 evalc('modelNewStruct=changeRxns(model,''ACKr'',equations,2,''c'',true);');
0334
0335
0336 modelManual=model;
0337
0338 modelManual.mets(end+1)={'m_0001'};
0339 modelManual.S(end+1,:)=zeros(1,numel(modelManual.rxns));
0340 modelManual.S(:,3)=0;
0341 modelManual.S([14,73],3)=[-1,1];
0342
0343 modelManual.metNames(end+1)={'TEST'};
0344 modelManual.metComps(end+1)=[1];
0345 modelManual.metFormulas(end+1)={''};
0346 modelManual.metMiriams(end+1)={[]};
0347 modelManual.b(end+1)=[0];
0348 modelManual.rev(3)=[1];
0349
0350 verifyEqual(testCase,modelNew,modelManual)
0351 verifyEqual(testCase,modelNewStruct,modelManual)
0352 end
0353
0354 function removeBadRxnsTest(testCase)
0355
0356 sourceDir=fileparts(fileparts(fileparts(which(mfilename))));
0357 load(fullfile(sourceDir,'testing','unit_tests','test_data','ecoli_textbook.mat'), 'model');
0358
0359 [~,exchRxns]=getExchangeRxns(model);
0360 modelNew=model;
0361
0362 modelNew.lb(exchRxns)=[0];
0363 modelNew.ub(exchRxns)=[0];
0364 modelNew.lb(modelNew.lb>0)=0;
0365 modelNew.S(17,:)=1;
0366 [~, testOut]=removeBadRxns(modelNew);
0367 evalc('[~, testOut]=removeBadRxns(modelNew,3,modelNew.metComps==2);');
0368
0369 import matlab.unittest.constraints.AnyCellOf;
0370 import matlab.unittest.constraints.ContainsSubstring;
0371 verifyThat(testCase,AnyCellOf({'SUCDi','FRD7'}),ContainsSubstring(testOut{:}),'test')
0372
0373 end
0374
0375 function changeGrRulesTest(testCase)
0376 sourceDir = fileparts(which(mfilename));
0377 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0378
0379 modelNew=changeGrRules(model,{'ACKr','ACONTa'},{'b2296 and b1849';'b1849'},true);
0380 modelNew=changeGrRules(modelNew,'ACONTa','b1849',false);
0381
0382
0383 modelManual=model;
0384 modelManual.grRules(3:4)={'b2296 and b1849';'b1849 or b1849'};
0385 modelManual.rxnGeneMat(3:4,:)=0;
0386 modelManual.rxnGeneMat(3,[57,76])=1;
0387 modelManual.rxnGeneMat(4,57)=1;
0388
0389 verifyEqual(testCase,modelNew,modelManual)
0390 end
0391
0392 function copyToCompsTest(testCase)
0393 sourceDir = fileparts(which(mfilename));
0394 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0395
0396 modelNew=copyToComps(model,{'p','e'},'ACKr');
0397
0398
0399 modelManual=model;
0400
0401 modelManual.rxns(end+1:end+2)={'ACKr_p';'ACKr_e'};
0402 modelManual.mets(end+1:end+7)={'ac_c_p';'actp_c_p';'adp_c_p';'atp_c_p';'actp_c_e';'adp_c_e';'atp_c_e'};
0403 modelManual.S(end+1:end+7,:)=zeros(7,numel(modelManual.rxns)-2);
0404 modelManual.S(:,end+1:end+2)=zeros(numel(modelManual.mets),2);
0405
0406 modelManual.S([73,74,75,76],end-1)=[1,-1,-1,1];
0407 modelManual.S([7,77,78,79],end)=[1,-1,-1,1];
0408
0409 modelManual.lb(end+1:end+2)=[-1000;-1000];
0410 modelManual.ub(end+1:end+2)=[1000;1000];
0411 modelManual.rev(end+1:end+2)=[1;1];
0412 modelManual.c(end+1:end+2)=[0;0];
0413 modelManual.rxnNames(end+1:end+2)={'acetate kinase';'acetate kinase'};
0414 modelManual.grRules(end+1:end+2)={'b1849 or b2296 or b3115';'b1849 or b2296 or b3115'};
0415 modelManual.eccodes(end+1:end+2)={'2.7.2.1';'2.7.2.1'};
0416
0417 modelManual.rxnGeneMat(end+1:end+2,:)=zeros(2,numel(modelManual.genes));
0418 modelManual.rxnGeneMat(end-1:end,[57,76,97])=1;
0419
0420 modelManual.metNames(end+1:end+7)={'Acetate';'Acetyl phosphate';'ADP';'ATP';'Acetyl phosphate';'ADP';'ATP'};
0421 modelManual.metComps(end+1:end+7)=[3;3;3;3;2;2;2];
0422 modelManual.metFormulas(end+1:end+7)={'C2H3O2';'C2H3O5P';'C10H12N5O10P2';'C10H12N5O13P3';'C2H3O5P';'C10H12N5O10P2';'C10H12N5O13P3'};
0423 modelManual.metMiriams(end+1:end+7)=modelManual.metMiriams([6,12,13,17,12,13,17]);
0424 modelManual.b(end+1:end+7)=[0];
0425
0426 modelManual.comps(end+1)={'p'};
0427 modelManual.compNames(end+1)={'p'};
0428
0429 verifyEqual(testCase,modelNew,modelManual)
0430 end
0431
0432 function setExchangeBoundsTest(testCase)
0433 sourceDir = fileparts(which(mfilename));
0434 load([sourceDir,'/test_data/ecoli_textbook.mat'], 'model');
0435
0436 modelNew=setExchangeBounds(model,{'ac_e';'akg_e'},-500,500);
0437
0438
0439 modelManual=model;
0440
0441 exchRxns=[21;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39];
0442 modelManual.lb(exchRxns)=0;
0443 modelManual.lb([20,22])=-500;
0444 modelManual.ub([20,22])=500;
0445
0446 verifyEqual(testCase,modelNew,modelManual)
0447 end
0448
0449 function addRxnsGenesMetsTest(testCase)
0450 sourceDir = fileparts(which(mfilename));
0451 load(fullfile(sourceDir,'test_data','ecoli_textbook.mat'), 'model');
0452
0453 sbmlFile=fullfile(sourceDir,'..','..','tutorial','empty.xml');
0454 evalc('modelEmpty=importModel(sbmlFile,[],true)');
0455
0456 evalc('modelNew=addRxnsGenesMets(model,modelEmpty,''r1'',true);');
0457
0458
0459 modelManual=model;
0460
0461 modelManual.rxns(end+1)={'r1'};
0462 modelManual.mets(end+1:end+3)={'m1';'m2';'m3'};
0463 modelManual.S(end+1:end+3,:)=zeros(3,numel(modelManual.rxns)-1);
0464 modelManual.S(:,end+1)=zeros(numel(modelManual.mets),1);
0465 modelManual.S([42,73,74,75],end)=[-1,-1,1,1];
0466
0467 modelManual.lb(end+1)=[0];
0468 modelManual.ub(end+1)=[1000];
0469 modelManual.rev(end+1)=[0];
0470 modelManual.c(end+1)=[0];
0471 modelManual.rxnNames(end+1)={'Breakdown of sucrose (invertase)'};
0472 modelManual.grRules(end+1)={'g1'};
0473 modelManual.eccodes(end+1)={''};
0474 modelManual.rxnNotes(1:numel(modelManual.rxns),1)={''};
0475 modelManual.rxnNotes(end)={'Added via addRxnsGenesMets()'};
0476 modelManual.rxnConfidenceScores(1:numel(modelManual.rxns),1)=NaN;
0477 modelManual.rxnConfidenceScores(end)=[0];
0478
0479 modelManual.genes(end+1)={'g1'};
0480 modelManual.geneShortNames(end+1)={''};
0481
0482 modelManual.rxnGeneMat(end+1,:)=zeros(1,numel(modelManual.genes)-1);
0483 modelManual.rxnGeneMat(:,end+1)=zeros(numel(modelManual.rxns),1);
0484 modelManual.rxnGeneMat(end,end)=1;
0485
0486 modelManual.metNames(end+1:end+3)={'sucrose';'glucose';'fructose'};
0487 modelManual.metComps(end+1:end+3)=[2;2;2];
0488 modelManual.metFormulas(end+1:end+3)={'C12H22O11';'C6H12O6';'C6H12O6'};
0489 modelManual.metMiriams(end+1:end+3)={[];[];[]};
0490 modelManual.b(end+1:end+3)=[0];
0491
0492 verifyEqual(testCase,modelNew,modelManual)
0493 end