ecoli.variants.new_gene_internal_shift

ecoli.variants.new_gene_internal_shift.apply_variant(sim_data, params)[source]

Modify sim_data so new gene expression and translation efficiency are modified for certain generation ranges.

Parameters:
  • sim_data (SimulationDataEcoli) – Simulation data to modify

  • params (dict[str, Any]) –

    Parameter dictionary of the following format:

    {
        # Generation to induce new gene expression
        "induction_gen": Optional(int),
        "exp_trl_eff": {
            # Factor by which to multiply new gene expression once induced
            "exp": float,
            # Translation efficiency for new gene once induced
            "trl_eff": float,
        }
        # Generation to knock out new gene expression (> induction gen)
        "knockout_gen": Optional(int),
        # 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
# Mapping of generation number to function that takes sim_data
# as first argument and optional extra arguments contained in a
# tuple that will be star expanded. Here, modify_new_gene_exp_trl
# takes two extra arguments: expression and translation_efficiency.
sim_data.internal_shift_dict

Return type:

SimulationDataEcoli

ecoli.variants.new_gene_internal_shift.get_new_gene_ids_and_indices(sim_data)[source]

Determines the indices of new gene cistrons and proteins using the new gene flag in sim_data.

Returns:

4-element tuple containing

  • new_gene_cistron_ids: names of new gene cistrons

  • new_gene_indices: indices in rna_data table for new gene cistrons

  • new_monomer_ids: names of new gene monomers

  • new_monomer_indices: indices in monomer_data table for new monomers

Parameters:

sim_data (SimulationDataEcoli)

Return type:

tuple[list[str], list[int], list[str], list[int]]

ecoli.variants.new_gene_internal_shift.modify_new_gene_exp_trl(sim_data, expression, translation_efficiency)[source]

Sets expression and translation effiencies of new genes. Modifies:

sim_data.process.transcription.rna_synth_prob
sim_data.process.transcription.rna_expression
sim_data.process.transcription.exp_free
sim_data.process.transcription.exp_ppgpp
sim_data.process.transcription.attenuation_basal_prob_adjustments
sim_data.process.transcription_regulation.basal_prob
sim_data.process.transcription_regulation.delta_prob
sim_data.process.translation.translation_efficiencies_by_monomer
Parameters:
  • sim_data (SimulationDataEcoli) – Simulation data

  • expression (float) – Factor by which to adjust new gene expression levels

  • translation_efficiency (float) – Translation efficiency for new genes