Skip to content

Commit 4f7ba98

Browse files
committed
fix some bugs in figure generation scripts
1 parent 0fe29a5 commit 4f7ba98

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
__ ___ ________ ____
55
/ |/ /___ ____/ / ____/__ / / /
6-
/ /|_/ / __ \/ __ / / / _ \/ / /
7-
/ / / / /_/ / /_/ / /___/ __/ / /
8-
/_/ /_/\____/\__,_/\____/\___/_/_/
9-
==================================
6+
/ /|_/ / __ \/ __ / / / _ \/ / /
7+
/ / / / /_/ / /_/ / /___/ __/ / /
8+
/_/ /_/\____/\__,_/\____/\___/_/_/
9+
==================================
1010

1111
This is the repository for the ModCell2 modular strain design framework.
1212

@@ -25,10 +25,10 @@ Installation
2525
------------
2626
Download or clone this repository, then add simply add the ModCell2 folder to your MATLAB path by running
2727
::
28-
28+
2929
addpath(genpath(['<parent-directory>', filesep, 'ModCell2']))
3030

31-
Where <parent-directory> depends on your system. To verify your installation execute :code:`run_all_tests.m`. :warning: Make sure the Requierements_ are met. :warning:.
31+
Where <parent-directory> depends on your system. To verify your installation execute :code:`run_all_tests.m`. :warning: Make sure the Requierements_ are met. :warning:. You may need to run `initCobraToolbox` once within Matlab for certain methods to work correctly.
3232

3333
Quick start
3434
------------

problems/ecoli-gem/mip/flux_analysis/flux_analysis.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
'Pentyl pentanoate'};
2929
prodnet.prod_name = good_prod_name;
3030
%% Set prodnet to target design
31-
[T1, ~, design_vars] = format_output(fullfile(modcell_path,'problems','ecoli-gem','mip','flux_analysis_2','a6_b1_optimized_modules.csv'),prodnet, 'wGCP');
31+
[T1, ~, design_vars] = format_output(fullfile(modcell_path,'problems','ecoli-gem','mip','flux_analysis','a6_b1_optimized_modules.csv'),prodnet, 'wGCP');
3232
i=1;
3333
prodnet.set_module_and_deleted_variables(design_vars(i).Z,design_vars(i).y)
3434

problems/ecoli-gem/mip/flux_analysis/generate_pe.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
'Pentyl pentanoate'};
3030
prodnet.prod_name = good_prod_name;
3131
%% Set prodnet to target design
32-
[T1, ~, design_vars] = format_output(fullfile(modcell_path,'problems','ecoli-gem','mip','flux_analysis_2','a6_b1_optimized_modules.csv'),prodnet, 'wGCP');
32+
[T1, ~, design_vars] = format_output(fullfile(modcell_path,'problems','ecoli-gem','mip','flux_analysis','a6_b1_optimized_modules.csv'),prodnet, 'wGCP');
3333
i=1;
3434
%prodnet.set_module_and_deleted_variables(design_vars(i).Z,design_vars(i).y)
3535
prodnet.reset_wild_type_state();
@@ -48,6 +48,6 @@
4848
X_TICK_LABEL_DIGITS = 2;
4949

5050
ResAnalysis.plot_yield_vs_growth_s(model_array, ko_array, prod_id, solution_id,...
51-
'min_obj_val',0,'plot_type','overlap', 'n_rows',4, 'n_cols',5, ...
51+
'min_obj_val',0,'plot_type','overlap', 'n_rows',5, 'n_cols',4, ...
5252
'xticks_values', [0:0.05:0.15], 'all_yticks',false, 'all_xticks', false,...
5353
'grid', true)

problems/ecoli-gem/mip/flux_analysis/optimize_production_modules.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@
5757
prodnet.set_module_and_deleted_variables(pm(i).Z,y);
5858
wgcp(:,i) = prodnet.calc_design_objectives('wGCP');
5959
end
60-
%%
60+
%%
6161
names = {pm(:).id};
6262
names{1} = 'None';
63-
T = array2table(wgcp);
63+
T = array2table(wgcp);
6464
T.Properties.VariableNames = names;
6565
T.Properties.RowNames = prodnet.prod_id;
6666
T
@@ -73,7 +73,7 @@
7373
default{1} = 'None';
7474
end
7575
fprintf('\t (Default: %s)\n', default{1})
76-
no_module = wgcp(k,1);
76+
no_module = wgcp(k,1);
7777
max_ind = find(wgcp(k,:) == max(wgcp(k,:))); % Only if increase is significant!
7878
for i =1:length(max_ind)
7979
if isempty(pm(max_ind(i)).id)
@@ -88,7 +88,7 @@
8888

8989
%% Edit file and load:
9090
[T2, ~, design_vars2] = format_output(fullfile(modcell_path,'problems','ecoli-gem',...
91-
'mip','flux_analysis_2','a6_b1_optimized_modules.csv'),prodnet, 'wGCP');
91+
'mip','flux_analysis','a6_b1_optimized_modules.csv'),prodnet, 'wGCP');
9292
i=1;
9393

9494
%% Plot of maximum theoretical yield vs module performance
@@ -142,4 +142,4 @@
142142
set(gca,'YGrid','on')
143143
set_figure_defaults
144144
set(gcf, 'Units', 'Inches', 'Position', [0, 0, 4.5, 3])
145-
print(['yield_v.svg'],'-dsvg')
145+
print(['yield_v.svg'],'-dsvg')

src/@ResAnalysis/plot_yield_vs_growth_s.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function plot_yield_vs_growth_s(model_array, ko_array, prod_id, solution_id, var
115115
mut_colors(4,:) = [255,255,0]./255; % yellow
116116
mut_colors(5,:) = [204, 0, 0]./255; % red dark
117117

118-
mut_line_colors = mut_colors./inputs.line_color_divider;
118+
mut_line_colors = mut_colors./inputs.line_color_factor;
119119
mut_line_colors(3,:) = mut_colors(3,:); % for NGP in the third case the line has to be bright
120120

121121
end

0 commit comments

Comments
 (0)