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

Adding new environments analysis, an experiment file, and a test #205

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3229d4b
Fixed separate notebook to work with new implementation.
cyrus-bio Jun 12, 2023
af94267
Small changes.
cyrus-bio Jun 12, 2023
352adf7
New metal binding investigation notebook started.
cyrus-bio Jun 14, 2023
743cd3c
Investigating what fraction of iron goes to which enzymes.
cyrus-bio Jun 15, 2023
dfc22c9
Almost finished protein feature metals.
cyrus-bio Jun 16, 2023
08d9f5a
Finished adding protein feature metal binding. Need to merge and incl…
cyrus-bio Jun 19, 2023
9186e5a
Finished adding protein feature metal binding. Need to merge and incl…
cyrus-bio Jun 19, 2023
26ff545
Creating new notebook to retrieve UniProt annotations since they seem…
cyrus-bio Jun 22, 2023
c416434
Small changes.
cyrus-bio Jun 26, 2023
d3918d0
New folder for Tim
cyrus-bio Jun 26, 2023
2289543
Merge branch 'master' of https://github.com/CovertLab/vivarium-ecoli …
cyrus-bio Jun 26, 2023
654d607
Cleaned up notebook for Tim.
cyrus-bio Jun 26, 2023
ef090b0
New branch for Tim
cyrus-bio Jun 26, 2023
99e790f
Added control vs. experiment flux distinction and support for excel i…
timzjing Jun 29, 2023
ef3ae2f
Add Excel with first-pass of new metabolism genes
timzjing Jun 29, 2023
9ad5759
Update Excel with first-pass of second set of metabolism genes
timzjing Jul 10, 2023
672451d
Test adding a putative L-selenocysteine synthesis pathway that is non…
timzjing Jul 10, 2023
1bb41a2
Test adding a putative Fe-S cluster synthesis pathway in a separate n…
timzjing Jul 12, 2023
a6e3088
Test adding a putative Fe-S cluster synthesis pathway in a separate n…
timzjing Jul 12, 2023
b199708
Commit for bug-finding on Fd-S pathway
timzjing Jul 12, 2023
7386656
Fixed homeostatic value estimate based on reactions where the demand …
timzjing Jul 13, 2023
69ae9a5
Fixed separate notebook to work with new implementation.
cyrus-bio Jun 12, 2023
4c714b0
Small changes.
cyrus-bio Jun 12, 2023
10ad94f
New metal binding investigation notebook started.
cyrus-bio Jun 14, 2023
2147b6d
Investigating what fraction of iron goes to which enzymes.
cyrus-bio Jun 15, 2023
81f07ab
Almost finished protein feature metals.
cyrus-bio Jun 16, 2023
0e24bff
Finished adding protein feature metal binding. Need to merge and incl…
cyrus-bio Jun 19, 2023
5e78c04
Finished adding protein feature metal binding. Need to merge and incl…
cyrus-bio Jun 19, 2023
1b95889
Creating new notebook to retrieve UniProt annotations since they seem…
cyrus-bio Jun 22, 2023
2887162
Small changes.
cyrus-bio Jun 26, 2023
2560444
New folder for Tim
cyrus-bio Jun 26, 2023
036aadc
Cleaned up notebook for Tim.
cyrus-bio Jun 26, 2023
6ef87b0
New branch for Tim
cyrus-bio Jun 26, 2023
15fd488
Added control vs. experiment flux distinction and support for excel i…
timzjing Jun 29, 2023
bd8f5ee
Add Excel with first-pass of new metabolism genes
timzjing Jun 29, 2023
f6e92e5
Update Excel with first-pass of second set of metabolism genes
timzjing Jul 10, 2023
edf8b39
Test adding a putative L-selenocysteine synthesis pathway that is non…
timzjing Jul 10, 2023
cd04537
Test adding a putative Fe-S cluster synthesis pathway in a separate n…
timzjing Jul 12, 2023
9e1035d
Test adding a putative Fe-S cluster synthesis pathway in a separate n…
timzjing Jul 12, 2023
bb35017
Commit for bug-finding on Fd-S pathway
timzjing Jul 12, 2023
6730f46
Fixed homeostatic value estimate based on reactions where the demand …
timzjing Jul 13, 2023
ec4c840
Add 4Fe-4S Pathway
timzjing Jul 18, 2023
c96fc49
Merge remote-tracking branch 'origin/new-environments' into new-envir…
timzjing Jul 18, 2023
18d6f8e
Adding actual experiment file for the new environments
timzjing Jul 21, 2023
9dbf1f4
Added a notebook for analysis of official simulation run
timzjing Jul 24, 2023
bcc55bd
Added tree visualization of metabolites in analysis notebook
timzjing Jul 28, 2023
62abf08
Added pull request test to new_environments_sim.py
timzjing Jul 28, 2023
7d40c08
Added fba_new_environments.json
timzjing Jul 28, 2023
8f0d941
Added failing test that tests division (not working correctly)
cyrus-bio Jul 31, 2023
cf45d68
Fixed failing test for testing cell division and metabolism process s…
cyrus-bio Jul 31, 2023
62084ed
Added todos
cyrus-bio Jul 31, 2023
b4a3bd6
Changed solver.
cyrus-bio Jul 31, 2023
1431de7
Added graph visualization of reaction and metabolite flux
timzjing Aug 1, 2023
adcd0b7
Merge remote-tracking branch 'origin/new-environments' into new-envir…
timzjing Aug 1, 2023
2375a0e
Added directed arrows and coloring for easier graph flux analysis
timzjing Aug 2, 2023
2568e48
Added visualization of metabolic networks based on specific metabolit…
timzjing Aug 4, 2023
f112776
Added visualization of metabolic pathways based on greatest flux-chan…
timzjing Aug 4, 2023
5934110
Improved pathway visualization to include more reactions
timzjing Aug 7, 2023
e8ea76b
Updated pathway visualization to include a threshold for plotting rea…
timzjing Aug 9, 2023
e7e4027
Added script to generate a pathway heatmap based on reaction heatmap
timzjing Aug 11, 2023
9b8e699
Initial plotting of pathways as nodes
timzjing Aug 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/met_division_test.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions ecoli/composites/ecoli_configs/fba_new_environments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"experiment_id" : "fba_redux",
"total_time" : 10,
"swap_processes" : {
"ecoli-metabolism" : "ecoli-metabolism-redux"
},
"flow": {
"ecoli-metabolism-redux": [["ecoli-chromosome-structure"]],
"ecoli-mass-listener": [["ecoli-metabolism-redux"]],
"mRNA_counts_listener": [["ecoli-mass-listener"]],
"monomer_counts_listener": [["mRNA_counts_listener"]]
},
"raw_output" : false
}
4 changes: 2 additions & 2 deletions ecoli/composites/ecoli_configs/fba_redux_div.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"mRNA_counts_listener": [["ecoli-mass-listener"]],
"monomer_counts_listener": [["mRNA_counts_listener"]]
},
"raw_output" : false,
"divide" : false
"divide" : true,
"initial_state_file": "met_division_test"
}
54 changes: 12 additions & 42 deletions ecoli/experiments/metabolism_redux_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def run_metabolism_composite():

def run_ecoli_with_metabolism_redux(
filename='fba_redux',
total_time=10,
total_time=50,
divide=True,
initial_state_file='wcecoli_t0',
progress_bar=True,
Expand Down Expand Up @@ -163,47 +163,22 @@ def run_ecoli_with_metabolism_redux(
save_sim_output(folder, query, sim, save_model=True)



@pytest.mark.slow
def test_ecoli_with_metabolism_redux(
filename='fba_redux',
total_time=4,
divide=False,
progress_bar=True,
log_updates=False,
emitter='timeseries',
):
sim = EcoliSim.from_file(CONFIG_DIR_PATH + filename + '.json')
sim.total_time = total_time
sim.divide = divide
sim.progress_bar = progress_bar
sim.log_updates = log_updates
sim.emitter = emitter
sim.build_ecoli()

# run simulation and add asserts to output
sim.run()

# assert 'ecoli-metabolism-gradient-descent' in sim.ecoli['processes']
# assert 'ecoli-metabolism' not in sim.ecoli['processes']
# assert 'ecoli-metabolism-gradient-descent' in sim.ecoli['topology']
# assert 'ecoli-metabolism' not in sim.ecoli['topology']



@pytest.mark.slow
def test_ecoli_with_metabolism_redux_div(
filename='fba_redux_div',
total_time=4,
divide=True,
total_time=30,
emitter='timeseries',
initial_state_file = 'met_division_test'
):
# TODO (Cyrus) - Add test that affirms structure of output query.
sim = EcoliSim.from_file(CONFIG_DIR_PATH + filename + '.json')
sim.total_time = total_time
sim.divide = divide
sim.emitter = emitter
sim.build_ecoli()
sim.initial_state = get_state_from_file(path=f'data/{initial_state_file}.json')

# this means that sims will not create conflicting random indices
sim.seed += sim.initial_state['global_time']

sim.run()

Expand All @@ -213,16 +188,12 @@ def test_ecoli_with_metabolism_redux_div(
# assert 'ecoli-metabolism-gradient-descent' in sim.processes
# assert 'ecoli-metabolism' not in sim.processes

query = []
agents = sim.query()['agents'].keys()
for agent in agents:
query.extend([('agents', agent, 'listeners', 'fba_results'),
('agents', agent, 'listeners', 'mass'),
('agents', agent, 'bulk')])
output = sim.query(query)
# assert division occured
assert len(sim.query()[total_time]['agents']) == 2 , "Cell did not divide in metabolism division test"

# TODO assert fluxes in the output query
# TODO assert that processes have been swapped

# test that water is being used (model is running)
assert sum(output['agents'][agent]['listeners']['fba_results']['estimated_exchange_dmdt']['WATER[p]']) != 0

def run_ecoli_with_default_metabolism(
filename='default',
Expand Down Expand Up @@ -256,7 +227,6 @@ def run_ecoli_with_default_metabolism(
'0': run_metabolism,
'1': run_metabolism_composite,
'2': run_ecoli_with_metabolism_redux,
'3': test_ecoli_with_metabolism_redux,
'4': test_ecoli_with_metabolism_redux_div,
'5': run_ecoli_with_default_metabolism,
}
Expand Down
Loading
Loading