Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. image:: SLIMEr.png
:align: center

Collection of scripts for adding SLIME (Split Lipids Into Measurable Entities) reactions into the genome-scale model of yeast. For more info, refer to the current pre-print: `SLIMEr: probing flexibility of lipid metabolism in yeast with an improved constraint-based modeling framework <https://www.biorxiv.org/content/early/2018/05/21/324863>`__.
Collection of scripts for adding SLIME (Split Lipids Into Measurable Entities) reactions into the genome-scale model of yeast. For more info, refer to the current pre-print: `SLIMEr: probing flexibility of lipid metabolism in yeast with an improved constraint-based modeling framework <https://www.biorxiv.org/content/early/2018/09/14/324863>`__.

Last update: 2018-05-30
Last update: 2018-09-14

This repository is administered by Benjamin J. Sanchez (`@BenjaSanchez <https://github.com/benjasanchez>`__), Division of Systems and Synthetic Biology, Department of Biology and Biological Engineering, Chalmers University of Technology.

Expand All @@ -22,6 +22,7 @@ Dependencies - Recommended Software:

- libSBML MATLAB API (version `5.16.0 <https://sourceforge.net/projects/sbml/files/libsbml/5.16.0/stable/MATLAB%20interface/>`__ is recommended).
- Gurobi Optimizer for MATLAB (version `7.5.2 <http://www.gurobi.com/registration/download-reg>`__ is recommended).
- An `implementation for Matlab <https://github.com/BenjaSanchez/cmaputil/tree/master/cmaputil_matlab>`__ of the `cividis colormap <https://journals.plos.org/plosone/article/comments?id=10.1371/journal.pone.0199239>`__.

Contributors
------------
Expand Down
5 changes: 3 additions & 2 deletions data/convertEjsingData.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% data = convertEjsingData(data,model,condense)
%
% Benjam�n J. S�nchez. Last update: 2018-04-10
% Benjamin J. Sanchez. Last update: 2018-09-09
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function data = convertEjsingData(data_old,model,condense)
Expand Down Expand Up @@ -50,6 +50,7 @@
else
%Only change units to g/gDW:
data = changeUnits(data_old,MWs);
data.molarAbundance = data_old.abundance;
end

%Add missing data: composition and fluxes
Expand Down Expand Up @@ -110,4 +111,4 @@

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 changes: 7 additions & 4 deletions models/changeOtherComp.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% [model,GAMpol] = changeOtherComp(model,data)
%
% Benjam�n J. S�nchez. Last update: 2018-03-30
% Benjamin J. Sanchez. Last update: 2018-09-04
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [model,GAMpol] = changeOtherComp(model,data)
Expand Down Expand Up @@ -71,12 +71,15 @@
compPos = strcmp(comps(:,1),otherData.metIDs{i});
if strcmp(comps{compPos,3},'C')
rxnPos = strcmp(model.rxnNames,'carbohydrate pseudoreaction');
MW = comps{compPos,2}-18;
elseif strcmp(comps{compPos,3},'D')
rxnPos = strcmp(model.rxnNames,'DNA pseudoreaction');
MW = comps{compPos,2}-18;
elseif strcmp(comps{compPos,3},'N')
rxnPos = strcmp(model.rxnNames,'biomass pseudoreaction');
MW = comps{compPos,2};
end
model.S(modelPos,rxnPos) = -otherData.abundance(i)/comps{compPos,2}*1000;
model.S(modelPos,rxnPos) = -otherData.abundance(i)/MW*1000;
end
end

Expand All @@ -97,8 +100,8 @@

%Estimate maintenance belonging to polymerization:
[~,P,C,R,D,~] = sumBioMass(model,comps);
GAMpol = P*37.7 + C*12.8 + R*26.0 + D*26.0; %F�rster 2003 (sup table 8)
GAMpol = P*37.7 + C*12.8 + R*26.0 + D*26.0; %Forster 2003 (sup table 8)

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 changes: 8 additions & 4 deletions models/modelsFromData.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% [model_corrComp,model_SLIMEr,k,GAMpol] = modelsFromData(model,data,scaling)
%
% Benjam�n J. S�nchez. Last update: 2018-03-24
% Benjamin J. Sanchez. Last update: 2018-09-05
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [model_corrComp,model_SLIMEr,k,GAMpol] = modelsFromData(model,data,scaling)
Expand All @@ -12,14 +12,18 @@
%Model with both lipid and chain length constrained to data:
model_SLIMEr = SLIMEr(model,data,true);

%Make abundances be consistent:
%Correct the biomass composition with data:
[model_corrComp,~] = changeOtherComp(model_corrComp,data);
[model_SLIMEr,~] = changeOtherComp(model_SLIMEr,data);

%Make abundances of backbones & chains be consistent:
[model_SLIMEr,k] = scaleAbundancesInModel(model_SLIMEr,data,scaling);
model_corrComp = adjustModel(model_corrComp,k,false,scaling);

%Correct the rest of the composition to be consistent:
%Correct again the biomass composition, to fix the new lipid content:
[model_corrComp,~] = changeOtherComp(model_corrComp,data);
[model_SLIMEr,GAMpol] = changeOtherComp(model_SLIMEr,data);

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 changes: 5 additions & 2 deletions models/scaleAbundancesInModel.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% [model,k] = scaleAbundancesInModel(model,data,scaling)
%
% Benjam�n J. S�nchez. Last update: 2018-03-26
% Benjamin J. Sanchez. Last update: 2018-09-05
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [model,k] = scaleAbundancesInModel(model,data,scaling)
Expand All @@ -14,6 +14,9 @@
krange(1) = fminsearch(@(k) +minScaling(k,model,data,scaling,kOpt),kOpt);
krange(2) = fminsearch(@(k) -minScaling(k,model,data,scaling,kOpt),kOpt);
disp(['Optimality range: k = [ ' num2str(krange(1)) ' , ' num2str(krange(2)) ' ]'])
if(krange(1) == krange(2))
error('Could not find an optimality range!')
end

%Scale with the average of the range:
k = mean(krange);
Expand Down Expand Up @@ -64,4 +67,4 @@

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 changes: 3 additions & 3 deletions models/sumBioMass.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% D -> DNA fraction [g/gDW]
% L -> Lipid fraction [g/gDW]
%
% Benjam�n J. S�nchez. Last update: 2018-03-30
% Benjamin J. Sanchez. Last update: 2018-09-04
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [X,P,C,R,D,L] = sumBioMass(model,comps)
Expand Down Expand Up @@ -57,7 +57,7 @@
for i = 1:length(model.mets)
pos = strcmp(comps(:,1),model.mets{i});
if sum(pos) == 1
abundance = -model.S(i,fractionPos)*comps{pos,2}/1000;
abundance = -model.S(i,fractionPos)*(comps{pos,2}-18)/1000;
F = F + abundance;
end
end
Expand All @@ -66,4 +66,4 @@

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Loading