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

More Jenkins tests #232

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 35 additions & 0 deletions ecoli/variants/condition.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from typing import Any, TYPE_CHECKING

if TYPE_CHECKING:
from reconstruction.ecoli.simulation_data import SimulationDataEcoli

def apply_variant(
sim_data: "SimulationDataEcoli", params: dict[str, Any]
) -> "SimulationDataEcoli":
"""
Modify sim_data to environmental condition from condition_defs.tsv.

Args:
sim_data: Simulation data to modify
params: Parameter dictionary of the following format::

{
# Environmental condition: "basal", "with_aa", "acetate",
# "succinate", "no_oxygen"
"condition": str,
}

Returns:
Simulation data with the following attributes modified::

sim_data.condition
sim_data.external_state.current_timeline_id
"""
# Set media condition
sim_data.condition = params["condition"]
sim_data.external_state.current_timeline_id = params["condition"]
sim_data.external_state.saved_timelines[params["condition"]] = [
(0, sim_data.conditions[params["condition"]]["nutrients"])
]

return sim_data
8 changes: 3 additions & 5 deletions ecoli/variants/new_gene_internal_shift.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import Any, TYPE_CHECKING

from ecoli.variants.condition import apply_variant as condition_variant

if TYPE_CHECKING:
from reconstruction.ecoli.simulation_data import SimulationDataEcoli

Expand Down Expand Up @@ -125,11 +127,7 @@ def apply_variant(

"""
# Set media condition
sim_data.condition = params["condition"]
sim_data.external_state.current_timeline_id = params["condition"]
sim_data.external_state.saved_timelines[params["condition"]] = [
(0, sim_data.conditions[params["condition"]]["nutrients"])
]
sim_data = condition_variant(sim_data, params)

# Initialize internal shift dictionary
sim_data.internal_shift_dict = {} # type: ignore[attr-defined]
Expand Down
26 changes: 26 additions & 0 deletions runscripts/jenkins/configs/ecoli-anaerobic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"experiment_id": "Daily with AA",
"single_daughters": true,
"generations": 8,
"fail_at_total_time": true,
"trna_attenuation": false,
"ppgpp_regulation": false,
"mechanistic_translation_supply": false,
"mechanistic_aa_transport": false,
"aa_supply_in_charging": false,
"d_period_division": false,
"mechanistic_replisome": true,
"mass_distribution": false,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
},
"variants": {
"condition": {"condition": "no_oxygen"}
}
}
39 changes: 39 additions & 0 deletions runscripts/jenkins/configs/ecoli-new-gene-gfp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"experiment_id": "Daily new gene GFP",
"single_daughters": true,
"generations": 4,
"fail_at_total_time": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
},
"parca_options": {
"new_genes": "gfp"
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
},
"variants": {
"new_gene_internal_shift": {
"condition": {"value": ["basal"]},
"induction_gen": {"value": [1]},
"knockout_gen": {"value": [-1]},
"exp_trl_eff": {
"nested": {
"exp": {
"logspace": {
"start": 7,
"stop": 8,
"num": 1
}
},
"trl_eff": {"value": [1.0]},
"op": "zip"
}
},
"op": "zip"
}
}
}
22 changes: 22 additions & 0 deletions runscripts/jenkins/configs/ecoli-no-growth-rate-control.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"experiment_id": "Daily no growth rate control",
"single_daughters": true,
"generations": 4,
"fail_at_total_time": true,
"trna_attenuation": false,
"ppgpp_regulation": false,
"mechanistic_translation_supply": false,
"mechanistic_aa_transport": false,
"aa_supply_in_charging": false,
"d_period_division": false,
"mechanistic_replisome": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
}
}
18 changes: 18 additions & 0 deletions runscripts/jenkins/configs/ecoli-no-operons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"experiment_id": "Daily no operons",
"single_daughters": true,
"generations": 4,
"fail_at_total_time": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
},
"parca_options": {
"operons": false
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
}
}
16 changes: 16 additions & 0 deletions runscripts/jenkins/configs/ecoli-superhelical-density.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"experiment_id": "Daily superhelical density",
"single_daughters": true,
"generations": 4,
"fail_at_total_time": true,
"superhelical_density": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
}
}
18 changes: 18 additions & 0 deletions runscripts/jenkins/configs/ecoli-with-aa.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"experiment_id": "Daily with AA",
"single_daughters": true,
"generations": 8,
"fail_at_total_time": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
},
"variants": {
"condition": {"condition": "with_aa"}
}
}
13 changes: 13 additions & 0 deletions runscripts/jenkins/reproducibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pipeline {
agent any

stages {
stage('Test Reproducibility') {
steps {
script {
sh "bash runscripts/jenkins/check-reproducibility.sh"
}
}
}
}
}
13 changes: 13 additions & 0 deletions runscripts/jenkins/two-generations
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pipeline {
agent any

stages {
stage('Test 2 Generations') {
steps {
script {
sh "bash runscripts/jenkins/workflow.sh runscripts/jenkins/configs/two-generations.json"
}
}
}
}
}
Loading