3.1.1.2.1.1. etfl.core.allocation

Core for the ME-part

3.1.1.2.1.1.1. Module Contents

3.1.1.2.1.1.1.1. Functions

fix_prot_ratio(model, mass_ratios)

To keep consistency between FBA and ETFL biomass compositions, we divide biomass

fix_RNA_ratio(model, mass_ratios)

To keep consistency between FBA and ETFL biomass compositions, we divide biomass

fix_DNA_ratio(model, mass_ratios, gc_ratio, chromosome_len, tol=0.05)

A function similar to fix_RNA_ratio. Used only in the case of adding vector

add_dummy_expression(model, aa_ratios, dummy_gene, dummy_peptide, dummy_protein, peptide_length)

add_dummy_protein(model, dummy_peptide, enzyme_kdeg)

add_dummy_peptide(model, aa_ratios, dummy_gene, peptide_length)

add_dummy_mrna(model, dummy_gene, mrna_kdeg, mrna_length, nt_ratios)

add_interpolation_variables(model)

add_protein_mass_requirement(model, mu_values, p_rel)

Adds protein synthesis requirement

apply_prot_weight_constraint(model, p_ref, prot_ggdw, epsilon)

define_prot_weight_constraint(model, prot_ggdw)

add_rna_mass_requirement(model, mu_values, rna_rel)

Adds RNA synthesis requirement

apply_mrna_weight_constraint(model, m_ref, mrna_ggdw, epsilon)

define_mrna_weight_constraint(model, mrna_ggdw)

add_dna_mass_requirement(model, mu_values, dna_rel, gc_ratio, chromosome_len, dna_dict, ppi='ppi_c')

Adds DNA synthesis requirement

get_dna_synthesis_mets(model, chromosome_len, gc_ratio, ppi)

apply_dna_weight_constraint(model, m_ref, dna_ggdw, epsilon)

define_dna_weight_constraint(model, dna, dna_ggdw, gc_content, chromosome_len)

add_lipid_mass_requirement(model, lipid_mets, mass_ratios, mu_values, lipid_rel, lipid_rxn=None)

In general, we have two main situations:

apply_lipid_weight_constraint(model, l_ref, lipid, epsilon)

add_carbohydrate_mass_requirement(model, carbohydrate_mets, mass_ratios, mu_values, carbohydrate_rel, carbohydrate_rxn=None)

In general, we have two main situations:

apply_carbohydrate_weight_constraint(model, c_ref, carbohydrate, epsilon)

add_ion_mass_requirement(model, ion_mets, mass_ratios, mu_values, ion_rel, ion_rxn=None)

In general, we have two main situations:

apply_ion_weight_constraint(model, i_ref, ion, epsilon)

3.1.1.2.1.1.1.2. Attributes

MRNA_WEIGHT_CONS_ID

PROT_WEIGHT_CONS_ID

DNA_WEIGHT_CONS_ID

MRNA_WEIGHT_VAR_ID

PROT_WEIGHT_VAR_ID

DNA_WEIGHT_VAR_ID

DNA_FORMATION_RXN_ID

LIPID_FORMATION_RXN_ID

LIPID_WEIGHT_VAR_ID

LIPID_WEIGHT_CONS_ID

ION_FORMATION_RXN_ID

ION_WEIGHT_VAR_ID

ION_WEIGHT_CONS_ID

CARBOHYDRATE_FORMATION_RXN_ID

CARBOHYDRATE_WEIGHT_VAR_ID

CARBOHYDRATE_WEIGHT_CONS_ID

ETFL.MRNA_WEIGHT_CONS_ID = mRNA_weight_definition
ETFL.PROT_WEIGHT_CONS_ID = prot_weight_definition
ETFL.DNA_WEIGHT_CONS_ID = DNA_weight_definition
ETFL.MRNA_WEIGHT_VAR_ID = mrna_ggdw
ETFL.PROT_WEIGHT_VAR_ID = prot_ggdw
ETFL.DNA_WEIGHT_VAR_ID = dna_ggdw
ETFL.DNA_FORMATION_RXN_ID = DNA_formation
ETFL.LIPID_FORMATION_RXN_ID = Lipid_formation
ETFL.LIPID_WEIGHT_VAR_ID = lipid_ggdw
ETFL.LIPID_WEIGHT_CONS_ID = lipid_weight_definition
ETFL.ION_FORMATION_RXN_ID = ion_formation
ETFL.ION_WEIGHT_VAR_ID = ion_ggdw
ETFL.ION_WEIGHT_CONS_ID = ion_weight_definition
ETFL.CARBOHYDRATE_FORMATION_RXN_ID = Carbohydrate_formation
ETFL.CARBOHYDRATE_WEIGHT_VAR_ID = carbohydrate_ggdw
ETFL.CARBOHYDRATE_WEIGHT_CONS_ID = carbohydrate_weight_definition
ETFL.fix_prot_ratio(model, mass_ratios)

To keep consistency between FBA and ETFL biomass compositions, we divide biomass into two parts: BS1 and BS2. BS1 includes variable parts of biomass (i.e. RNA and protein), while BS2 includes the other components that are not modeled explicitly. inputs:

model: ME-model mass_ratios: a dict of mass_ratios for biomass composition in the GEM

It must have ratios for ‘RNA’ and ‘protein’. If ‘total mass’ is provided, it is used to scale ratios. Otherwise, it’s assumed to be 1 gr.

outputs:

return a model with an additional constraint on sum of RNA and protein share

ETFL.fix_RNA_ratio(model, mass_ratios)

To keep consistency between FBA and ETFL biomass compositions, we divide biomass into two parts: BS1 and BS2. BS1 includes variable parts of biomass (i.e. RNA and protein), while BS2 includes the other components that are not modeled explicitly. inputs:

model: ME-model mass_ratios: a dict of mass_ratios for biomass composition in the GEM

It must have ratios for ‘RNA’ and ‘protein’. If ‘total mass’ is provided, it is used to scale ratios. Otherwise, it’s assumed to be 1 gr.

outputs:

return a model with an additional constraint on sum of RNA and protein share

ETFL.fix_DNA_ratio(model, mass_ratios, gc_ratio, chromosome_len, tol=0.05)

A function similar to fix_RNA_ratio. Used only in the case of adding vector and when variable biomass composition is not available. It adds a DNA species to the model that with a constant concentration, but this can be used for RNAP allocation constraints (to be compatible with those constraints). tol: a tolerance ration for the deviation of DNA from its mass ratio

ETFL.add_dummy_expression(model, aa_ratios, dummy_gene, dummy_peptide, dummy_protein, peptide_length)
ETFL.add_dummy_protein(model, dummy_peptide, enzyme_kdeg)
ETFL.add_dummy_peptide(model, aa_ratios, dummy_gene, peptide_length)
ETFL.add_dummy_mrna(model, dummy_gene, mrna_kdeg, mrna_length, nt_ratios)
ETFL.add_interpolation_variables(model)
ETFL.add_protein_mass_requirement(model, mu_values, p_rel)

Adds protein synthesis requirement

input of type:

..code

mu_values=[ 0.6,        1.0,        1.5,        2.0,        2.5     ]
p_rel   = [ 0.675676,   0.604651,   0.540416,   0.530421,   0.520231]

# mu_values in [h^-1]
# p_rel in [g/gDw]
Parameters
  • mu_values

  • p_rel

Returns

ETFL.apply_prot_weight_constraint(model, p_ref, prot_ggdw, epsilon)
ETFL.define_prot_weight_constraint(model, prot_ggdw)
ETFL.add_rna_mass_requirement(model, mu_values, rna_rel)

Adds RNA synthesis requirement

input of type:

mu_values = [   0.6,        1.0,        1.5,        2.0,        2.5     ]
rna_rel   = [   0.135135    0.151163    0.177829    0.205928    0.243931]

# mu_values in [h^-1]
# rna_rel in [g/gDw]
Parameters
  • mu_values

  • rna_rel

Returns

ETFL.apply_mrna_weight_constraint(model, m_ref, mrna_ggdw, epsilon)
ETFL.define_mrna_weight_constraint(model, mrna_ggdw)
ETFL.add_dna_mass_requirement(model, mu_values, dna_rel, gc_ratio, chromosome_len, dna_dict, ppi='ppi_c')

Adds DNA synthesis requirement

input of type:

mu_values = [   0.6,        1.0,        1.5,        2.0,        2.5     ]
dna_rel   = [   0.135135    0.151163    0.177829    0.205928    0.243931]

# mu_values in [h^-1]
# dna_rel in [g/gDw]
Parameters
  • mu_values

  • dna_rel

Returns

ETFL.get_dna_synthesis_mets(model, chromosome_len, gc_ratio, ppi)
ETFL.apply_dna_weight_constraint(model, m_ref, dna_ggdw, epsilon)
ETFL.define_dna_weight_constraint(model, dna, dna_ggdw, gc_content, chromosome_len)
ETFL.add_lipid_mass_requirement(model, lipid_mets, mass_ratios, mu_values, lipid_rel, lipid_rxn=None)
In general, we have two main situations:
  1. the lipid paripates in biomass formation as lumped metabolite.

  2. the lipid components partipate in biomass formation individually.

In the first case, we should remove lipid metabolite from the model and replace it with a mcromolecule with a new mass balnce constraint. In the second case, after removing lipid metabolites from biomass rxn, we should define a new reaction to lump lipid metabolites. Then, it becomes similar to the first case.

modelMeModel

ETFL model with variable biomass composition.

lipid_metslist

A list of lipid metabolite id(s)

mass_ratiosdict

Keys are strings for biomass components and values are their ration in FBA model. The ratios should be consistent with the current stoichiometric coefficients.

mu_valueslist or DataFrame

Values of growth rates for which experimental data is available

lipid_relist or DataFrame

Different ratios of lipid for different growth rates

lipid_rxnstring

the rxn id for lipid psedoreaction. If None, there is no such reaction.

None.

ETFL.apply_lipid_weight_constraint(model, l_ref, lipid, epsilon)
ETFL.add_carbohydrate_mass_requirement(model, carbohydrate_mets, mass_ratios, mu_values, carbohydrate_rel, carbohydrate_rxn=None)
In general, we have two main situations:
  1. the carbohydrate paripates in biomass formation as lumped metabolite.

  2. the carbohydrate components partipate in biomass formation individually.

In the first case, we should remove carbohydrate metabolite from the model and replace it with a mcromolecule with a new mass balnce constraint. In the second case, after removing carbohydrate metabolites from biomass rxn, we should define a new reaction to lump carbohydrate metabolites. Then, it becomes similar to the first case.

modelMeModel

ETFL model with variable biomass composition.

carbohydrate_metslist

A list of carbohydrate metabolite id(s)

mass_ratiosdict

Keys are strings for biomass components and values are their ration in FBA model. The ratios should be consistent with the current stoichiometric coefficients.

mu_valueslist or DataFrame

Values of growth rates for which experimental data is available

carbohydrate_relist or DataFrame

Different ratios of carbohydrate for different growth rates

carbohydrate_rxnstring

the rxn id for carbohydrate psedoreaction. If None, there is no such reaction.

None.

ETFL.apply_carbohydrate_weight_constraint(model, c_ref, carbohydrate, epsilon)
ETFL.add_ion_mass_requirement(model, ion_mets, mass_ratios, mu_values, ion_rel, ion_rxn=None)
In general, we have two main situations:
  1. the ion paripates in biomass formation as lumped metabolite.

  2. the ion components partipate in biomass formation individually.

In the first case, we should remove ion metabolite from the model and replace it with a mcromolecule with a new mass balnce constraint. In the second case, after removing ion metabolites from biomass rxn, we should define a new reaction to lump ion metabolites. Then, it becomes similar to the first case.

modelMeModel

ETFL model with variable biomass composition.

ion_metslist

A list of ion metabolite id(s)

mass_ratiosdict

Keys are strings for biomass components and values are their ration in FBA model. The ratios should be consistent with the current stoichiometric coefficients.

mu_valueslist or DataFrame

Values of growth rates for which experimental data is available

ion_relist or DataFrame

Different ratios of ion for different growth rates

ion_rxnstring

the rxn id for ion psedoreaction. If None, there is no such reaction.

None.

ETFL.apply_ion_weight_constraint(model, i_ref, ion, epsilon)