10.1.1.1.4. freeflux.analysis.simulate

Define the Simulator class.

10.1.1.1.4.1. Attributes

__author__

10.1.1.1.4.2. Classes

Simulator

10.1.1.1.4.3. Module Contents

freeflux.analysis.simulate.__author__ = 'Chao Wu'[source]
class freeflux.analysis.simulate.Simulator(model)[source]
Parameters:

model (Model) – Freeflux Model.

model[source]
calculator[source]
contexts = [][source]
__enter__()[source]
__exit__(type, value, traceback)[source]
set_target_EMUs(target_emus)[source]
Parameters:

target_emus (dict) – Metabolite ID => atom NOs or list of atom NOs. Atom NOs can be int list or str, e.g.,, {‘Ala’: [[1,2,3], [2,3]], ‘Ser’: ‘123’}.

_unset_target_EMUs(emuids)[source]
set_labeling_strategy(labeled_substrate, labeling_pattern, percentage, purity, label_atom='C')[source]

Use this method for every substrate tracer.

Parameters:
  • labeled_substrate (str) – Metabolite ID.

  • labeling_pattern (str or list of str) –

    Labeling pattern of substrate, ‘0’ for unlabeled atom, ‘1’ for labeled atom, e.g., ‘100000’ for 1-13C glucose.

    List if tracer with multiple labeling patterns are used.

    Natural substrate (with all ‘0’s) don’t need to be explicitly set.

    If str, labeling_pattern should not be natural substrate.

  • percentage (float or list of float) –

    Molar percentage (in range of [0,1]) of corresponding tracer. Sum of percentage should be <= 1, and the rest will be considered as natural substrate.

    List if tracer with multiple labeling patterns are used.

    • If list, len(percentage) should be equal to len(labeling_pattern).

    • If float, labeling_pattern should not be natural substrate.

  • purity (float or list of float) –

    Labeled atom purity (in range of [0,1]) of corresponding tracer.

    List if tracer with multiple labeling patterns are used.

    • If list, len(purity) should be equal to len(labeling_pattern).

    • If float, labeling_pattern should not be natural substrate.

  • label_atom (str) – Labeled atom, i.e., base atom in the MDV. Currently supports only “H”, “C” and “N”.

_unset_labeling_strategy(labeled_substrate)[source]
Parameters:

labeled_substrate (str) – Metabolite ID.

set_flux(fluxid, value)[source]

Set metabolic flux value.

Parameters:
  • fluxid (str) – Flux IDs, i.e., reaction ID + ‘_f’ or ‘_b’ for reversible reaction, and reaction ID for irreversible reaction.

  • value (float) – Flux value.

set_fluxes_from_file(file)[source]

Read metabolic flux values from file.

Parameters:

file (file path) – tsv or excel file, fields are flux ID and value, flux ID is reaction ID + ‘_f’ or ‘_b’ for reversible reaction, and reaction ID for irreversible reaction.

_unset_fluxes(fluxids)[source]
Parameters:

fluxids (str or list of str) – Flux ID(s).

_decompose_network(n_jobs, lump=True)[source]
Parameters:
  • n_jobs (int) – # of jobs to run in parallel.

  • lump (bool) – Whether to lump linear EMUs.

_unset_decomposition()[source]
_lambdify_matrix_As_and_Bs()[source]
_unset_matrix_As_and_Bs()[source]
_calculate_substrate_MDVs(extra_subs=None)[source]
Parameters:

extra_subs (str or list of str) – Metabolite ID(s). Additional metabolites that are considered as substrates.

_unset_substrate_MDVs()[source]
prepare(n_jobs=1)[source]
Parameters:

n_jobs (int) – If n_jobs > 1, decomposition job will run in parallel.

_check_dependencies()[source]
simulate()[source]