diff --git a/doc/src/geckomat/change_model/makeEcModel.html b/doc/src/geckomat/change_model/makeEcModel.html
index 18aeab8e1..cad1d0596 100644
--- a/doc/src/geckomat/change_model/makeEcModel.html
+++ b/doc/src/geckomat/change_model/makeEcModel.html
@@ -393,148 +393,150 @@
SOURCE CODE end
0258 noUniprot = uniprotCompatibleGenes(~Lia);
-0259 if ~isempty(noUniprot)
-0260 printOrange(['WARNING: The ' num2str(numel(noUniprot)) ' gene(s) reported in noUniprot cannot be found in data/uniprot.tsv, these will\n' ...
-0261 'not be enzyme-constrained. If you intend to use different Uniprot data (e.g. from a\n'...
-0262 'different proteome, make sure you first delete the existing data/uniprot.tsv file.\n'])
-0263 end
-0264 ec.genes = model.genes(Lia);
-0265 ec.enzymes = uniprotDB.ID(Locb(Lia));
-0266 ec.mw = uniprotDB.MW(Locb(Lia));
-0267 ec.sequence = uniprotDB.seq(Locb(Lia));
-0268
-0269 ec.concs = nan(numel(ec.genes),1);
-0270
-0271
-0272 if ~geckoLight
-0273 ec.rxnEnzMat = zeros(numel(rxnWithGene),numel(ec.genes));
-0274 for r=1:numel(rxnWithGene)
-0275 rxnGenes = model.genes(find(model.rxnGeneMat(rxnWithGene(r),:)));
-0276 [~,locEnz] = ismember(rxnGenes,ec.genes);
-0277 if locEnz ~= 0
-0278 ec.rxnEnzMat(r,locEnz) = 1;
-0279 end
-0280 end
-0281 else
-0282
-0283 ec.rxnEnzMat = zeros(numel(ec.rxns),numel(ec.genes));
-0284 nextIndex = 1;
-0285
-0286
-0287 indexes2check = findPotentialErrors(model.grRules,model);
-0288 if ~isempty(indexes2check)
-0289 printOrange('Run standardizeGrRules(model) for a more detailed warning.\n')
-0290 printOrange('For Human-GEM, these reactions can be corrected using simplifyGrRules.\n');
-0291 end
-0292
-0293 for i=1:prevNumRxns
-0294
-0295
-0296 ind = rxnWithGene(i);
-0297
-0298
-0299 geneString=model.grRules{ind};
-0300 geneString=strrep(geneString,'(','');
-0301 geneString=strrep(geneString,')','');
-0302 geneString=strrep(geneString,' or ',';');
-0303
-0304 if (numOrs(i) == 0)
-0305 geneNames = {geneString};
-0306 else
-0307
-0308 geneNames=regexp(geneString,';','split');
-0309 end
-0310
-0311
-0312 for j = 1:length(geneNames)
-0313
-0314
-0315 fnd = strfind(geneNames{j},' and ');
-0316 if ~isempty(fnd)
-0317 andGenes=regexp(geneNames{j},' and ','split');
-0318 ec.rxnEnzMat(nextIndex,ismember(ec.genes,andGenes)) = 1;
-0319 else
-0320 ec.rxnEnzMat(nextIndex,ismember(ec.genes,geneNames(j)))=1;
-0321 end
-0322 nextIndex = nextIndex + 1;
-0323 end
-0324 end
-0325 end
-0326
-0327
-0328 if ~geckoLight
-0329 [proteinMets.mets, uniprotSortId] = unique(ec.enzymes);
-0330 proteinMets.mets = strcat('prot_',proteinMets.mets);
-0331 proteinMets.metNames = proteinMets.mets;
-0332 proteinMets.compartments = compartmentID;
-0333 if isfield(model,'metMiriams')
-0334 proteinMets.metMiriams = repmat({struct('name',{{'sbo'}},'value',{{'SBO:0000252'}})},numel(proteinMets.mets),1);
-0335 end
-0336 if isfield(model,'metCharges')
-0337 proteinMets.metCharges = zeros(numel(proteinMets.mets),1);
-0338 end
-0339 proteinMets.metNotes = repmat({'Enzyme-usage pseudometabolite'},numel(proteinMets.mets),1);
-0340 model = addMets(model,proteinMets);
-0341 end
-0342
-0343
-0344 pool.mets = 'prot_pool';
-0345 pool.metNames = pool.mets;
-0346 pool.compartments = compartmentID;
-0347 pool.metNotes = 'Enzyme-usage protein pool';
-0348 model = addMets(model,pool);
-0349
-0350
-0351 if ~geckoLight
-0352 usageRxns.rxns = strcat('usage_',proteinMets.mets);
-0353 usageRxns.rxnNames = usageRxns.rxns;
-0354 usageRxns.mets = cell(numel(usageRxns.rxns),1);
-0355 usageRxns.stoichCoeffs = cell(numel(usageRxns.rxns),1);
-0356 for i=1:numel(usageRxns.mets)
-0357 usageRxns.mets{i} = {proteinMets.mets{i}, 'prot_pool'};
-0358 usageRxns.stoichCoeffs{i} = [-1,1];
-0359 end
-0360 usageRxns.lb = zeros(numel(usageRxns.rxns),1) - 1000;
-0361 usageRxns.ub = zeros(numel(usageRxns.rxns),1);
-0362 usageRxns.rev = ones(numel(usageRxns.rxns),1);
-0363 usageRxns.grRules = ec.genes(uniprotSortId);
-0364 model = addRxns(model,usageRxns);
-0365 end
-0366
-0367
-0368 poolRxn.rxns = 'prot_pool_exchange';
-0369 poolRxn.rxnNames = poolRxn.rxns;
-0370 poolRxn.mets = {'prot_pool'};
-0371 poolRxn.stoichCoeffs = {-1};
-0372 poolRxn.lb = -1000;
-0373 poolRxn.ub = 0;
-0374 poolRxn.rev = 1;
-0375 model = addRxns(model,poolRxn);
-0376
-0377 model.ec=ec;
-0378 end
-0379
-0380
-0381
-0382
-0383
-0384
-0385
-0386 function indexes2check = findPotentialErrors(grRules,model)
-0387 indxs_l = find(~cellfun(@isempty,strfind(grRules,') and (')));
-0388 indxs_l_L = find(~cellfun(@isempty,strfind(grRules,') and')));
-0389 indxs_l_R = find(~cellfun(@isempty,strfind(grRules,'and (')));
-0390 indexes2check = vertcat(indxs_l,indxs_l_L,indxs_l_R);
-0391 indexes2check = unique(indexes2check);
-0392
-0393 if ~isempty(indexes2check)
-0394 textToPrint = 'WARNING: Potentially problematic ") AND (" in the grRules for reaction(s):\n';
-0395 for i=1:numel(indexes2check)
-0396 textToPrint=[textToPrint '\t' model.rxns{indexes2check(i)} '\n'];
-0397 end
-0398 printOrange(textToPrint);
-0399 end
-0400 end
+0259 if all(~Lia)
+0260 error('None of the proteins in uniprot.tsv match the genes in the model. Changes to the obj.params.uniprot parameters are likely required.')
+0261 elseif ~isempty(noUniprot)
+0262 printOrange(['WARNING: The ' num2str(numel(noUniprot)) ' gene(s) reported in noUniprot cannot be found in data/uniprot.tsv, these will\n' ...
+0263 'not be enzyme-constrained. If you intend to use different Uniprot data (e.g. from a\n'...
+0264 'different proteome, make sure you first delete the existing data/uniprot.tsv file.\n'])
+0265 end
+0266 ec.genes = model.genes(Lia);
+0267 ec.enzymes = uniprotDB.ID(Locb(Lia));
+0268 ec.mw = uniprotDB.MW(Locb(Lia));
+0269 ec.sequence = uniprotDB.seq(Locb(Lia));
+0270
+0271 ec.concs = nan(numel(ec.genes),1);
+0272
+0273
+0274 if ~geckoLight
+0275 ec.rxnEnzMat = zeros(numel(rxnWithGene),numel(ec.genes));
+0276 for r=1:numel(rxnWithGene)
+0277 rxnGenes = model.genes(find(model.rxnGeneMat(rxnWithGene(r),:)));
+0278 [~,locEnz] = ismember(rxnGenes,ec.genes);
+0279 if locEnz ~= 0
+0280 ec.rxnEnzMat(r,locEnz) = 1;
+0281 end
+0282 end
+0283 else
+0284
+0285 ec.rxnEnzMat = zeros(numel(ec.rxns),numel(ec.genes));
+0286 nextIndex = 1;
+0287
+0288
+0289 indexes2check = findPotentialErrors(model.grRules,model);
+0290 if ~isempty(indexes2check)
+0291 printOrange('Run standardizeGrRules(model) for a more detailed warning.\n')
+0292 printOrange('For Human-GEM, these reactions can be corrected using simplifyGrRules.\n');
+0293 end
+0294
+0295 for i=1:prevNumRxns
+0296
+0297
+0298 ind = rxnWithGene(i);
+0299
+0300
+0301 geneString=model.grRules{ind};
+0302 geneString=strrep(geneString,'(','');
+0303 geneString=strrep(geneString,')','');
+0304 geneString=strrep(geneString,' or ',';');
+0305
+0306 if (numOrs(i) == 0)
+0307 geneNames = {geneString};
+0308 else
+0309
+0310 geneNames=regexp(geneString,';','split');
+0311 end
+0312
+0313
+0314 for j = 1:length(geneNames)
+0315
+0316
+0317 fnd = strfind(geneNames{j},' and ');
+0318 if ~isempty(fnd)
+0319 andGenes=regexp(geneNames{j},' and ','split');
+0320 ec.rxnEnzMat(nextIndex,ismember(ec.genes,andGenes)) = 1;
+0321 else
+0322 ec.rxnEnzMat(nextIndex,ismember(ec.genes,geneNames(j)))=1;
+0323 end
+0324 nextIndex = nextIndex + 1;
+0325 end
+0326 end
+0327 end
+0328
+0329
+0330 if ~geckoLight
+0331 [proteinMets.mets, uniprotSortId] = unique(ec.enzymes);
+0332 proteinMets.mets = strcat('prot_',proteinMets.mets);
+0333 proteinMets.metNames = proteinMets.mets;
+0334 proteinMets.compartments = compartmentID;
+0335 if isfield(model,'metMiriams')
+0336 proteinMets.metMiriams = repmat({struct('name',{{'sbo'}},'value',{{'SBO:0000252'}})},numel(proteinMets.mets),1);
+0337 end
+0338 if isfield(model,'metCharges')
+0339 proteinMets.metCharges = zeros(numel(proteinMets.mets),1);
+0340 end
+0341 proteinMets.metNotes = repmat({'Enzyme-usage pseudometabolite'},numel(proteinMets.mets),1);
+0342 model = addMets(model,proteinMets);
+0343 end
+0344
+0345
+0346 pool.mets = 'prot_pool';
+0347 pool.metNames = pool.mets;
+0348 pool.compartments = compartmentID;
+0349 pool.metNotes = 'Enzyme-usage protein pool';
+0350 model = addMets(model,pool);
+0351
+0352
+0353 if ~geckoLight
+0354 usageRxns.rxns = strcat('usage_',proteinMets.mets);
+0355 usageRxns.rxnNames = usageRxns.rxns;
+0356 usageRxns.mets = cell(numel(usageRxns.rxns),1);
+0357 usageRxns.stoichCoeffs = cell(numel(usageRxns.rxns),1);
+0358 for i=1:numel(usageRxns.mets)
+0359 usageRxns.mets{i} = {proteinMets.mets{i}, 'prot_pool'};
+0360 usageRxns.stoichCoeffs{i} = [-1,1];
+0361 end
+0362 usageRxns.lb = zeros(numel(usageRxns.rxns),1) - 1000;
+0363 usageRxns.ub = zeros(numel(usageRxns.rxns),1);
+0364 usageRxns.rev = ones(numel(usageRxns.rxns),1);
+0365 usageRxns.grRules = ec.genes(uniprotSortId);
+0366 model = addRxns(model,usageRxns);
+0367 end
+0368
+0369
+0370 poolRxn.rxns = 'prot_pool_exchange';
+0371 poolRxn.rxnNames = poolRxn.rxns;
+0372 poolRxn.mets = {'prot_pool'};
+0373 poolRxn.stoichCoeffs = {-1};
+0374 poolRxn.lb = -1000;
+0375 poolRxn.ub = 0;
+0376 poolRxn.rev = 1;
+0377 model = addRxns(model,poolRxn);
+0378
+0379 model.ec=ec;
+0380 end
+0381
+0382
+0383
+0384
+0385
+0386
+0387
+0388 function indexes2check = findPotentialErrors(grRules,model)
+0389 indxs_l = find(~cellfun(@isempty,strfind(grRules,') and (')));
+0390 indxs_l_L = find(~cellfun(@isempty,strfind(grRules,') and')));
+0391 indxs_l_R = find(~cellfun(@isempty,strfind(grRules,'and (')));
+0392 indexes2check = vertcat(indxs_l,indxs_l_L,indxs_l_R);
+0393 indexes2check = unique(indexes2check);
+0394
+0395 if ~isempty(indexes2check)
+0396 textToPrint = 'WARNING: Potentially problematic ") AND (" in the grRules for reaction(s):\n';
+0397 for i=1:numel(indexes2check)
+0398 textToPrint=[textToPrint '\t' model.rxns{indexes2check(i)} '\n'];
+0399 end
+0400 printOrange(textToPrint);
+0401 end
+0402 end
Generated by m2html © 2005