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

"Reaction R_EX_M_h2o_e_pool not found" error #23

Open
jdwinkler-lanzatech opened this issue Jun 25, 2021 · 3 comments
Open

"Reaction R_EX_M_h2o_e_pool not found" error #23

jdwinkler-lanzatech opened this issue Jun 25, 2021 · 3 comments

Comments

@jdwinkler-lanzatech
Copy link

Hi,

I'm trying to run SMETANA on a collection of Gapseq generated models using the following settings:

  • Mode: detailed
  • aerobic: False
  • Solver: Gurobi 9.2.1

No specified media. When I attempt to run the analysis, I get the following error:

Traceback (most recent call last):
  File "C:/repos/lt-community-modeling/communities/generate_report_artifacts.py", line 1127, in <module>
    threads=2)
  File "C:/repos/lt-community-modeling/communities/generate_report_artifacts.py", line 1098, in execute_site_analysis
    output_directory=os.path.join(output_base_directory, 'smetana'))
  File "C:\repos\lt-community-modeling\communities\consortia\analysis\smetana_analysis.py", line 167, in run_smetana_analysis
    aerobic=False,)
  File "C:\repos\lt-community-modeling\venv\lib\site-packages\smetana\interface.py", line 360, in main
    medium_id, env = define_environment(medium, media_db, community, mode, aerobic, verbose, min_mol_weight, use_lp)
  File "C:\repos\lt-community-modeling\venv\lib\site-packages\smetana\interface.py", line 127, in define_environment
    use_lp=use_lp, max_uptake=max_uptake)
  File "C:\repos\lt-community-modeling\venv\lib\site-packages\smetana\smetana.py", line 380, in minimal_environment
    community.merged.set_flux_bounds("R_EX_M_h2o_e_pool", -inf, inf)
  File "C:\repos\lt-community-modeling\venv\lib\site-packages\reframed\core\cbmodel.py", line 353, in set_flux_bounds
    raise KeyError(f"Reaction {r_id} not found")
KeyError: 'Reaction R_EX_M_h2o_e_pool not found'

I gather that this error is occurring because of a missing reaction in the synthesized community model, but I am unsure how to fix it. Do you have any suggestions about the possible root cause and what I can change on my end? I can specify a media to avoid this issue if necessary.

@cdanielmachado
Copy link
Owner

cdanielmachado commented Jun 30, 2021

I guess the models created with gapseq do not include a water exchange reaction.

I created a quick fix in reframed so it will ignore that case. You will need to update directly from the repository.

pip uninstall reframed
pip install https://github.com/cdanielmachado/reframed/archive/refs/heads/master.zip

Please let me know if this works.

@jdwinkler-lanzatech
Copy link
Author

Thanks. I'll give it a shot when I'm back from holiday next week.

Just FYI, the H2O exchange reaction in Gapseq is "R_EX_cpd00001_e0" in the models, so could be a detection heuristic issue?

@jdwinkler-lanzatech
Copy link
Author

The new version of reframed seems to work, thanks! I mostly get N/A for MIP predictions, but I'll play around with it more.

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