COBRApy is a package for constraint-based modeling of metabolic networks.
Repaired the broken Biomodels Web IO.
model.solver = "osqp"
will now use the hybrid interface and will raise an error in a future release.COBRApy is now compatible with pydantic version 2.
COBRApy is now compatible with the latest numpy versions and pin to a lower version has been removed.
loopless_solution
now fixes the objective to its optimum as in the
originally published method and returns the objective value in the solution object.
Repair a broken test for fix_objective_as_constraint
.
Backwards compatibility for pickled models has been improved.
Fixed an issue where reaction bounds were being overwritten by global model min/max values when writing sbml model to file. See #1300.
Fix an issue where runfrog
does
not work via github actions or local installation by removing the use of obsolete numpy
aliases for float
and bool
.
Fix a bug where installing httpx>=0.24 would break cobrapy IO.
Fix automatic building of the documentation.
Fix an issue where SBML models with a "created" date would break lots of the cobrapy functionality.
Temporary fix of restricting numpy to <1.24 as that release introduces breaking changes both in cobrapy and dependencies
find_external_compartment
flake8
issues and add missing type annotations and docstrings in src/cobra/io
and tests/test_io
(#1212).flake8
issues and enable the check in GitHub Actions Lint workflow (#1272).model.add_reaction()
and replaced remaining usages of it with model.add_reactions()
model.__add__
and model.__iadd__
- use model.merge
to replace them.Model().description()
.Model().get_metabolite_compartments()
.knock_out_model_genes
to simulate knock-outs, setting
reaction bounds of affected reactions to zero and returning a list
of reactions that were knocked-out. Replaces delete_model_genes
and undelete_model_genes
since it is context sensitive.model.copy()
will now correctly copy GPRs.GPR().from_string()
where it was using the unmodified string,
leading to errors with GPR
s that should work. Made GPR
s that have empty
parenthesis fail more comprehensibly.src/cobra/test
to tests
(#1191).GPR
fixes:
test_gpr_wrong_input()
test_gpr_that_needs_two_replacements()
delete_model_genes
, undelete_model_genes
find_gene_knockout_reactions
from delete.py
_find_gene_knockout_reactions_fast
,
_gene_knockout_computation
, _get_removed
from test_delete.py
pymatlib
direct transfer of models to matlab process.
Please use save_matlab_model()
and then read the model in matlab.GPR
.
Reaction.gene_reaction_rule
still returns a string and a string can be assigned
to it that will modify the underlying GPR
instance.Reaction
class has gained another attribute Reaction.gpr
which allows direct
access to the GPR
instance (#1143).