Home > src > geckomat > kcat_sensitivity_analysis > Bayesian > changeMedia.m

changeMedia

PURPOSE ^

changeMedia

SYNOPSIS ^

function [model,pos] = changeMedia(model,c_source,media,anox,flux)

DESCRIPTION ^

changeMedia

 Function that modifies the ecModel and makes it suitable for batch growth
 simulations on different carbon sources.

 INPUT:
   - model:  An enzyme constrained model
   - media:  Media type ('YEP' for complex, 
                         'MAA' minimal with Aminoacids,
                         'MIN' for minimal media,
                         'MIN+His' for minimal media with his
                         'MIN+Arg' for minimal media with arg
                         'MIN+Citrate' for minimal media with Citrate)
   - anox:   (optional) TRUE if anaerobic conditions are desired, DEFAULT=
             FALSE
   - flux:   (Optional) A cell array with measured uptake fluxes in mmol/gDwh

 OUTPUT:
   - model: The ECmodel with the specified medium constraints

 Ivan Domenzain        2020-01-17
 Feiran Li             2020-11-10

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [model,pos] = changeMedia(model,c_source,media,anox,flux)
0002 %changeMedia
0003 %
0004 % Function that modifies the ecModel and makes it suitable for batch growth
0005 % simulations on different carbon sources.
0006 %
0007 % INPUT:
0008 %   - model:  An enzyme constrained model
0009 %   - media:  Media type ('YEP' for complex,
0010 %                         'MAA' minimal with Aminoacids,
0011 %                         'MIN' for minimal media,
0012 %                         'MIN+His' for minimal media with his
0013 %                         'MIN+Arg' for minimal media with arg
0014 %                         'MIN+Citrate' for minimal media with Citrate)
0015 %   - anox:   (optional) TRUE if anaerobic conditions are desired, DEFAULT=
0016 %             FALSE
0017 %   - flux:   (Optional) A cell array with measured uptake fluxes in mmol/gDwh
0018 %
0019 % OUTPUT:
0020 %   - model: The ECmodel with the specified medium constraints
0021 %
0022 % Ivan Domenzain        2020-01-17
0023 % Feiran Li             2020-11-10
0024 
0025 if nargin<4
0026     anox = false;
0027     if nargin<3
0028         media = 'MIN';
0029     end
0030 end
0031 % Give the carbon source (c_source) input variable with the following
0032 % format: c_source  = 'D-glucose exchange'
0033 c_source = [c_source,' exchange'];
0034 %first block any uptake
0035 rxnidx = contains(model.rxnNames,'exchange (reversible)');
0036 model = setParam(model,'eq',model.rxns(rxnidx),0);
0037 
0038 [~,exchange]  = getExchangeRxns(model);
0039 [~,idx] = ismember('EX_protein_pool',model.rxnNames);
0040 exchange = setdiff(exchange,idx);
0041 model.lb(exchange) = 0;
0042 pos = getComponentIndexes(model,c_source);
0043 
0044 
0045 % %For growth on fructose and mannose the transport takes place in a passive
0046 % %way. [Boles & Hollenberg, 2006]
0047 % if strcmp(c_source,'D-fructose exchange')
0048 %     model.S(strcmp(model.mets,'s_0796'),strcmp(model.rxns,'r_1134')) = 0;
0049 %     model.S(strcmp(model.mets,'s_0794'),strcmp(model.rxns,'r_1134')) = 0;
0050 % elseif strcmp(c_source,'D-mannose exchange')
0051 %     model.S(strcmp(model.mets,'s_0796'),strcmp(model.rxns,'r_1139')) = 0;
0052 %     model.S(strcmp(model.mets,'s_0794'),strcmp(model.rxns,'r_1139')) = 0;
0053 % end
0054 %The media will define which rxns to fix:
0055 if strcmpi(media,'YEP')
0056     N = 25;     %Aminoacids + Nucleotides
0057 elseif strcmpi(media,'MAA')
0058     N = 21;     %Aminoacids
0059 elseif strcmpi(media,'MIN')
0060     N = 1;      %Only the carbon source
0061 elseif strcmpi(media,'MIN+His')
0062     N = 1;      %Only the carbon source
0063     model = changeRxnBounds(model,'r_1893',-0.08,'l');    %Histidine exchange
0064 elseif strcmpi(media,'MIN+Arg')
0065     N = 1;      %Only the carbon source
0066     model = changeRxnBounds(model,'r_1879',-0.08,'l');    %L-arginine exchange
0067 elseif strcmpi(media,'MIN+Citrate')
0068     N = 1;      %Only the carbon source
0069     model = changeRxnBounds(model,'r_1687',-0.08,'l');    %citrate exchange
0070 end
0071 %LB parameter (manually optimized for glucose on Min+AA):
0072 b = -0.08;
0073 %LB parameter (manually optimized for glucose complex media):
0074 c = -2;
0075 %Define fluxes in case of ec model:
0076 if nargin < 5   %Limited protein
0077     if N>1
0078        flux    = b*ones(1,N);
0079        if N>21
0080            flux(22:25) = c;
0081        end
0082     end
0083     flux(1) = -1000;
0084 end
0085 %Fix values as LBs:
0086 for i = 1:N
0087     model.lb(pos(i)) = flux(i);
0088 end
0089 %Allow uptake of essential components
0090 model = setParam(model, 'lb', 'r_1654', -Inf); % 'ammonium exchange';
0091 model = setParam(model, 'lb', 'r_2100', -Inf); % 'water exchange' ;
0092 model = setParam(model, 'lb', 'r_1861', -Inf); % 'iron(2+) exchange';
0093 model = setParam(model, 'lb', 'r_1992', -Inf); % 'oxygen exchange';
0094 model = setParam(model, 'lb', 'r_2005', -Inf); % 'phosphate exchange';
0095 model = setParam(model, 'lb', 'r_2060', -Inf); % 'sulphate exchange';
0096 model = setParam(model, 'lb', 'r_1832', -Inf); % 'H+ exchange' ;
0097 model = setParam(model, 'lb', 'r_4593', -Inf); % 'chloride exchange' ;
0098 model = setParam(model, 'lb', 'r_4595', -Inf); % Mn(2+) exchange
0099 model = setParam(model, 'lb', 'r_4596', -Inf); % Zn(2+ exchange
0100 model = setParam(model, 'lb', 'r_4597', -Inf); % Mg(2+) exchange
0101 model = setParam(model, 'lb', 'r_2049', -Inf); % sodium exchange
0102 model = setParam(model, 'lb', 'r_4594', -Inf); % Cu(2+) exchange
0103 model = setParam(model, 'lb', 'r_4600', -Inf); % Ca(2+) exchange
0104 model = setParam(model, 'lb', 'r_2020', -Inf); % potassium exchange
0105 %Block some production fluxes
0106 model = setParam(model, 'ub', 'r_1663', 0); % bicarbonate exchange
0107 model = setParam(model, 'ub', 'r_4062', 0); % lipid backbone exchange
0108 model = setParam(model, 'ub', 'r_4064', 0); % lipid chain exchange
0109 
0110 %Allow biomass production
0111 model = setParam(model, 'ub', 'r_2111', Inf); % growth
0112 
0113 % change aeerobic or anaerobic
0114 if strcmp(anox,'anaerobic')
0115     1
0116     model = anaerobicModel_GECKO(model);
0117 end
0118 end
0119 
0120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0121 function pos = getComponentIndexes(model,c_source)
0122     pos(1)  = find(strcmpi(model.rxnNames,c_source));
0123     pos(2)  = find(strcmpi(model.rxnNames,'L-alanine exchange'));
0124     pos(3)  = find(strcmpi(model.rxnNames,'L-arginine exchange'));
0125     pos(4)  = find(strcmpi(model.rxnNames,'L-asparagine exchange'));
0126     pos(5)  = find(strcmpi(model.rxnNames,'L-aspartate exchange'));
0127     pos(6)  = find(strcmpi(model.rxnNames,'L-cysteine exchange'));
0128     pos(7)  = find(strcmpi(model.rxnNames,'L-glutamine exchange'));
0129     pos(8)  = find(strcmpi(model.rxnNames,'L-glutamate exchange'));
0130     pos(9)  = find(strcmpi(model.rxnNames,'L-glycine exchange'));
0131     pos(10) = find(strcmpi(model.rxnNames,'L-histidine exchange'));
0132     pos(11) = find(strcmpi(model.rxnNames,'L-isoleucine exchange'));
0133     pos(12) = find(strcmpi(model.rxnNames,'L-leucine exchange'));
0134     pos(13) = find(strcmpi(model.rxnNames,'L-lysine exchange'));
0135     pos(14) = find(strcmpi(model.rxnNames,'L-methionine exchange'));
0136     pos(15) = find(strcmpi(model.rxnNames,'L-phenylalanine exchange'));
0137     pos(16) = find(strcmpi(model.rxnNames,'L-proline exchange'));
0138     pos(17) = find(strcmpi(model.rxnNames,'L-serine exchange'));
0139     pos(18) = find(strcmpi(model.rxnNames,'L-threonine exchange'));
0140     pos(19) = find(strcmpi(model.rxnNames,'L-tryptophan exchange'));
0141     pos(20) = find(strcmpi(model.rxnNames,'L-tyrosine exchange'));
0142     pos(21) = find(strcmpi(model.rxnNames,'L-valine exchange'));
0143     pos(22) = find(strcmpi(model.rxnNames,'2''-deoxyadenosine exchange'));
0144     pos(23) = find(strcmpi(model.rxnNames,'2''-deoxyguanosine exchange'));
0145     pos(24) = find(strcmpi(model.rxnNames,'thymidine exchange'));
0146     pos(25) = find(strcmpi(model.rxnNames,'deoxycytidine exchange'));
0147     pos(26) = find(strcmpi(model.rxnNames,'D-glucose exchange'));
0148 end

Generated by m2html © 2005