example network model

Example network modelΒΆ

Basic ModCell2 usage with a toy model.

Basic ModCell2 usage with a toy model.

This script was used to generate the results presented in the manuscript regarding the example network.

Parse input and create prodnet

modcell_path = fileparts(which('initModCell2.m'));
input_info.problem_path = fullfile(modcell_path,'problems','example_network');
prodnet = Prodnet(input_info);
LP solver set as : glpk
Warning: Parent model contains -+1000 lower and upper bounds, replace unkown bounds with +-inf using change_unknown_bounds.m
Set cobra solver to glpk... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + Creating production networks + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Production network for: P1 Heterologus metabolite info was not provided Adding heterologus reactions and specifying fixed module reactions/genes... Reaction with missing is_fixed_module will be considered as heterologus, if they are already in the parent model they will not be part of the module Reaction name for R9 not specified, usign id
Warning: Reaction with the same name already exists in the model
Warning: Model already has the same reaction you tried to add: R9
Reaction R9 was already in parent model Model does not contain enough information to check mass and charge balance of heterologus reactions +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Production network for: P2 Heterologus metabolite info was not provided Adding heterologus reactions and specifying fixed module reactions/genes... Reaction with missing is_fixed_module will be considered as heterologus, if they are already in the parent model they will not be part of the module Reaction name for R12 not specified, usign id
Warning: Metabolite P2 not in model - added to the model
Warning: Metabolite name for P2 set to P2
Reaction name for R13 not specified, usign id Model does not contain enough information to check mass and charge balance of heterologus reactions +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Production network for: P3 Heterologus metabolite info was not provided Adding heterologus reactions and specifying fixed module reactions/genes... Reaction with missing is_fixed_module will be considered as heterologus, if they are already in the parent model they will not be part of the module Reaction name for R14 not specified, usign id
Warning: Metabolite P3 not in model - added to the model
Warning: Metabolite name for P3 set to P3
Reaction name for R15 not specified, usign id Model does not contain enough information to check mass and charge balance of heterologus reactions +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + Finding candidate reactions and genes for deletion + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Model lacks field metFormulas, carbon number criterion not used Model does not contain GPR information allow_transport_reaction_deletions was not specified metabolite_transport_allowed information not provided Calculating blocked reactions in all production networks with heterologus reactions(2/3).... Starting parallel pool (parpool) using the 'local' profile ... connected to 4 workers.
Warning: The following heterologus reactions in model P2 are unbounded (or blocked):
Warning: The following heterologus reactions in model P3 are unbounded (or blocked):
Calculating blocked reactions in all production networks for non-growth state with heterologus reactions(2/3).... Calculating essential reactions... Calculating fully correlated reaction sets... Model does not contain gene related information +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + Done + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
prodnet.save();
File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\prodnet.mat

Design setup

prodnet.set_deletion_type('reactions');
de = MCdesign(prodnet);
% change default ga parameters:
de.ga_parameters.random_num_gen_seed = 1;
de.ga_parameters.use_parallel = false;
de.ga_parameters.stall_generations = 30;
de.ga_parameters.population_size = 30;

wGCP designs

design_parameters.objective = 'wGCP';
design_parameters.max_deletions = 1;
% no module reactions
design_parameters.max_module = 0 .* ones(prodnet.n_prod,1);
de.solve_mop(design_parameters);
0/5 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\wGCP-1-0-ps30tg32.mat
0/5 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\wGCP-1-0-ps30tg64.mat Checking domination A(mop_solution), B(mop_solution_old),... 2/2 unique in A 2/2 unique in B Both inputs have the same unique elements, but domination may still occur because the objectives are round to 6 significant decimals 0 A dominated. 0 B dominated Problem terminated, reason: No new non-dominated solutions found Total run time 0.08 (min), total generations 64 Final solution saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\wGCP-1-0.mat
% one module reaction per network
design_parameters.max_module = 1 .* ones(prodnet.n_prod,1);
de.solve_mop(design_parameters);
Warning: Number of variables in the initial population is less than the number of variables in the problem. Filling empty variables with zero. This may render the initial population useless if index missmatch occurs
0/2 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\wGCP-1-1-ps30tg64.mat
0/2 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\wGCP-1-1-ps30tg96.mat Checking domination A(mop_solution), B(mop_solution_old),... 1/1 unique in A 1/1 unique in B Both inputs have the same unique elements, but domination may still occur because the objectives are round to 6 significant decimals 0 A dominated. 0 B dominated Problem terminated, reason: No new non-dominated solutions found Total run time 0.12 (min), total generations 64 Final solution saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\wGCP-1-1.mat

sGCP designs

% sGCP and different parameters
design_parameters.objective = 'sGCP';
design_parameters.max_deletions = 3;
% no module reactions
design_parameters.max_module = 0 .* ones(prodnet.n_prod,1);
de.solve_mop(design_parameters);
Warning: Number of variables in the initial population is more than the number of variables in the problem. Initializing random population
0/6 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\sGCP-3-0-ps30tg97.mat
0/5 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\sGCP-3-0-ps30tg130.mat Checking domination A(mop_solution), B(mop_solution_old),... 3/3 unique in A 3/3 unique in B 0 A dominated. 0 B dominated Problem terminated, reason: No new non-dominated solutions found Total run time 0.10 (min), total generations 66 Final solution saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\sGCP-3-0.mat
% one module reaction per network
design_parameters.max_module = 1 .* ones(prodnet.n_prod,1);
de.solve_mop(design_parameters);
Warning: Number of variables in the initial population is less than the number of variables in the problem. Filling empty variables with zero. This may render the initial population useless if index missmatch occurs
0/3 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\sGCP-3-1-ps30tg129.mat
0/2 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\sGCP-3-1-ps30tg161.mat Checking domination A(mop_solution), B(mop_solution_old),... 1/1 unique in A 1/1 unique in B Both inputs have the same unique elements, but domination may still occur because the objectives are round to 6 significant decimals 0 A dominated. 0 B dominated Problem terminated, reason: No new non-dominated solutions found Total run time 0.16 (min), total generations 64 Final solution saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\sGCP-3-1.mat

NGP design

%setup
design_parameters.objective = 'NGP';
prodnet.set_deletion_type('reactions','NGP'); % (This points to the same prodnet as prodnet in the "de" object.
design_parameters.max_deletions = 3;
% no module reactions
design_parameters.max_module = 0 .* ones(prodnet.n_prod,1);
de.solve_mop(design_parameters);
Warning: Number of variables in the initial population is more than the number of variables in the problem. Initializing random population
0/6 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\NGP-3-0-ps30tg161.mat
0/6 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\NGP-3-0-ps30tg193.mat Checking domination A(mop_solution), B(mop_solution_old),... 2/2 unique in A 2/2 unique in B Both inputs have the same unique elements, but domination may still occur because the objectives are round to 6 significant decimals 0 A dominated. 0 B dominated Problem terminated, reason: No new non-dominated solutions found Total run time 0.07 (min), total generations 64 Final solution saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\NGP-3-0.mat
% one module reaction per network
design_parameters.max_module = 1 .* ones(prodnet.n_prod,1);
de.solve_mop(design_parameters);
Warning: Number of variables in the initial population is less than the number of variables in the problem. Filling empty variables with zero. This may render the initial population useless if index missmatch occurs
0/4 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\NGP-3-1-ps30tg193.mat
0/4 solutions violate deletion constraints File saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\all\NGP-3-1-ps30tg225.mat Checking domination A(mop_solution), B(mop_solution_old),... 1/1 unique in A 1/1 unique in B Both inputs have the same unique elements, but domination may still occur because the objectives are round to 6 significant decimals 0 A dominated. 0 B dominated Problem terminated, reason: No new non-dominated solutions found Total run time 0.12 (min), total generations 64 Final solution saved at: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\NGP-3-1.mat

Analyze results

prodnet = load_prodnet('example_network');
Write solution reports
ra = ResAnalysis(prodnet,{'wGCP-1-0','wGCP-1-1','sGCP-3-0','sGCP-3-1'});
ra.write_to_xls('growth_obj_report')
Prodnet state set to that of wGCP-1-0
Warning: Added specified worksheet.
Warning: Added specified worksheet.
Warning: Added specified worksheet.
Warning: Added specified worksheet.
Warning: Added specified worksheet.
Warning: Added specified worksheet.
Report tables written to: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\growth_obj_report.xls
ra = ResAnalysis(prodnet,{'NGP-3-0','NGP-3-1'});
ra.write_to_xls('non_growth_obj_report')
Prodnet state set to that of NGP-3-0
Warning: Added specified worksheet.
Warning: Added specified worksheet.
Warning: Added specified worksheet.
Warning: Added specified worksheet.
Report tables written to: C:\Users\Sergio Garcia\Dropbox\modcell2-dev\problems\example_network\output\non_growth_obj_report.xls
Plot production envelope matrix
ra = ResAnalysis(prodnet,{'wGCP-1-0','wGCP-1-0','wGCP-1-1',...
'sGCP-3-0','sGCP-3-0','sGCP-3-0','sGCP-3-1',...
'NGP-3-0','NGP-3-0','NGP-3-1'});
ra.plot_yield_vs_growth([1,2,1,...
1,2,3,1,...
1,2,1])