Skip to content

Debug function 'createDummyModel' #2457

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

Merged
merged 2 commits into from
Apr 1, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@
end


if isequal(modelExtractionAlgorithm, 'fastCore') && 0
if isequal(modelExtractionAlgorithm, 'fastCore') %&& 0
paramConsistency.epsilon = fluxEpsilon;
paramConsistency.method = 'fastcc';
[fluxConsistentMetBoolOrig, fluxConsistentRxnBoolOrig] = findFluxConsistentSubset(model, paramConsistency, 2);
if any(~fluxConsistentMetBoolOrig) || any(~fluxConsistentRxnBoolOrig)
warning('%6u\t%6u\t%s\n', nnz(~fluxConsistentMetBoolOrig), nnz(~fluxConsistentRxnBoolOrig),' flux inconsistent metabolites and reactions in input model.')
end

[~, ~, ~, ~, ~, ~, model, stoichConsistModel] = findStoichConsistentSubset(model, ...
0, 0, [], 1e-6 * 10);

end

%any zero rows or columns are considered inconsistent
Expand Down Expand Up @@ -344,14 +348,16 @@
end

if any(~fluxConsistentMetBool) || any(~fluxConsistentRxnBool)

fluxInConsistentRxn = model.rxns(~fluxConsistentRxnBool);
fprintf('%s\n',[int2str(nnz(~fluxConsistentRxnBool)) ' flux inconsistent reaction(s) after dummy model creation, removed:'])
disp(model.rxns(~fluxConsistentRxnBool))

fluxConsistentRxnBool(~fluxConsistentRxnBool ) = 0;

model.S = model.S(fluxConsistentMetBool,fluxConsistentRxnBool);
model.b = model.b(fluxConsistentMetBool,1);
model.csense = model.csense(fluxConsistentMetBool,1);
model.mets = model.mets(fluxConsistentMetBool);
model.rxns = model.rxns(fluxConsistentRxnBool);
model.rxnNames = model.rxnNames(fluxConsistentRxnBool);
model.lb = model.lb(fluxConsistentRxnBool);
Expand Down