Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: save ec model xml #361

Merged
merged 2 commits into from
Jan 18, 2024
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
6 changes: 3 additions & 3 deletions src/geckomat/utilities/saveEcModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function saveEcModel(ecModel,filename,modelAdapter)

switch filename(end-3:end)
case {'.xml','sbml'}
exportModel(ecModel,[filename '.xml']);
exportModel(ecModel, filename);
%Convert notation "e-005" to "e-05 " in stoich. coeffs. to avoid
%inconsistencies between Windows and MAC:
copyfile([filename '.xml'],'backup.xml')
copyfile(filename,'backup.xml')
fin = fopen('backup.xml', 'r');
fout = fopen([filename '.xml'], 'w');
fout = fopen(filename, 'w');
still_reading = true;
while still_reading
inline = fgets(fin);
Expand Down
4 changes: 2 additions & 2 deletions tutorials/light_ecModel/protocol.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
% STEP 26 Merge BRENDA and DLKcat derived values
kcatList_merged = mergeDLKcatAndFuzzyKcats(kcatList_DLKcat, kcatList_fuzzy);

% STEP 27 Implement kcat avlues into model.ec.kcat
% STEP 27 Implement kcat values into model.ec.kcat
ecModel = selectKcatValue(ecModel,kcatList_merged);

% STEP 28
Expand All @@ -96,7 +96,7 @@
% -standardMW/standardKcat as the stoiciometric coefficient.
[ecModel, rxnsMissingGPR, standardMW, standardKcat] = getStandardKcat(ecModel);

% STEP 31 Apply kcat avlues to S-matrix
% STEP 31 Apply kcat values to S-matrix
% In light ecModels the kcat values are also kept in ecModels.ec.kcat, and
% only after running applyKcatConstraints are these introduced in the
% ecModel.S matrix. In constrast to full ecModels, the applyKcatConstraints
Expand Down