reconstruction.ecoli.dataclasses.state.external_state

Simulation data for external state

This base class includes all data associated with states external to the cells. Initializes the environment using conditions and time series from raw_data.

  • saved_timelines: a dictionary of all timelines.

  • current_timeline_id: a string specifying the timelines

    used for the current simulation.

  • current_media: a dictionary of molecules (keys) and

    their concentrations (values).

  • saved_media: a dictionary of all media, each entry

    itself a dictionary molecules (keys) and their concentrations (values).

class reconstruction.ecoli.dataclasses.state.external_state.ExternalState(raw_data, sim_data)[source]

Bases: object

External State

_get_all_external_exchange_molecules(raw_data)[source]
Returns:

all external exchange molecules

Return type:

list[str]

_get_secretion_exchange_molecules(raw_data)[source]
Returns:

all secretion exchange molecules

Return type:

set[str]

_initialize_environment(raw_data)[source]
exchange_data_from_concentrations(molecules)[source]

Update importExchangeMolecules for FBA based on current nutrient concentrations. This provides a simple type of transport to accommodate changing nutrient concentrations in the environment. Transport is modeled as a binary switch: When there is a high concentrations of environment nutrients, transporters are unconstrained and nutrients are transported as needed by metabolism. When concentrations fall below the threshold, that nutrient’s transport is constrained to max flux of 0.

Parameters:

molecules – external molecules (no location tag) with external concentration, concentration can be inf

Returns dict with the following keys:
externalExchangeMolecules (set[str]): all exchange molecules (with

location tag), includes both import and secretion exchanged molecules

importExchangeMolecules (set[str]): molecules (with location tag) that

can be imported from the environment into the cell

importConstrainedExchangeMolecules (dict[str, float with mol/mass/time units]):

constrained molecules (with location tag) with upper bound flux constraints

importUnconstrainedExchangeMolecules (set[str]): exchange molecules

(with location tag) that do not have an upper bound on their flux

secretionExchangeMolecules (set[str]): molecules (with location tag)

that can be secreted by the cell into the environment

exchange_data_from_media(media_label)[source]
Returns:

exchange_data for a media_label saved in exchange_data_dict.

Return type:

dict

get_import_constraints(unconstrained, constrained, units)[source]
Returns:

the indices of all

importUnconstrainedExchangeMolecules in self.all_external_exchange_molecules are true, the rest as false

constrained_molecules (list[bool]): the indices of all

importConstrainedExchangeMolecules in self.all_external_exchange_molecules are true, the rest as false

constraints (list[float]): uptake constraints for each molecule

that is constrained, nan for no constraint

Return type:

unconstrained_molecules (list[bool])