biocrnpyler.utils.sbmlutil
Functions
|
Adds the list of Compartment objects to the SBML model. |
|
Adds a list of reactions to the SBML model. |
|
Adds a list of Species to the SBML model. |
|
Helper function to add a compartment to the SBML model. |
|
|
|
Adds a sbml_reaction to an sbml model. |
|
Helper function to add a species to the sbml model. |
|
Creates SBML Level 3 Version 2 model with some fixed standard settings. |
|
|
|
|
|
Returns a list of species in the Model with the given name. |
|
Find SBML compartment object from name in SBML file. |
|
|
|
Validates SBML model using libSBML SBML validation code. |
Classes
|
|
|
Class to validate the generated SBML models. |
- class biocrnpyler.utils.sbmlutil.SetIdFromNames(ids)[source]
- __swig_destroy__(IdentifierTransformer self)
- property thisown
The membership flag
- biocrnpyler.utils.sbmlutil.add_all_compartments(model, compartments: List, **kwargs)[source]
Adds the list of Compartment objects to the SBML model.
- Parameters:
- modellibsbml.Model
Valid SBML model.
- compartmentslist
List of compartments to be added to the SBML model.
- biocrnpyler.utils.sbmlutil.add_all_reactions(model, reactions: List, stochastic=False, **kwargs)[source]
Adds a list of reactions to the SBML model.
- Parameters:
- modellibsbml.Model
An sbml model created by create_sbml_model().
- reactionslist
List of Reactions.
- stochasticbool
Binary flag for stochastic models.
- biocrnpyler.utils.sbmlutil.add_all_species(model, species: List, initial_condition_dictionary: dict, compartment=None, **kwargs)[source]
Adds a list of Species to the SBML model.
- Parameters:
- modellibsbml.Model
Valid SBML model.
- specieslist
List of species to be added to the SBML model.
- initial_condition_dictionarydict
A dictionary s –> initial_concentration.
- compartmentstr, optional
Compartment id, if empty species go to the first compartment.
- biocrnpyler.utils.sbmlutil.add_compartment(model, compartment, **kwargs)[source]
Helper function to add a compartment to the SBML model.
- Parameters:
- modellibsbml.Model
A valid SBML model.
- compartmentbcp.Compartment
A Compartment object.
- Returns:
- libsbml.Compartment
SBML compartment object.
- biocrnpyler.utils.sbmlutil.add_reaction(model, crn_reaction, reaction_id: str, stochastic: bool = False, reverse_reaction: bool = False, **kwargs)[source]
Adds a sbml_reaction to an sbml model.
- Parameters:
- modellibsbml.Model
An sbml model created by create_sbml_model().
- crn_reactionbcp.Reaction
Must be a chemical_reaction_network.reaction object.
- reaction_idstr
Unique id of the reaction.
- stochasticbool
Stochastic model flag.
- reverse_reactionbool
- Returns:
- libsbml.Reaction
SBML Reaction object.
- biocrnpyler.utils.sbmlutil.add_species(model, compartment, species_name, species_id, initial_concentration=None, **kwargs)[source]
Helper function to add a species to the sbml model.
- Parameters:
- modellibsbml.Model
- compartmentlibsbml.Compartment
A compartment in the SBML model.
- species_namestr
- species_idstr
- initial_concentrationfloat, optional
Initial concentration of the species in the SBML model.
- Returns:
- libsbml.Species
SBML species object.
- biocrnpyler.utils.sbmlutil.create_sbml_model(compartment_id='default', time_units='second', extent_units='mole', substance_units='mole', length_units='metre', area_units='square_metre', volume_units='litre', volume=1e-06, model_id=None, **kwargs)[source]
Creates SBML Level 3 Version 2 model with some fixed standard settings.
Refer to python-libsbml for more information on SBML API.
- Parameters:
- compartment_idstr
- time_unitsstr
- extent_unitsstr
- substance_unitsstr
- length_unitsstr
- area_unitsstr
- volume_unitsstr
- volumefloat
- model_idstr
- Returns:
- tuple
The SBMLDocument and the Model object as a tuple.
- biocrnpyler.utils.sbmlutil.getSpeciesByName(model, name, compartment='')[source]
Returns a list of species in the Model with the given name.
- Parameters:
- compartmentstr, optional
Compartment name in which to look for the species.
- biocrnpyler.utils.sbmlutil.get_compartment_by_name(model, compartment_name)[source]
Find SBML compartment object from name in SBML file.