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

PERFORMANCE: create_smoment_model_reaction_wise_with_sbml gets bogged down in recent cobrapy release #28

Open
yaccos opened this issue Jul 12, 2023 · 1 comment

Comments

@yaccos
Copy link
Contributor

yaccos commented Jul 12, 2023

This is an issue I think is due to updates in cobra. With cobra version 0.21.0 create_smoment_model_reaction_wise_with_sbml() runs in a reasonable amount of time. However, once I use an environment with cobra version 0.26.3, the same function consumed a prohibiting amount of time. After drilling into the details, I realized that the time was spent deepcopying metabolic reactions

forward_reaction = copy.deepcopy(reaction)

From my understanding, the autoPACMEN code has not changed on this point, but cobra probably has changed its procedures for copying reactions, leading to a very slow recursive process. As a side note, I have experienced cobrapy to be slow and cumbersome for modifying models and their components. There exist an alternative metabolic modeling package named reframed which I have used to resolve such problems, but due to technological dept, replacing cobra with reframed would take a considerable effort.

@mretier
Copy link

mretier commented Aug 28, 2024

I had the same problem, thanks for pointing this out. It helped me resolve the issue.

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

No branches or pull requests

2 participants