Skip to content

Commit f503a79

Browse files
committed
QP objective check bypassed for large v
1 parent e8ef0bc commit f503a79

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

.gitattributes

+29-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22
*.html linguist-vendored=true
33
*.gms linguist-vendored=true
44

5-
*.mat -crlf -diff -merge
6-
*.mlx -crlf -diff -merge
7-
*.xlsx -crlf -diff -merge
5+
## https://nl.mathworks.com/help/matlab/matlab_prog/set-up-git-source-control.html#buhx2d6-1_3
6+
*.fig binary
7+
*.mat binary
8+
*.mdl binary
9+
*.mdlp binary
10+
*.mexa64 binary
11+
*.mexw64 binary
12+
*.mexmaci64 binary
13+
*.mlapp binary
14+
*.mldatx binary
15+
*.mlproj binary
16+
*.mlx binary
17+
*.p binary
18+
*.sfx binary
19+
*.sldd binary
20+
*.slreqx binary
21+
*.slmx binary
22+
*.sltx binary
23+
*.slxc binary
24+
*.slx binary merge=mlAutoMerge
25+
*.slxp binary
26+
27+
## Other common binary file types
28+
*.docx binary
29+
*.exe binary
30+
*.jpg binary
31+
*.pdf binary
32+
*.png binary
33+
*.xlsx binary

src/base/solvers/solveCobraQP.m

+5-5
Original file line numberDiff line numberDiff line change
@@ -1072,11 +1072,11 @@
10721072
if ~isempty(solution.full)
10731073
%set the value of the objective
10741074
solution.obj = c'*solution.full + 0.5*solution.full'*F*solution.full;
1075-
if norm(solution.obj - f) > getCobraSolverParams('LP', 'feasTol')*100
1076-
warning('solveCobraQP: Objectives do not match. Switch to a different solver if you rely on the value of the optimal objective.')
1077-
fprintf('%s\n%g\n%s\n%g\n%s\n%g\n',['The optimal value of the objective from ' solution.solver ' is:'],f, ...
1078-
'while the value constructed from c''*x + 0.5*x''*F*x:', solution.obj,...
1079-
'while the value constructed from osense*(c''*x + x''*F*x) :', osense*(c'*solution.full + solution.full'*F*solution.full))
1075+
%expect some variability if the norm of the optimal flux vector is large
1076+
%TODO how to scale this
1077+
if norm(solution.obj - f) > getCobraSolverParams('LP', 'feasTol')*100 && norm(solution.full)<1e2
1078+
warning('solveCobraQP: Objectives do not match. Rescale problem if you rely on the exact value of the optimal objective.')
1079+
fprintf('%s%g\n','The difference between the optimal value of the solver objective and objective from c''*x + 0.5*x''*F*x is: ' ,f - solution.obj)
10801080
end
10811081
else
10821082
solution.obj = NaN;

src/dataIntegration/transcriptomics/preprocessing/selectGeneFromGPR.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
% OUTPUTS:
2626
% expressionCol: reaction expression, corresponding to model.rxns.
2727
% No gene-expression data and orphan reactions will
28-
% be given a value of -1.
28+
% be given a value of NaN.
2929
% gene_used: gene identifier, corresponding to model.rxns, from GPRs
3030
% whose value (expression and/or significance) was chosen for that
3131
% reaction

0 commit comments

Comments
 (0)