CovertLab / wcEcoli

Whole Cell Model of E. coli
Other
18 stars 4 forks source link

added metabolic model for vioa_e based on mass-action #1359

Closed ioanagherman closed 1 year ago

ioanagherman commented 1 year ago

This branch includes the addition of 5 exogenous genes to E.Coli and the modelling of the corresponding metabolic reactions producing violacein, based on mass-action kinetics. Modifications made:

  1. Created a new folder in reconstruction/ecoli/flat/new_gene_data/vioAE where we store the sequencing data for the vioA-E genes, proteins, metabolites and metabolic reactions. The metabolites.tsv file will be appended to the original metabolites.tsv of the WCM. The metabolic_reactions.tsv will be kept separate in order to avoid impacting the homeostatic objective of the WCM.
  2. Metabolic concentrations were added for oxygen, h202 and ammonium. When/If merged into master, will this affect the WCM?
  3. metabolism_vio.py was added to reconstruction/ecoli/dataclasses/process to model the reactions involving the vioA-E enzymes based on mass-action kinetics.
  4. metabolism_vio.py was added to wcEcoli/models/ecoli/processes to include the new process in the pipeline of the WCM
covert-lab-crow commented 1 year ago

Can one of the admins verify this patch?

covert-lab-crow commented 1 year ago

Can one of the admins verify this patch?

covert-lab-crow commented 1 year ago

Can one of the admins verify this patch?

covert-lab-crow commented 1 year ago

Can one of the admins verify this patch?

ggsun commented 1 year ago

add to whitelist

ggsun commented 1 year ago

ok to test

ggsun commented 1 year ago

@ioanagherman, congrats on submitting your first PR! Let me start with a few macro-level comments.

  1. This new module you added should not interfere with how the model runs when no new genes are added. It looks like the Jenkins builds are failing for this PR because of this error:
File "/home/groups/mcovert/pyenv/versions/wcEcoli3/lib/python3.8/site-packages/fireworks/core/rocket.py", line 262, in run
    m_action = t.run_task(my_spec)
  File "<[http://localhost:4242/job/wcEcoli%20-%20PR/ws/wholecell/fireworks/firetasks/fitSimData.py",](http://localhost:4242/job/wcEcoli%20-%20PR/ws/wholecell/fireworks/firetasks/fitSimData.py%22,)> line 64, in run_task
    sim_data = fitSimData_1(
  File "<[http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/fit_sim_data_1.py",](http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/fit_sim_data_1.py%22,)> line 92, in fitSimData_1
    sim_data, cell_specs = initialize(sim_data, cell_specs, raw_data=raw_data, **kwargs)
  File "<[http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/fit_sim_data_1.py",](http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/fit_sim_data_1.py%22,)> line 140, in wrapper
    sim_data, cell_specs = func(*args, **kwargs)
  File "<[http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/fit_sim_data_1.py",](http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/fit_sim_data_1.py%22,)> line 177, in initialize
    sim_data.initialize(
  File "<[http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/simulation_data.py",](http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/simulation_data.py%22,)> line 77, in initialize
    self.process = Process(raw_data, self)
  File "<[http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/dataclasses/process/process.py",](http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/dataclasses/process/process.py%22,)> line 33, in __init__
    self.metabolism_vio = MetabolismVio(raw_data, sim_data)
  File "<[http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/dataclasses/process/metabolism_vio.py",](http://localhost:4242/job/wcEcoli%20-%20PR/ws/reconstruction/ecoli/dataclasses/process/metabolism_vio.py%22,)> line 31, in __init__
    for reactionIndex, reaction in enumerate(raw_data.new_gene_data.vioAE.metabolic_reactions_new):
AttributeError: 'KnowledgeBaseEcoli' object has no attribute 'new_gene_data'

The new process you added is assuming that new_gene_data exists, which would not be the case when the model is run with its default settings. You will need to make sure that this process is compatible with this default setting. One idea would be to completely disable and skip the process if no new genes are added to the model.

  1. I would like to see this new process being used for more general purposes, and not just specifically for the addition of vioAE. Do you think you could rename/restructure the files/classes such that it could be used for the addition of any metabolic pathways that follow mass-action kinetics, rather than just vioAE?
ioanagherman commented 1 year ago

Before merging I would like to modify the way this is modelled and add some kinetic parameters from the literature.