Closed johan-gson closed 12 months ago
@edkerk would be good if you could take a look at this, I think you introduced this new code? I am very short on time right now. Replacing with the old code could be an intermediate fix that goes pretty quickly to do.
The linked PR solves the issue with NaN.
Regarding the growth rate difference (0.1428 for light and 0.1443 for full), this is irrespective of whether the old or new applyKcatConstraints
implementation is used. The unsimilar growth rate is contradicting the comparison that is shown by running tutorials\full_ecModel\code\plotlightVSfull.m
.
The difference is that the tutorial compares light and full ecModels of the realistically constrained yeast-GEM
, while the code here uses the not-contextualized human-GEM
which has many open exchange reactions. While not thoroughly reviewed, I anticipate that these unrealistic constraints on exchange reactions causes the difference between the two model formats.
Yep, difficult to tell if this is just because the accuracy of the solver causes problems somehow, or if there is a bug somewhere in the code. A way to test it may be to experiment with closing all but the minimum exchange reactions and see if it matters. It could also be that there are some very small fluxes somewhere in the model and that this is something that doesn't happen in Yeast-GEM. But would be good to sort it out. The problem could be either in the light or in the full - if it is a solver issue it is more likely in the full, numerical issues were the reason I created the light in the first place. It should be better now since we rescaled things, but it would be good to figure out. We could also just check the magnitude of all fluxes in light and full and see if there are any really small ones, like < 10^-9.
Yep, difficult to tell if this is just because the accuracy of the solver causes problems somehow, or if there is a bug somewhere in the code. A way to test it may be to experiment with closing all but the minimum exchange reactions and see if it matters. It could also be that there are some very small fluxes somewhere in the model and that this is something that doesn't happen in Yeast-GEM. But would be good to sort it out. The problem could be either in the light or in the full - if it is a solver issue it is more likely in the full, numerical issues were the reason I created the light in the first place. It should be better now since we rescaled things, but it would be good to figure out. We could also just check the magnitude of all fluxes in light and full and see if there are any really small ones, like < 10^-9.
I also imagine that it is because of numerical issues, but it is hard to investigate if so many exchange reactions are open. Setting realistic flux constraints is not trivial though. If we have a case to check this it would be good to revisit, in a separate Issue. The current Issue of the NaN values is resolved.
Description of the bug:
The following code (see below) exposes two problems:
Reproducing these results:
Run this - the growth rate is way too low for light
If I replace the following code with the previous implementation (see below), it works as it should, the growth rates are close to identical.
current (that doesn't work):
old code (that works, but is slower):
System information
I hereby confirm that:
main
branch of the repository.