0001 function [model,pos] = changeMedia(model,c_source,media,anox,flux)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 if nargin<4
0026 anox = false;
0027 if nargin<3
0028 media = 'MIN';
0029 end
0030 end
0031
0032
0033 c_source = [c_source,' exchange'];
0034
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
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 if strcmpi(media,'YEP')
0056 N = 25;
0057 elseif strcmpi(media,'MAA')
0058 N = 21;
0059 elseif strcmpi(media,'MIN')
0060 N = 1;
0061 elseif strcmpi(media,'MIN+His')
0062 N = 1;
0063 model = changeRxnBounds(model,'r_1893',-0.08,'l');
0064 elseif strcmpi(media,'MIN+Arg')
0065 N = 1;
0066 model = changeRxnBounds(model,'r_1879',-0.08,'l');
0067 elseif strcmpi(media,'MIN+Citrate')
0068 N = 1;
0069 model = changeRxnBounds(model,'r_1687',-0.08,'l');
0070 end
0071
0072 b = -0.08;
0073
0074 c = -2;
0075
0076 if nargin < 5
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
0086 for i = 1:N
0087 model.lb(pos(i)) = flux(i);
0088 end
0089
0090 model = setParam(model, 'lb', 'r_1654', -Inf);
0091 model = setParam(model, 'lb', 'r_2100', -Inf);
0092 model = setParam(model, 'lb', 'r_1861', -Inf);
0093 model = setParam(model, 'lb', 'r_1992', -Inf);
0094 model = setParam(model, 'lb', 'r_2005', -Inf);
0095 model = setParam(model, 'lb', 'r_2060', -Inf);
0096 model = setParam(model, 'lb', 'r_1832', -Inf);
0097 model = setParam(model, 'lb', 'r_4593', -Inf);
0098 model = setParam(model, 'lb', 'r_4595', -Inf);
0099 model = setParam(model, 'lb', 'r_4596', -Inf);
0100 model = setParam(model, 'lb', 'r_4597', -Inf);
0101 model = setParam(model, 'lb', 'r_2049', -Inf);
0102 model = setParam(model, 'lb', 'r_4594', -Inf);
0103 model = setParam(model, 'lb', 'r_4600', -Inf);
0104 model = setParam(model, 'lb', 'r_2020', -Inf);
0105
0106 model = setParam(model, 'ub', 'r_1663', 0);
0107 model = setParam(model, 'ub', 'r_4062', 0);
0108 model = setParam(model, 'ub', 'r_4064', 0);
0109
0110
0111 model = setParam(model, 'ub', 'r_2111', Inf);
0112
0113
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