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

Nondefault settings #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Nondefault settings #3

wants to merge 5 commits into from

Conversation

hgscott
Copy link

@hgscott hgscott commented Nov 1, 2024

Closes #2.

Here I wanted to extend the functions to work with any model and metabolites other than just glucose, acetate, and biomass, to make it easier to extend simulations to multi-species.

I was a little unsure of the best way to do this.
I added the arguments for dfba_config to get_single_dfba_spec so that a user running get_single_dfba_spec can change the config section of the dfba config returned by get_single_dfba_spec.

I added an example of this to demo/particle_comets.ipynb that runs the full genome-scale model of E. coli, and keeps track of Glucose, Acetate, CO2, and Biomass.

@hgscott hgscott requested a review from eagmon November 1, 2024 17:54
@hgscott hgscott linked an issue Nov 1, 2024 that may be closed by this pull request
Avoids local file paths
kinetic_params=None,
biomass_reaction="Biomass_Ecoli_core",
substrate_update_reactions=None,
biomass_identifier="biomass", # TODO: How do we differentiate between biomass between models? Do we need to change the biomass identifier to be unique for each model?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question. I did not make this compatible with multi-species dFBA yet, so this one assumes one model. so let's put this on the TODOs. Should be pretty easy.

kinetic_params = {"glucose": (0.5, 1), "acetate": (0.5, 2)}
# TODO: Look for the biomass reaction in the model, so it doesn't have to be specified
# if biomass_reaction is None:
# biomass_reaction = get_biomass_reaction(model_file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. There's plenty of room for more automated extraction of relevant information with different COBRA functions.

Copy link
Member

@eagmon eagmon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hgscott Great comments on the code. Let's go through these when we meet. Many of them point to the lack of multi-species/multi-model dFBA. I plan to follow roughly the same pattern used in the pure Python version: https://github.com/eagmon/notebook_tests/blob/main/comets.ipynb

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

Successfully merging this pull request may close these issues.

Generalize dFBA to run with any model/metabolites
2 participants