Skip to content
Open
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
24 changes: 14 additions & 10 deletions ecHumanGEM/scripts/preprocessModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,21 @@
name = [];
end
end
model = removeFields(model);
[grRules, rxnGeneMat] = standardizeGrRules(model);
model.grRules = grRules;
model.rxnGeneMat = rxnGeneMat;
model = removeFields(model);
%find conflicting grRules in model
[~,~,conflicts] = standardizeGrRules(model);
if ~isempty(conflicts)
warning(sprintf('\nConflicting grRules where found for several reactions (check the above lines). GECKO will ignore these grRules to avoid introduction of potentially wrong enzyme constrains for such cases. It is recommended to check your original GEM and fix these grRules manually with the guidance provided by the function "standardizeGrRules.m" in the RAVEN toolbox.\n'))
end
%delete conflicting grRules to avoid weird enzyme constraints
model.grRules(conflicts) = {''};
%Remove gene rules from pseudoreactions (if any):
for i = 1:length(model.rxns)
if endsWith(model.rxnNames{i},' pseudoreaction')
model.grRules{i} = '';
model.rxnGeneMat(i,:) = zeros(1,length(model.genes));
end
end
pseudoRxns = endsWith(model.rxnNames,' pseudoreaction');
model.grRules(pseudoRxns) = {''};
%standardize grRules
[grRules,rxnGeneMat] = standardizeGrRules(model);
model.grRules = grRules;
model.rxnGeneMat = rxnGeneMat;
% Standardizes the metabolites names
model = modifyMetNames(model);

Expand Down