Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-sysbio authored Feb 28, 2022
2 parents 041ad02 + 441bc5b commit 14d2bb0
Show file tree
Hide file tree
Showing 12 changed files with 20,406 additions and 18,194 deletions.
12 changes: 6 additions & 6 deletions code/addBoundaryMets.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
% add a boundary compartment to the model if it does not yet exist
if ~ismember('boundary',lower(model.compNames))
model.compNames(end+1) = {'Boundary'};
if ismember('x',model.comps)
error('Consider renaming the "x" compartment, or modify this function to use another letter.');
if ismember('b',model.comps)
error('Consider renaming the "b" compartment, or modify this function to use another letter.');
else
model.comps(end+1) = {'x'};
model.comps(end+1) = {'b'};
end
end

Expand Down Expand Up @@ -94,17 +94,17 @@
% metabolite, with the compartment replaced.
[~,ref_met_ind] = ismember(add_bound_mets,model.metNames);
if all(endsWith(model.mets,']'))
add_bound_met_IDs = regexprep(model.mets(ref_met_ind),'\[.\]$','[x]');
add_bound_met_IDs = regexprep(model.mets(ref_met_ind),'\[.\]$','[b]');
elseif any(endsWith(model.mets,']'))
error('All metabolite IDs must use the same format for describing the compartment.');
else
add_bound_met_IDs = regexprep(model.mets(ref_met_ind),'.$','x');
add_bound_met_IDs = regexprep(model.mets(ref_met_ind),'.$','b');
end

% add new boundary mets to the model
metsToAdd.mets = add_bound_met_IDs;
metsToAdd.metNames = add_bound_mets;
metsToAdd.compartments = 'x';
metsToAdd.compartments = 'b';
metsToAdd.unconstrained = ones(size(add_bound_mets));
new_model = addMets(model,metsToAdd);

Expand Down
3 changes: 0 additions & 3 deletions code/io/importYaml.m
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,6 @@
[~, metIdx] = ismember(model.mets, newMets);
model.S = S(metIdx, :);

% Now the `unconstrained` field is abandoned in HumanGEM
%model.unconstrained = double(endsWith(model.mets, 'x'));

if ~silentMode
fprintf(' Done!\n');
end
Expand Down
44 changes: 44 additions & 0 deletions code/modelCuration/changeCompAbbrevs.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
% script to change model compartment abbreviations
% Extracellular: s -> e
% Boundary: x -> b
% Peroxisome: p -> x

% specify model name
modelname = 'Human-GEM';

% load model and other data files
model = importYaml(fullfile('..', '..', 'model', [modelname '.yml']));
metAssoc = importTsvFile(fullfile('..', '..', 'model', 'metabolites.tsv'));
metAssoc_table = struct2table(metAssoc);
metsDep = importTsvFile(fullfile('..', '..', 'data', 'deprecatedIdentifiers', 'deprecatedMetabolites.tsv'));
metsDep_table = struct2table(metsDep);

% update comps field
model.comps(ismember(model.compNames, 'Extracellular')) = {'e'};
model.comps(ismember(model.compNames, 'Peroxisome')) = {'x'};

% update mets field
model.mets = regexprep(model.mets, 's$', 'e');
model.mets = regexprep(model.mets, 'p$', 'x');

% copy deprecated metabolites to deprecated metabolite table
dep_ind = endsWith(metAssoc.mets, {'s', 'p'});
metsDep_table = [metsDep_table; metAssoc_table(dep_ind, :)];

% update the metabolite compartments in the annotation file
metAssoc.mets = regexprep(metAssoc.mets, 's$', 'e');
metAssoc.mets = regexprep(metAssoc.mets, 'p$', 'x');

% export the new model and files
exportYaml(model, fullfile('..', '..', 'model', [modelname '.yml']));
exportTsvFile(metAssoc, fullfile('..', '..', 'model', 'metabolites.tsv'));
exportTsvFile(metsDep_table, fullfile('..', '..', 'data', 'deprecatedIdentifiers', 'deprecatedMetabolites.tsv'));


% other tasks to do in addition to running this script:
% - replace all instances of [s], [x], [p], with [e], [b], [x],
% respectively, in all metabolic task files
% - replace the use of "x" with "b" in the addBoundaryMets function



2,173 changes: 2,173 additions & 0 deletions data/deprecatedIdentifiers/deprecatedMetabolites.tsv

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions data/deprecatedIdentifiers/deprecatedReactions.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ rxns rxnKEGGID rxnBiGGID rxnEHMNID rxnHepatoNET1ID rxnREACTOMEID rxnRecon3DID rx
"MAR09577" "R00162" "" "" "" "" "HMR_9577" "MNXR106414" "HMR_9577" "RCR14832" "" 0 "" "" "HMR_9577"
"MAR09578" "R00164" "" "" "" "" "HMR_9578" "MNXR106415" "HMR_9578" "RCR14833" "" 0 "" "" "HMR_9578"
"MAR09579" "R03632" "" "" "" "" "HMR_9579" "MNXR108312" "HMR_9579" "RCR11010" "" 0 "" "" "HMR_9579"
"MAR07262" "" "DOLICHOL_Lter" "" "" "" "" "MNXR97703" "HMR_7262" "RCR20987" "" 0 "" "" "HMR_7262"
"MAR11269" "" "" "" "" "" "ELAIDCRNtr" "" "" "" "" 0 "" "" "ELAIDCRNtr"
"MAR11275" "" "" "" "" "" "PCRNtr" "" "" "" "" 0 "" "" "PCRNtr"
"MAR11273" "" "" "" "" "" "LNLCCRNtr" "" "" "" "" 0 "" "" "LNLCCRNtr"
"MAR08639" "" "" "" "" "" "HMR_8639" "" "HMR_8639" "RCR21087" "" 0 "" "" "HMR_8639"
102 changes: 51 additions & 51 deletions data/metabolicTasks/metabolicTasks_CellfieConsensus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
ADP[c] 2 2 ATP[c] 2 2
Pi[c] 2 2 NADH[c] 2 2
H2O[c] 2 2
7 Reactive oxygen species detoxification (H2O2 to H2O) H2O2[s] 2 2 H2O[s] 2 2
O2[s] 1 1
7 Reactive oxygen species detoxification (H2O2 to H2O) H2O2[e] 2 2 H2O[e] 2 2
O2[e] 1 1
8 Presence of the thioredoxin system through the thioredoxin reductase activity H+[c] 1 1 NADP+[c] 1 1
NADPH[c] 1 1 thioredoxin[c] 1 1
oxidized thioredoxin[c] 1 1
Expand Down Expand Up @@ -135,16 +135,16 @@
21 3'-Phospho-5'-adenylyl sulfate synthesis sulfate[c] 1 1 PAPS[c] 1 1
ATP[c] 2 2 ADP[c] 1 1
H+[c] 1 1 PPi[c] 1 1
22 Degradation of adenine to urate adenine[c] 1 1 urate[s] 1 1
22 Degradation of adenine to urate adenine[c] 1 1 urate[e] 1 1
H2O[c] 2 2 NH4+[c] 1 1
H+[c] 1 1 H2O2[s] 2 2
O2[s] 2 2 ribose-1-phosphate[c] 1 1
H+[c] 1 1 H2O2[e] 2 2
O2[e] 2 2 ribose-1-phosphate[c] 1 1
PRPP[c] 1 1 PPi[c] 1 1
H2O[s] 2 2
23 Degradation of guanine to urate guanine[c] 1 1 urate[s] 1 1
H2O[s] 1 1 NH4+[c] 1 1
H2O[c] 1 1 NADH[s] 1 1
NAD+[s] 1 1 H+[s] 0 1
H2O[e] 2 2
23 Degradation of guanine to urate guanine[c] 1 1 urate[e] 1 1
H2O[e] 1 1 NH4+[c] 1 1
H2O[c] 1 1 NADH[e] 1 1
NAD+[e] 1 1 H+[e] 0 1
24 Degradation of cytosine cytosine[c] 1 1 beta-alanine[c] 1 1
H2O[c] 3 3 CO2[c] 1 1
H+[c] 3 3 NH4+[c] 2 2
Expand Down Expand Up @@ -456,7 +456,7 @@
H+[c] 2 2
2-oxobutyrate[c] 1 1
NH4+[c] 1 1
82 Cysteine degradation cysteine[s] 1 1 H2O[c]
82 Cysteine degradation cysteine[e] 1 1 H2O[c]
O2[c] ATP[c]
Pi[c] CO2[c]
ADP[c] NH4+[c]
Expand Down Expand Up @@ -583,12 +583,12 @@
AKG[m] 1 1 H2O[m] 1 1
H+[m] 1 1 NADP+[m] 1 1
NADPH[m] 1 1
107 Conversion of lysine to L-2-Aminoadipate lysine[s] 1 1 L-2-aminoadipate[c] 1 1
H2O[s] 2 2 H2O2[s] 2 2
O2[s] 2 2 NH4+[s] 1 1
NADH[s] 1 1 H+[c] 1 1
NAD+[c] 1 1 NAD+[s] 1 1
H+[s] 0 1 NADH[c] 1 1
107 Conversion of lysine to L-2-Aminoadipate lysine[e] 1 1 L-2-aminoadipate[c] 1 1
H2O[e] 2 2 H2O2[e] 2 2
O2[e] 2 2 NH4+[e] 1 1
NADH[e] 1 1 H+[c] 1 1
NAD+[c] 1 1 NAD+[e] 1 1
H+[e] 0 1 NADH[c] 1 1
108 Methionine degradation methionine[c] 1 1 cysteine[c] 1 1
serine[c] 1 2 propanoyl-CoA[c] 1 1
ATP[c] 2 2 ATP[m] 1 1
Expand Down Expand Up @@ -996,70 +996,70 @@
CoA[c] 1 1 PPi[c] 4 4
HCO3-[c] 7 7 H+[m] 8
H+[c] 8
167 Taurochenodeoxycholate synthesis cholesterol[r] 1 1 taurochenodeoxycholate[s] 1 1
taurine[s] 1 1 propanoyl-CoA[s] 1 1
CoA[s] 1 1 AMP[s] 1 1
ATP[s] 1 1 PPi[s] 1 1
167 Taurochenodeoxycholate synthesis cholesterol[r] 1 1 taurochenodeoxycholate[e] 1 1
taurine[e] 1 1 propanoyl-CoA[e] 1 1
CoA[e] 1 1 AMP[e] 1 1
ATP[e] 1 1 PPi[e] 1 1
O2[r] 1 1 NADP+[m] 3 3
O2[s] 1 1 NADP+[r] 1 1
O2[e] 1 1 NADP+[r] 1 1
O2[m] 3 3 NADH[r] 1 1
NAD+[r] 1 1 NADP+[c] 1 1
H+[c] 2 2 NAD+[c] 1 1
H+[m] 2 2 H2O[m] 3 3
NADH[c] 1 1 H2O[r] 1 1
NADPH[c] 1 1 H2O[s] 1 1
NADPH[c] 1 1 H2O[e] 1 1
NADPH[m] 3 3
NADPH[r] 1 1
168 Glycochenodeoxycholate synthesis cholesterol[r] 1 1 glycochenodeoxycholate[s] 1 1
glycine[s] 1 1 propanoyl-CoA[s] 1 1
ATP[s] 1 1 AMP[s] 1 1
FADH2[s] 1 1 PPi[s] 1 1
CoA[s] 1 1 FAD[s] 1 1
168 Glycochenodeoxycholate synthesis cholesterol[r] 1 1 glycochenodeoxycholate[e] 1 1
glycine[e] 1 1 propanoyl-CoA[e] 1 1
ATP[e] 1 1 AMP[e] 1 1
FADH2[e] 1 1 PPi[e] 1 1
CoA[e] 1 1 FAD[e] 1 1
NADPH[r] 1 1 H2O[r] 1 1
NADPH[c] 1 1 H2O[s] 3 3
NADPH[c] 1 1 H2O[e] 3 3
NADPH[m] 3 3 H2O[m] 5 5
NADPH[s] 1 1 NADP+[r] 1 1
NAD+[r] 1 1 NADP+[s] 1 1
NADPH[e] 1 1 NADP+[r] 1 1
NAD+[r] 1 1 NADP+[e] 1 1
NADH[c] 1 1 NADP+[c] 1 1
H+[m] 2 2 NADP+[m] 3 3
H+[s] 1 1 NADH[r] 1 1
H+[e] 1 1 NADH[r] 1 1
H+[c] 2 2 NAD+[c] 1 1
O2[m] 3 3
O2[r] 1 1
O2[s] 2 2
169 tauro-cholate synthesis cholesterol[r] 1 1 taurocholate[s] 1 1
taurine[s] 1 1 propanoyl-CoA[s] 1 1
CoA[s] 1 1 AMP[s] 1 1
ATP[s] 1 1 PPi[s] 1 1
FADH2[s] 1 1 FAD[s] 1 1
O2[e] 2 2
169 tauro-cholate synthesis cholesterol[r] 1 1 taurocholate[e] 1 1
taurine[e] 1 1 propanoyl-CoA[e] 1 1
CoA[e] 1 1 AMP[e] 1 1
ATP[e] 1 1 PPi[e] 1 1
FADH2[e] 1 1 FAD[e] 1 1
NADPH[r] 1 4 NADPH[m] 1 2
NADPH[s] 1 1 NADP+[r] 1 1
NADPH[e] 1 1 NADP+[r] 1 1
NADPH[m] 0 2 NADP+[c] 1 2
NADPH[c] 0 1 NADP+[m] 2 2
NADH[c] 1 1 NADP+[s] 1 1
NADH[c] 1 1 NADP+[e] 1 1
NADP+[m] 0 1 NAD+[c] 1 1
O2[r] 2 2 H2O[m] 2 2
O2[m] 2 2 H2O[r] 2 2
O2[s] 2 2 H2O[s] 3 3
O2[e] 2 2 H2O[e] 3 3
H+[r] 1 1
H+[c] 2 2
H+[s] 1 1
170 glyco-cholate synthesis cholesterol[r] 1 1 glycocholate[s] 1 1
glycine[s] 1 1 propanoyl-CoA[s] 1 1
ATP[s] 1 1 AMP[s] 1 1
FADH2[s] 1 1 PPi[s] 1 1
CoA[s] 1 1 FAD[s] 1 1
H+[e] 1 1
170 glyco-cholate synthesis cholesterol[r] 1 1 glycocholate[e] 1 1
glycine[e] 1 1 propanoyl-CoA[e] 1 1
ATP[e] 1 1 AMP[e] 1 1
FADH2[e] 1 1 PPi[e] 1 1
CoA[e] 1 1 FAD[e] 1 1
NADPH[r] 1 1 NADP+[m] 1 1
NADPH[s] 1 1 NADP+[r] 1 1
NADPH[e] 1 1 NADP+[r] 1 1
NADPH[m] 1 1 NADP+[c] 1 1
NADPH[c] 1 1 NADP+[s] 1 1
NADPH[c] 1 1 NADP+[e] 1 1
NADH[c] 1 1 NAD+[c] 1 1
H+[r] 1 1 H2O[m] 2 2
H+[s] 1 1 H2O[s] 3 3
H+[e] 1 1 H2O[e] 3 3
H+[c] 2 2 H2O[r] 2 2
O2[r] 2 2
O2[m] 2 2
O2[s] 2 2
O2[e] 2 2
171 Synthesis of thromboxane from arachidonate arachidonate[r] 1 1 thromboxane A2[r] 1 1
O2[r] 2 2 H2O[r] 1 1
NADPH[r] 1 1 NADP+[r] 1 1
Expand Down
Loading

0 comments on commit 14d2bb0

Please sign in to comment.