mass.core.mass_model
MassModel is a class for holding information regarding a mass model.
The MassModel class inherits and extends the
Model class in cobra. It contains additional
information required for simulations and other mass functions and
workflows.
Some key differences between the
cobra.Model and the
mass.MassModel are
listed below:
When instantiating a
MassModelfrom acobra.Model, any associatedcobra.Metabolitewill also be converted into aMassMetabolite, and any associatedcobra.Reactionwill also be converted into aMassReaction.Additionally, any groups associated with the model containing
cobra.Metabolitesorcobra.Reactionswill be updated with the correspondiningmassobjects.No
cobraobject can be directly added to theMassModelwith the exception ofGeneandGroupobjects. Anycobraobject will first be instantiated into its equivalentmassobject before beimg added to theMassModel.
Module Contents
Classes
Class representation of a model. |
Attributes
Logger for |
|
Contains the six most abundant elements and charge for molecules. |
- mass.core.mass_model.LOGGER[source]
Logger for
mass_modelsubmodule.- Type
- mass.core.mass_model.CHOPNSQ = ['C', 'H', 'O', 'P', 'N', 'S', 'q'][source]
Contains the six most abundant elements and charge for molecules.
- Type
- class mass.core.mass_model.MassModel(id_or_model=None, name=None, array_type='dense', dtype=np.float64)[source]
Bases:
cobra.core.model.ModelClass representation of a model.
- Parameters
id_or_model (str, Model, MassModel) – A string identifier to associate with the model, or an existing
MassModel. If an existingMassModelis provided, a newMassModelobject is instantiated with the same properties as the original model.name (str) – A human readable name for the model.
array_type (str) – A string identifiying the desired format for the returned matrix. Valid matrix types include
'dense','dok','lil','DataFrame', and'symbolic'Default is'DataFrame'. See thematrixmodule documentation for more information on thearray_type.dtype (data-type) – The desired array data-type for the stoichiometric matrix. If
Nonethen the data-type will default tonumpy.float64.
- reactions
A
DictListwhere the keys are reaction identifiers and the values are the associatedMassReactions.- Type
- metabolites
A
DictListwhere the keys are metabolite identifiers and the values are the associatedMassMetabolites.- Type
- groups
A
DictListwhere the keys are group identifiers and the values are the associatedGroups.- Type
- enzyme_modules
A
DictListwhere the keys are enzyme module identifiers and the values are the associatedEnzymeModuleDicts.- Type
- custom_rates
A
dictto store custom rate expressions for specific reactions, where the keys areMassReactions and values are the custom rate expressions given assympyexpressions. Custom rate expressions will always be prioritized over automatically generated mass action rates.- Type
- custom_parameters
A
dictto store the custom parameters for the custom rates, where key:value pairs are the string identifiers for the parameters and their corresponding numerical value.- Type
- boundary_conditions
A
dictto store boundary conditions, where keys are string identifiers for ‘boundary metabolites’ of boundary reactions, and values are the corresponding boundary condition numerical value or function of time. Note that boundary conditions are treated as parameters and NOT as species.- Type
- units
DictListofUnitDefinitions to store in the model for referencing.- Type
Warning
Note that the
MassModeldoes NOT track units, and it is therefore incumbent upon the user to maintain unit consistency the model.Note that boundary conditions are considered parameters and NOT as species in a reaction.
- property S[source]
Alias for the
stoichiometric_matrix.
- property odes[source]
Alias for the
ordinary_differential_equations.
- property initial_conditions[source]
Get
dictofMassMetabolite.initial_conditions.
- property ics[source]
Alias for the
initial_conditions.
- property rates[source]
Return a
dictof reaction rate expressions.If a reaction has an associated custom rate expression, the custom rate will be prioritized and returned in the
dictinstead of the automatically generated rate law expression.
- property v[source]
Alias for the
steady_state_fluxes.
- property boundary_metabolites[source]
Return a sorted
listof all ‘boundary metabolites’ in the model.See also
- property exchanges[source]
Return exchange reactions in the model.
Exchange reactions are reactions that exchange mass with the exterior. Uses annotations and heuristics to exclude non-exchanges such as sink and demand reactions.
- property demands[source]
Return demand reactions in the model.
Demands are irreversible reactions that accumulate or consume a metabolite in the inside of the model.
- property sinks[source]
Return sink reactions in the model.
Sinks are reversible reactions that accumulate or consume a metabolite in the inside of the model.
- property compartments[source]
Get or set a
dictof all metabolite compartments.Assigning a
dictto this property updates the model’sdictof compartment descriptions with the new values.Notes
Setter extends
compartments()of thecobra.Modelto enable resetting the attribute by setting an emptydict
- Parameters
compartment_dict (dict) – A
dictmapping compartments abbreviations to full names. An emptydictwill reset the compartments.
- property conc_solver[source]
Return the
ConcSolverassociated with the model.
- update_S(array_type=None, dtype=None, update_model=True)[source]
Update the stoichiometric matrix of the model.
- Parameters
array_type (str) – A string identifiying the desired format for the returned matrix. Valid matrix types include
'dense','dok','lil','DataFrame', and'symbolic'Default is the currentarray_type. See thematrixmodule documentation for more information on thearray_type.dtype (data-type) – The desired array data-type for the stoichiometric matrix. If
Nonethen the data-type will default to the currentdtype.update_model (bool) – If
True, will update the stored stoichiometric matrix, the matrix type, and the data-type for the model.
- Returns
The stoichiometric matrix for the
MassModelreturned as the givenarray_typeand with a data-type ofdtype.- Return type
matrix of type
array_type
- add_metabolites(metabolite_list)[source]
Add a
listof metabolites to the model.The change is reverted upon exit when using the
MassModelas a context.- Parameters
metabolite_list (list) – A
listcontainingMassMetabolites to add to the model.
- remove_metabolites(metabolite_list, destructive=False)[source]
Remove a
listof metabolites from the model.The change is reverted upon exit when using the
MassModelas a context.- Parameters
metabolite_list (list) –
- A list containing
MassMetabolites to remove from the model.
- A list containing
destructive (bool) – If
False, the metabolites are removed from all associated reactions. IfTrue, also remove associatedMassReactions from the model.
- add_boundary_conditions(boundary_conditions)[source]
Add boundary conditions values for the given boundary metabolites.
Boundary condition values can be a numerical value, or they can be a string or
sympyexpression representing a function of time. The function must only depend on time.- Parameters
boundary_conditions (dict) – A
dictof boundary conditions containing the ‘boundary metabolites’ and their corresponding value. The string representing the ‘boundary_metabolite’ must exist in thelistreturned byMassModel.boundary_metabolites.
See also
- remove_boundary_conditions(boundary_metabolite_list)[source]
Remove the boundary condition for a list of boundary metabolites.
- Parameters
metabolite_list (list) – A
listof metabolites to remove the boundary conditions for. Boundary metabolites must already exist in the model in order for them to be removed.
See also
- add_reactions(reaction_list)[source]
Add reactions to the model.
The change is reverted upon exit when using the
MassModelas a context.Notes
MassReactions with identifiers identical to an existing reaction are ignored.Extends
cobra.core.model.Model.add_reactions()by first ensuring that the reactions to be added areMassReactionss and notcobra.Reactions. and error message raised reflects themassobject.If a
cobra.Reactionis provided. a warning is raised and aMassReactionwill be instantiated using thecobra.Reaction.
- Parameters
reaction_list (list) – A
listofMassReactions to add to the model.
- remove_reactions(reactions, remove_orphans=False)[source]
Remove reactions from the model.
The change is reverted upon exit when using the
MassModelas a context.Notes
Extends
cobra.core.model.Model.remove_reactions()by also removing any custom rates along with the reaction (and custom parameters ifremove_orphans=True). Also removes the boundary condition if the reaction is a boundary reaction with a defined boundary condition.- Parameters
reaction_list (list) – A
listofMassReactions to be removed from the model.remove_orphans (bool) – If
True, will also remove orphaned genes and metabolites from the model. If a custom rate is removed, the orphaned custom parameters will also be removed.
- add_boundary(metabolite, boundary_type='exchange', reaction_id=None, boundary_condition=0.0, **kwargs)[source]
Add a boundary reaction for a given metabolite.
Accepted
kwargsare passed to the underlying function for boundary reaction creation,cobra.Model.add_boundary, and initialization of theMassReaction.There are three different types of pre-defined boundary reactions: exchange, demand, and sink reactions.
An exchange reaction is a reversible, unbalanced reaction that adds to or removes an extracellular metabolite from the extracellular compartment.
A demand reaction is an irreversible reaction that consumes an intracellular metabolite.
A sink is similar to an exchange but specifically for intracellular metabolites.
Notes
Extends
cobra.core.model.Model.add_boundary()by allowing for metabolite identifers of existing metabolites in the model, boundary conditions and reaction subsystem to be set, and utilizes default bounds from theMassConfiguration. for creation of custom boundary reaction types.To set the reaction
boundary_typeto something else, the desired identifier of the created reaction must be specified. The name will be given by the metabolite name and the givenboundary_type, and the reaction will be set its reversible attribute toTrue.Bounds will be set to the defaults specified in the
MassConfiguration.
- Parameters
metabolite (MassMetabolite or str) – Any
MassMetabolite, or an identifier of a metabolite that already exists in the model. The metabolite compartment is not checked but it is encouraged to stick to the definition of exchanges, demands, and sinks.boundary_type (str) – One of the pre-defined boundary types, or a user-defined type. Pre-defined boundary types include
"exchange","demand", and"sink". Using one of the pre-defined reaction types is easiest. To create a user-defined kind of boundary reaction choose any other string, e.g., ‘my-boundary’.reaction_id (str) – The ID of the resulting reaction. This takes precedence over the auto-generated identifiers but beware that it might make boundary reactions harder to identify afterwards when using
boundaryor specificallyexchangesetc.boundary_condition (float, str, Basic) – The boundary condition value to set. Must be an
int,float, or asympyexpression dependent only on time. Default value is 0.**kwargs –
- subsystem :
strfor subsystem where the reaction is meant to occur.- lb :
floatfor the lower bound of the resulting reaction, orNoneto use the default specified in theMassConfiguration.- ub :
floatfor the upper bound of the resulting reaction, orNoneto use the default specified in theMassConfiguration.- sbo_term :
strfor the SBO term. A correct SBO term is set for the available boundary types. If a custom boundary type is chosen, a suitable SBO term should also be set.
- Returns
The
MassReactionof the new boundary reaction.- Return type
- get_rate_expressions(reaction_list=None, rate_type=0, update_reactions=False)[source]
Get the rate expressions for a
listof reactions in the model.Notes
If a reaction has a custom rate in the
MassModel.custom_ratesattribute, it will be returned only when therate_type=0.- Parameters
reaction_list (list) – A
listofMassReactions to get the rate expressions for. Reactions must already exist in the model. IfNone, then return the rates for all reactions in the model.rate_type (int) –
The type of rate law to return. Must be 0, 1, 2, or 3.
If 0, the currrent rate expression is returned.
Type 1 will utilize the
forward_rate_constantand theequilibrium_constant.Type 2 will utilize the
forward_rate_constantand thereverse_rate_constant.Type 3 will utilize the
equilibrium_constantand thereverse_rate_constant.
Default is
0.update_reactions (bool) – If
True, update theMassReactionrate in addition to returning the rate expressions. Will not remove a custom rate.
- Returns
A
dictof reaction rates where keys are the reaction ids and values are the rate law expressions.- Return type
- get_mass_action_ratios(reaction_list=None, sympy_expr=True)[source]
Get mass action ratios for a
listof reactions in the model.- Parameters
reaction_list (list) – A
listofMassReactions to get the mass action ratios for. Reactions must already exist in the model. IfNone, then return the ratios for all reactions in the model.sympy_expr (bool) – If
Truethen return the mass action ratios as asympyexpression, otherwise return the ratio as a human readable string.
- Returns
A
dictof mass action ratios where keys are the reaction ids and values are the ratios.- Return type
- get_disequilibrium_ratios(reaction_list=None, sympy_expr=True)[source]
Get disequilibrium ratios for a
listof reactions in the model.- Parameters
reaction_list (list) – A
listofMassReactions to get the disequilibrium ratios for. Reactions must already exist in the model. IfNone, then return the ratios for all reactions in the model.sympy_expr (bool) – If
Truethen return the disequilibrium ratios as asympyexpression, otherwise return the ratio as a human readable string.
- Returns
A
dictof mass action ratios where keys are the reaction ids and values are the ratios.- Return type
- add_custom_rate(reaction, custom_rate, custom_parameters=None)[source]
Add a custom rate for a reaction to the model.
The change is reverted upon exit when using the
MassModelas a context.Notes
Metabolites must already exist in the
MassModel.Default parameters of a
MassReactionare automatically taken into account and do not need to be defined as additional custom parameters.
- Parameters
reaction (MassReaction) – The reaction associated with the custom rate.
custom_rate (str) – The string representation of the custom rate expression. The string representation of the custom rate will be used to create a
sympyexpression that represents the custom rate.custom_parameters (dict) – A
dictof custom parameters for the custom rate where the key:value pairs are the strings representing the custom parameters and their numerical values. The string representation of the custom parametes will be used to create the symbols needed for the sympy expression of the custom rate. IfNone, then parameters are assumed to already exist in the model.
See also
all_parameter_idsLists the default reaction parameters automatically accounted for.
- remove_custom_rate(reaction, remove_orphans=True)[source]
Remove the custom rate for a given reaction from the model.
The change is reverted upon exit when using the
MassModelas a context.- Parameters
reaction (MassReaction) – The reaction assoicated with the custom rate to be removed.
remove_orphans (bool) – If
True, then remove any orphaned custom parameters from the model.
- reset_custom_rates()[source]
Reset all custom rate expressions and parameters in a model.
The change is reverted upon exit when using the
MassModelas a context.Warning
Using this method will remove all custom rates and custom rate parameters in the model. To remove a specific rate without affecting the other custom rates or parameters, use
remove_custom_rate()instead.
- add_units(unit_defs)[source]
Add a
UnitDefinitionto the modelunits.The change is reverted upon exit when using the
MassModelas a context.Notes
The model will not automatically track or convert units. Therefore, it is up to the user to ensure unit consistency in the model.
- Parameters
unit_defs (list) – A
listofUnitDefinitions to add to the model.
- remove_units(unit_defs)[source]
Remove a
UnitDefinitionfrom the modelunits.The change is reverted upon exit when using the
MassModelas a context.Notes
The model will not automatically track or convert units. Therefore, it is up to the user to ensure unit consistency in the model.
- Parameters
unit_defs (list) – A
listofUnitDefinitions or their string identifiers to remove from the model.
- reset_units()[source]
Reset all unit definitions in a model.
The change is reverted upon exit when using the
MassModelas a context.Warning
Using this method will remove all
UnitDefinitions from the model. To remove aUnitDefinitionwithout affecting other units, useremove_units()instead.
- get_elemental_matrix(array_type=None, dtype=None)[source]
Get the elemental matrix for a model.
- Parameters
array_type (str) – A string identifiying the desired format for the returned matrix. Valid matrix types include
'dense','dok','lil','DataFrame', and'symbolic'Default is'dense'. See thematrixmodule documentation for more information on thearray_type.dtype (data-type) – The desired array data-type for the matrix. If
Nonethen the data-type will default tonumpy.float64.
- Returns
The elemntal matrix for the
MassModelreturned as the givenarray_typeand with a data-type ofdtype.- Return type
matrix of type
array_type
- get_elemental_charge_balancing(array_type=None, dtype=None)[source]
Get the elemental charge balance as a matrix for a model.
- Parameters
array_type (str) – A string identifiying the desired format for the returned matrix. Valid matrix types include
'dense','dok','lil','DataFrame', and'symbolic'Default is'dense'. See thematrixmodule documentation for more information on thearray_type.dtype (data-type) – The desired array data-type for the matrix. If
Nonethen the data-type will default tonumpy.float64.
- Returns
The charge balancing matrix for the
MassModelreturned as the givenarray_typeand with a data-type ofdtype.- Return type
matrix of type
array_type
- repair(rebuild_index=True, rebuild_relationships=True)[source]
Update all indicies and pointers in the model.
Notes
Extends
repair()of thecobra.Modelto include theMassModel.enzyme_modulesandMassModel.units.
- copy()[source]
Create a partial “deepcopy” of the
MassModel.All of the
MassMetabolites,MassReactions,Genes andEnzymeModuleDicts, the boundary conditions, custom_rates, custom_parameters, and the stoichiometric matrix are created anew, but in a faster fashion thandeepcopy.Notes
Overrides
copy()of thecobra.Modelso that all objects aremassobjects and additional attributes of specific to theMassModel.
- merge(right, prefix_existing=None, inplace=True, objective='left')[source]
Merge two models into one model with the objects from both.
The reactions, metabolites, genes, enzyme modules, boundary conditions, custom rate expressions, rate parameters, compartments, units, notes, and annotations from the right model are also copied to left model. However, note that in cases where identifiers for objects are identical or a
dictitem has an identical key(s), priority will be given to what already exists in the left model.Custom constraints and variables from right models are also copied to left model, however note that, constraints and variables are assumed to be the same if they have the same name.
Notes
When merging an
EnzymeModuleinto aMassModel, the enzyme module is converted to anEnzymeModuleDictand stored in aDictListaccessible via theenzyme_modulesattribute. If anEnzymeModuleDictalready exists in the model, it will be replaced.Extends
merge()of thecobra.Modelby including additionalMassModelattributes.
- Parameters
right (MassModel) – The model to merge into the left model.
prefix_existing (str) – If provided, the string is used to prefix the reaction identifier of a reaction in the second model if that reaction already exists within the first model. Will also apply prefix to identifiers of enzyme modules in the second model.
inplace (bool) – If
Truethen add reactions from second (right) model directly to the first (left) model. Otherwise, create a new model leaving the left model untouched. When done within the model as context, changes to the models are reverted upon exit.objective (str) – One of
"left","right"or"sum"for setting the objective of the resulting model to that of the corresponding model or the sum of both. Default is"left".
- Returns
A new
MassModelorselfrepresenting the merged model.- Return type
- compute_steady_state_fluxes(pathways, independent_fluxes, update_reactions=False)[source]
Calculate the unique steady state flux for each reaction.
The unique steady state flux for each reaction in the
MassModelis calculated using defined pathways, independently defined fluxes, and steady state concentrations, where index of values in the pathways must correspond to the index of the reaction inMassModel.reactions.Notes
The number of individually defined fluxes must be the same as the number of pathways in order to determine the solution. For best results, the number of pathways to specify must equal the dimension of the right nullspace.
- Parameters
pathways (array-like) – An array-like object that define the pathways through the reaction network of the model. The given pathway vectors must be the same length as the number of reactions in the model, with indicies of values in the pathway vector corresponding to the indicies of reactions in the
reactionsattribute.independent_fluxes (dict) – A
dictof steady state fluxes whereMassReactions are keys and fluxes are values to utilize in order to calculate all other steady state fluxes. Must be the same length as the number of specified pathways.update_reactions (bool) – If
Truethen update theMassReaction.steady_state_fluxwith the calculated steady state flux value for each reaction.
- Returns
A
dictwhere key:value pairs are theMassReactions with their corresponding calculated steady state fluxes.- Return type
Warning
The indicies of the values in the pathway vector must correspond to the indicies of the reactions in the
reactionsattribute in order for the method to work as intended.
- calculate_PERCs(at_equilibrium_default=100000, update_reactions=False, verbose=False, **kwargs)[source]
Calculate pseudo-order rate constants for reactions in the model.
Pseudo-order rate constants (PERCs) are considered to be the same as
forward_rate_constantattributes, and are calculated based on the steady state concentrations and fluxes.Notes
All fluxes and concentrations used in calculations must be provided, including relevant boundary conditions. By default, the relevant values are taken from objects associated with the model.
To calculate PERCs for a subset of model reactions, use the
fluxeskwawrg.
- Parameters
at_equilibrium_default (float) – The value to set the pseudo-order rate constant if the reaction is at equilibrium. Default is
100,000.update_reactions (bool) – If
Truethen will update the values for theforward_rate_constantattributes with the calculated PERC values.verbose (bool) – Whether to output more verbose messages for errors and logging.
**kwargs –
- fluxes :
A
dictof reaction fluxes whereMassReactions are keys and fluxes are the values. Only reactions provided will have their PERCs calculated. IfNone, PERCs are calculated using the current steady state fluxes for all reactions in the model.Default is
None.- concentrationsdict
A
dictof concentrations necessary for the PERC calculations, whereMassMetabolites are keys and concentrations are the values. IfNone, the relevant concentrations that exist in the model are used.Default is
None.
- Returns
A
dictwhere keys are strings identifers of the pseudo-order rate constants (as given byMassReaction.kf_str) and values are the calculated PERC values.- Return type
- build_model_from_string(model_str, verbose=True, reaction_split=';', reaction_id_split=':', **kwargs)[source]
Create a
MassModelfrom strings of reaction equations.Accepted
kwargsare passed to the underlying function for reaction creation,MassReaction.build_reaction_from_string().Takes a string representation of the reactions and uses the specifications supplied in the optional arguments to first infer a set of reactions and their identifiers, then to infer metabolites, metabolite compartments, and stoichiometries for the reactions. It also infers the reversibility of the reaction from the reaction arrow. For example:
''' RID_1: S + E <=> ES; RID_2: ES -> E + P; RID_3: E + I <=> EI; '''
where
RIDrepresents the identifier to assign theMassReaction.- Parameters
model (str) – A string representing the reaction formulas (equation) for the model.
verbose (bool) – Setting the verbosity of the function.
reaction_split (str) – Dividing individual reaction entries. Default is
";".reaction_id_split (str) – Dividing individual reaction entries from their identifiers. Default is
":".**kwargs –
- fwd_arrow :
re.compile()orNonefor forward irreversible reaction arrows. IfNone, the arrow is expected to be'-->'or'==>'.- rev_arrow :
re.compile()orNonefor backward irreversible reaction arrows. IfNone, the arrow is expected to be'<--'or'<=='.- reversible_arrow :
re.compile()orNonefor reversible reaction arrows. IfNone, the arrow is expected to be'<=>'or'<->'.- term_splitstr
Dividing individual metabolite entries. Default is
"+".
See also
MassReaction.build_reaction_from_string()Base method for building reactions.
- update_parameters(parameters, verbose=True)[source]
Update the parameters associated with the MassModel.
Parameters can be the following:
Notes
The reactions must already exist in the model in order to change associated parameters. Any identifiers that are not identifiers of standard reaction parameter or of any ‘boundary metabolites’ will be set as a custom parameter.
- Parameters
See also
MassReaction.all_parameter_idsLists the default reaction parameter identifiers.
MassModel.boundary_metabolitesLists the ‘boundary metabolites’ found in the model.
- update_initial_conditions(initial_conditions, verbose=True)[source]
Update the initial conditions of the model.
Can also be used to update initial conditions of fixed metabolites to change the concentration value at which the metabolite is fixed.
Notes
The metabolite(s) must already exist in the model to set the initial conditions. Initial conditions for the metabolites are accessed through
MassMetabolite.initial_condition. If an initial condition for a metabolite already exists, it will be replaced.
- update_custom_rates(custom_rates, custom_parameters=None)[source]
Update the custom rates of the model.
- Parameters
custom_rates (dict) – A
dictwhereMassReactions or their string identifiers are the keys and the rates are the string representations of the custom rate expression.custom_parameters (dict) – A
dictof custom parameters for the custom rates, where the key:value pairs are the strings representing the custom parameters and their numerical values. If a custom parameter already exists in the model, it will be updated.
Notes
The reaction(s) must already exist in the model to set the custom rate.
See also
- has_equivalent_odes(right, verbose=False)[source]
Determine whether
odesbetween two models are equivalent.Notes
The ODEs between two models are compared to determine whether the models can be considered equivalent, meaning that the models contain the same metabolites, reactions, and rate expressions such that they require the same set of parameters and initial conditions for simulation.
- set_steady_state_fluxes_from_solver()[source]
Set reaction steady state fluxes based on the state of the solver.
Only works when reaction is associated with a model that has been optimized.
- _cobra_to_mass_repair()[source]
Convert associated cobra objects to mass objects for self.
Warning
This method is intended for internal use only.
- _mk_stoich_matrix(array_type=None, dtype=None, update_model=True)[source]
Return the stoichiometric matrix for a given MassModel.
The rows represent the chemical species and the columns represent the reaction. S[i, j] therefore contains the quantity of species ‘i’ produced (positive) or consumed (negative) by reaction ‘j’.
Warning
This method is intended for internal use only. To safely update the stoichiometric matrix, use
update_S()instead.
- _get_all_parameters()[source]
Get a dict containing all of defined model parameters in the model.
Warning
This method is intended for internal use only.
- _copy_model_metabolites(new_model)[source]
Copy the metabolites in creating a partial “deepcopy” of model.
Warning
This method is intended for internal use only.
- _copy_model_genes(new_model)[source]
Copy the genes in creating a partial “deepcopy” of model.
Warning
This method is intended for internal use only.
- _copy_model_reactions(new_model)[source]
Copy the reactions in creating a partial “deepcopy” of model.
Warning
This method is intended for internal use only.
- _copy_model_enzyme_modules(new_model)[source]
Copy the enzyme_modules in creating a partial “deepcopy” of model.
Warning
This method is intended for internal use only.
- _copy_model_groups(new_model)[source]
Copy the groups in creating a partial “deepcopy” of model.
Warning
This method is intended for internal use only.
- _repr_html_()[source]
HTML representation of the overview for the MassModel.
Warning
This method is intended for internal use only.
- __setstate__(state)[source]
Ensure all objects in the model point to the MassModel.
Extends
Model.__setstate__to include enzyme_modulesWarning
This method is intended for internal use only.