gillespy package¶
Submodules¶
gillespy.SBMLimport module¶
gillespy.gillespy module¶
Code based off StochSS internal interface to StochKit, originally by A. Hellander. Stand-alone GillesPy module work by J. Abel and B. Drawert.
Version 1.0 on github as of 8-7-2015.
-
class
gillespy.gillespy.
Model
(name='', volume=1.0)[source]¶ Bases:
object
Representation of a well mixed biochemical model. Contains reactions, parameters, species, etc.
-
add_parameter
(params)[source]¶ Add Paramter(s) to listOfParamters. Input can be either a single paramter object or a list of Parameters.
-
add_reaction
(reacs)[source]¶ Add reactions to model. Input can be single instance, a list of instances or a dict with name,instance pairs.
-
add_species
(obj)[source]¶ Add a species to listOfSpecies. Accepts input either as a single Species object, or as a list of Species objects.
-
-
class
gillespy.gillespy.
Parameter
(name='', expression=None, value=None)[source]¶ A parameter can be given as an expression (function) or directly as a value (scalar). If given an expression, it should be understood as evaluable in the namespace of a parent Model.
-
exception
gillespy.gillespy.
ParameterError
[source]¶ Bases:
gillespy.gillespy.ModelError
-
class
gillespy.gillespy.
Reaction
(name='', reactants={}, products={}, propensity_function=None, massaction=False, rate=None, annotation=None)[source]¶ Models a single reaction. A reaction has its own dictinaries of species (reactants and products) and parameters. The reaction’s propensity function needs to be evaluable (and result in a non-negative scalar value) in the namespace defined by the union of those dicts.
-
exception
gillespy.gillespy.
ReactionError
[source]¶ Bases:
gillespy.gillespy.ModelError
-
exception
gillespy.gillespy.
SpeciesError
[source]¶ Bases:
gillespy.gillespy.ModelError
-
class
gillespy.gillespy.
StochKitEnsemble
(id=None, trajectories=None, parentmodel=None)[source]¶ A stochKit ensemble is a collection of StochKitTrajectories, all sharing a common set of metadata (generated from the same model instance).
-
class
gillespy.gillespy.
StochKitODESolver
[source]¶ Bases:
gillespy.gillespy.GillesPySolver
Solver class to simulate Stochasticly with StockKit.
-
class
gillespy.gillespy.
StochKitOutputCollection
(collection=[])[source]¶ A collection of StochKit Ensembles, not necessarily generated from a common model instance (i.e. they do not necessarly have the same metadata). This datastructure can be useful to store e.g. data from parameter sweeps, or simply an ensemble of ensembles.
AH: Something like a PyTables object would be very useful here, if working in a Python environment.
-
class
gillespy.gillespy.
StochKitSolver
[source]¶ Bases:
gillespy.gillespy.GillesPySolver
Solver class to simulate Stochasticly with StockKit.
-
class
gillespy.gillespy.
StochKitTrajectory
(data=None, id=None)[source]¶ A StochKitTrajectory is a numpy ndarray. The first column is the time points in the timeseries, followed by species copy numbers.
-
class
gillespy.gillespy.
StochMLDocument
[source]¶ Serializiation and deserialization of a Model to/from the native StochKit2 XML format.
-
classmethod
from_file
(filepath)[source]¶ Intializes the document from an exisiting native StochKit XML file read from disk.
-
classmethod
from_model
(model)[source]¶ Creates an StochKit XML document from an exisiting Mdoel object. This method assumes that all the parameters in the model are already resolved to scalar floats (see Model.resolveParamters).
Note, this method is intended to be used interanally by the models ‘serialization’ function, which performs additional operations and tests on the model prior to writing out the XML file. You should NOT do
document = StochMLDocument.fromModel(model) print document.toString()
you SHOULD do
print model.serialize()
-
classmethod