Closed hariszaf closed 8 months ago
Hey, @hariszaf, thanks a lot for this PR!
Could you plz add one unit-test per new function to check for correctness? e.g., load a model that you know the medium and inter-medium reactions and check if the new functions find them correctly.
@TolisChal here's a test for editing a reaction that is already part of the medium.
The user will be able to edit the medium with reactions that are included in the model.exchanges
list.
If they need to add a new reaction, then it would be better to do so using cobra
and once they have the model as they want, the can use the dingo.MetabolicNetwork.from_cobra_model()
.
That's probably something that we should add on the tutorial too.
Aim of this PR is to address issues #74 and #75 .
The
MetabolicNetwork
class has been modified now it keeps the exchange reactions of a model asmodel.exchanges
and its medium asmodel.medium
.The user may modify the medium as in cobra.
On top of that,
dingo
can also now build a dingo-model based on a cobra-model. For example:This allows for further modifications of the model, e.g. adding reactions, through the convenient interface of cobra and an easier integration with dingo.