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

User defined constraints #996

Open
wants to merge 80 commits into
base: devel
Choose a base branch
from

Conversation

Hemant27031999
Copy link
Contributor

Description of feature

User Defined Constraint: This new feature from fbc-v3 has been added to COBRApy as well as to JSON and other formats also. A user can now add his own constraints to the model. He can do this even more easily by just passing the constraint expression (for eg. "2v1 - 3v2*v2 +0.4 * v3" where v1, v2 and v3 are either reaction ids to define fluxes or some variable) along with the lower and upper bounds.

Tests

Tests for the functionality has been added along with a new example model.

Note:

  • This PR is build upon the metadata pull request, and should be merged only after that.
  • The libsbml library currently doesn't support fbc-v3, so SBML parser has not been added for it.

@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2020

Codecov Report

Merging #996 into devel will decrease coverage by 2.60%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #996      +/-   ##
==========================================
- Coverage   84.45%   81.84%   -2.61%     
==========================================
  Files          58       65       +7     
  Lines        5036     6220    +1184     
  Branches     1092     1372     +280     
==========================================
+ Hits         4253     5091     +838     
- Misses        508      755     +247     
- Partials      275      374      +99     
Impacted Files Coverage Δ
src/cobra/core/formula.py 25.00% <ø> (ø)
src/cobra/core/metabolite.py 70.65% <ø> (ø)
src/cobra/core/reaction.py 88.02% <ø> (ø)
src/cobra/flux_analysis/deletion.py 93.33% <ø> (ø)
src/cobra/flux_analysis/loopless.py 91.11% <ø> (ø)
src/cobra/flux_analysis/variability.py 92.78% <ø> (ø)
src/cobra/sampling/achr.py 100.00% <ø> (ø)
src/cobra/sampling/optgp.py 96.92% <ø> (ø)
src/cobra/summary/metabolite_summary.py 89.65% <ø> (ø)
src/cobra/summary/model_summary.py 86.66% <ø> (ø)
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad49414...8b2d6dc. Read the comment docs.

@Midnighter
Copy link
Member

It's almost impossible to tell what this PR adds because it includes all of the changes of the other branch. @matthiaskoenig can you open a branch on this repository, please, for the other work and then make a pull request from this branch targetting that new branch?

@cdiener cdiener added the stale The issue or pull request lacks activity. label Sep 1, 2021
@akaviaLab akaviaLab mentioned this pull request May 30, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The issue or pull request lacks activity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants