-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
20,406 additions
and
18,194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
2,173
data/deprecatedIdentifiers/deprecatedMetabolites.tsv
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.