Skip to content

Develop#2655

Merged
farid-zare merged 81 commits into
masterfrom
develop
May 8, 2026
Merged

Develop#2655
farid-zare merged 81 commits into
masterfrom
develop

Conversation

@farid-zare
Copy link
Copy Markdown
Collaborator

Please include a short description of enhancement here

I hereby confirm that I have:

  • Tested my code on my own machine
  • Followed the guidelines in the Contributing Guide
  • Selected develop as a target branch (top left drop-down menu)

(Note: You may replace [ ] with [X] to check the box)

PkiwiBird and others added 30 commits March 7, 2026 21:45
…in getObjectiveSense and buildOptProblemFromModel
…s = true and the number of samples is lower than 5. An extensive explanation is given on why the error is thrown and how best to move forward
…correlations, but also the associated 95% confidence intervals and p-values for each flux-taxon combination
Updated agent guidelines and preferred solver order.
model.d can represent the RHS of additional constraints
- adapt for use of arguments extraVarRelax and extraConstraintRelax
marouenbg and others added 24 commits April 22, 2026 12:44
…solver swap

- size(LPProblem.A) returned a 2-vector, then csense(1:nMet,1)='E' used
  it as a length, producing an incorrectly sized csense. Use
  size(LPProblem.A, 1).
- Apply cpxControl.tune.{timelimit,repeat,display} only after
  contFunctName has been resolved into a struct. The previous code
  assigned .tune fields onto contFunctName before checking its type, so
  passing a function-name string (the documented alternative) crashed.
- Permanent global side-effect: changeCobraSolver('ibm_cplex') silently
  switched the user's configured LP solver during availability probing.
  Restore the previous CBT_LP_SOLVER after the check.
- Pre-allocate b_L/b_U as -inf/+inf vectors of the correct length so
  rows whose csense character is missing get well-defined bounds rather
  than undefined trailing zeros.
- Wrap the CPLEX init failure as a typed MException with the original
  exception attached via addCause (was: bare error, original cause lost).
- Replace eval-based dotted-path read/write of CPLEX params with
  helpers using setfield/getfield (no eval, no silent injection risk).
- Treat empty contFunctName as struct() rather than [] so the function
  always returns a struct as documented.
- Convert silent 'Optimisation failed.' fprintf into a proper warning
  with an identifier (tuneParam:tuneFailed).
…er under the conditions of apptainer being accessible or not from within matlab environemt, makedb has been changed to warn on volume unavailability rather exit, apptainer definition file added to create container
Updated function documentation and comments for clarity.
Updated function documentation and improved argument handling for bio_draw_by_rxn.
Updated function documentation and improved input handling.
Updated the findNearRxns function to improve documentation and clarify input/output parameters.
Paint4Net Update - Resubmitted
Apptainer update for Persephone
Address Codex review (PR #2652): when LPProblem.csense was present but
empty (e.g. ''), the bounds branch was skipped, leaving every row at
[-inf, +inf] and silently tuning a free LP. Treat empty csense the same
as a missing csense (default to equality, matching existing behaviour),
and error out when csense length disagrees with size(A,1).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
replace inf bounds before setting param.maxUB to avoid unbounded solution
Persephone pipeline: Clarified output descriptions and new error check
fix(tuneParam): correct csense sizing, safer arg handling, no global solver swap
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a378bea221

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +941 to +942
modelFitted.evarlb = model.evarlb - p_e;
modelFitted.evarub = model.evarub + q_e;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard extra-variable fields in allConstraints path

In allConstraints mode this code unconditionally reads model.evarlb/model.evarub, but nExt can be zero when the model has only flux variables (the mode is documented as supporting flux variables and/or extra variables). In that common case, models do not define evarlb/evarub, so this throws a "Reference to non-existent field" error before relaxation can complete. Please gate these assignments behind nExt > 0 (or initialize empty extra-variable fields) so flux-only models do not crash.

Useful? React with 👍 / 👎.

else
model.c=zeros(n,1);
% Stage 1: L2 min-norm via solveCobraLPCPLEX to get candidate blocked reactions
tol = 1e-10;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use solver tolerance for L2 blocked-reaction screening

The L2 path now hard-codes tol = 1e-10, and that tolerance is used to form the FVA candidate set (abs(solution.full) < tol). If the QP/L2 solution has routine numerical noise above 1e-10 for truly blocked reactions, those reactions are excluded from candidateRxns and never checked by FVA, creating false negatives. This regresses robustness versus the previous solver-driven tolerance behavior; use solver feasibility/int tolerance (or a configurable tolerance) for candidate screening.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Summary:

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️
257 222 0 35

Failed Tests:

No failed tests ✨

Github Test Reporter by CTRF 💚

marouenbg and others added 2 commits May 7, 2026 12:17
Codex P1 on #2651: the previous exclusion check
asserted that no arc weight matched any excluded reaction's flux
magnitude. In ecoli_core_model many non-excluded reactions share the
biomass reaction's |v| (e.g. 0.87392), so the assertion is unstable
across models and solvers and can produce false negatives.

Replace it with a multiset comparison: replicate writePajekNet's
filtering (biomass / objective name match, model.c != 0, |v| < fluxTol,
demand/sink) to build the expected (src, dst, weight) arc list, parse
the file's actual arcs, sort both, and assert equality. This validates
exclusion by reaction identity and additionally catches missing arcs,
swapped src/dst, and wrong weights. Expected weights are round-tripped
through writePajekNet's '%g' format so the comparison is exact.

Also closes a small gap in the previous test, which only matched
'biomass' in reaction names; now matches 'objective' as well, aligning
with writePajekNet's own logic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(writePajekNet): directed Pajek output, tolerance filter, robust filtering & checks
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Summary:

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️
257 222 0 35

Failed Tests:

No failed tests ✨

Github Test Reporter by CTRF 💚

@farid-zare farid-zare merged commit ecacd0a into master May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants