6.1.1.3.1.2. pytfa.io.dict
¶
Make the model serializable
6.1.1.3.1.2.1. Module Contents¶
6.1.1.3.1.2.1.1. Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Turns a peptide compositions dict of the form: |
|
Turns a stoichiometric compositions dict of the form: |
|
|
|
|
|
|
|
|
|
|
|
Custom_hooks looks like |
|
|
|
Allows custom variable serialization |
|
|
|
|
|
Performs the reverse operation of :func:archive_compositions |
|
Performs the reverse operation of :func:_stoichiometry_to_dict |
6.1.1.3.1.2.1.2. Attributes¶
|
|
|
- pytfa.get_all_subclasses(cls)¶
- pytfa.make_subclasses_dict(cls)¶
- pytfa.get_model_variable_subclasses()¶
- pytfa.get_model_constraint_subclasses()¶
- pytfa.BASE_NAME2HOOK¶
- pytfa.SOLVER_DICT¶
- pytfa.metabolite_thermo_to_dict(metthermo)¶
- pytfa.var_to_dict(variable)¶
- pytfa.cons_to_dict(constraint)¶
- pytfa.archive_variables(var_dict)¶
- pytfa.archive_constraints(cons_dict)¶
- pytfa.archive_compositions(compositions)¶
Turns a peptide compositions dict of the form: { ‘b3991’: defaultdict(int,
- {<Metabolite ala__L_c at 0x7f7d25504f28>: -42,
<Metabolite arg__L_c at 0x7f7d2550bcf8>: -11, <Metabolite asn__L_c at 0x7f7d2550beb8>: -6, …}),
…}
to:
- { ‘b3991’: defaultdict(int,,
- {‘ala__L_c’: -42,
‘arg__L_c’: -11, ‘asn__L_c’: -6,
…}),
…} :param compositions: :return:
- pytfa._stoichiometry_to_dict(stoichiometric_dict)¶
Turns a stoichiometric compositions dict of the form: ‘b3991’: defaultdict(int,
- {<Metabolite ala__L_c at 0x7f7d25504f28>: -42,
<Metabolite arg__L_c at 0x7f7d2550bcf8>: -11, <Metabolite asn__L_c at 0x7f7d2550beb8>: -6, …})
to:
- ‘b3991’: defaultdict(int,,
- {‘ala__L_c’: -42,
‘arg__L_c’: -11, ‘asn__L_c’: -6,
…})
- pytfa.get_solver_string(model)¶
- pytfa.obj_to_dict(model)¶
- pytfa.model_to_dict(model)¶
- Parameters
model –
- Returns
- pytfa._add_thermo_reaction_info(rxn, rxn_dict)¶
- pytfa._add_thermo_metabolite_info(met, met_dict)¶
- pytfa.model_from_dict(obj, solver=None, custom_hooks=None)¶
Custom_hooks looks like
custom_hooks = {<EnzymeVariable Class at 0xffffff> : 'enzymes', ... }
- Parameters
obj –
solver –
custom_hooks –
- Returns
- pytfa.rebuild_obj_from_dict(new, objective_dict)¶
- pytfa.add_custom_classes(model, custom_hooks)¶
Allows custom variable serialization
- Parameters
model –
base_classes –
base_hooks –
custom_hooks –
- Returns
- pytfa.get_hook_dict(model, custom_hooks)¶
- pytfa.init_thermo_model_from_dict(new, obj)¶
- pytfa.rebuild_compositions(new, compositions_dict)¶
Performs the reverse operation of :func:archive_compositions
- Parameters
new –
compositions_dict –
- Returns
- pytfa._rebuild_stoichiometry(new, stoich)¶
Performs the reverse operation of :func:_stoichiometry_to_dict
- Parameters
new –
stoich –
- Returns