StochPy is a versatile stochastic modeling package which is designed for stochastic simulation of molecular control networks
- File releases: http://sourceforge.net/projects/stochpy
- Source code: https://github.com/SystemsBioinformatics/stochpy
Documentation can be found in the user guide (see Documentation directory or in sourceforge)
The following software is required before installing StochPy (see user guide for more details):
- Python 2.6+ or Python 3.4+
- NumPy 1.x+
- Matplotlib (optional)
- libsbml (optional)
- libxml2 (optional)
- mpmath (optional)
In the directory where you downloaded StochPy, go to the directory StochPy-2.1.0 and exec the next command:
sudo python setup.py install
Use the available windows installer or the setup file
You can run ipython
and import stochpy
:
import stochpy
smod = stochpy.SSA()
smod.DoStochSim(IsTrackPropensities=True)
smod.data_stochsim.simulation_endtime
smod.data_stochsim.simulation_timesteps
smod.GetWaitingtimes()
smod.PrintWaitingtimesMeans()
smod.PlotSpeciesTimeSeries()
smod.PlotWaitingtimesDistributions()
smod.PlotPropensitiesTimeSeries()
smod.Export2File()
smod.Export2File(analysis='distribution')
smod.Export2File(analysis='distribution',datatype='species')
smod.Export2File(analysis='mean',datatype='species')
smod.Export2File(analysis='std',datatype='species')
smod.Export2File(analysis='autocorrelation',datatype='species')
smod.DoStochSim(trajectories=3) # multiple trajectories
smod.data_stochsim.simulation_trajectory
smod.PrintSpeciesMeans()
smod.PrintSpeciesStandardDeviations()
smod.GetTrajectoryData(1)
smod.PrintSpeciesMeans()
smod.PrintSpeciesStandardDeviations()
smod.DoStochSim(trajectories=1,end=1000000,mode='steps')
smod.PrintSpeciesMeans()
smod.PrintSpeciesStandardDeviations()
smod.PlotSpeciesDistributions()
smod.PlotSpeciesDistributions(bin_size=5) # larger bin size
smod.PlotSpeciesDistributions(bin_size=10) # again a larger bin size
smod.Export2File(analysis='distribution',datatype='species')
smod.ChangeParameter('Ksyn',20.0)
smod.ChangeParameter('Kdeg',0.2)
smod.DoStochSim()
smod.PrintSpeciesMeans() # should be ~Ksyn/Kdeg
smod.Model('dsmts-001-01.xml.psc')
smod.DoStochSim(trajectories=1000,end=50,mode='time')
smod.GetRegularGrid(npoints=51)
smod.PlotAverageSpeciesTimeSeries()
smod.PrintAverageSpeciesTimeSeries()
smod.Export2File(datatype='species',analysis='timeseries',IsAverage=True)
smod.Model('Autoreg.psc')
smod.DoStochSim(trajectories=1,end=1000,mode='steps')
smod.Method('NextReactionMethod')
smod.DoStochSim(trajectories=1,end=1000,mode='steps')
smod.data_stochsim.species
smod.PlotWaitingtimesDistributions()
smod.Method('FirstReactionMethod')
smod.DoStochSim(trajectories=1,end=1000,mode='steps')
smod.Method('TauLeaping')
smod.DoStochSim(trajectories=1,end=1000,mode='steps')
smod.Model('DecayingDimerizing.psc')
smod.DoStochSim(method = 'Direct',trajectories=1,end=50,mode='time')
smod.DoStochSim(method = 'NextReactionMethod',trajectories=1,end=50,mode='time')
smod.DoStochSim(method = 'FirstReactionMethod',trajectories=1,end=50,mode='time')
smod.PlotWaitingtimesDistributions()
smod.DoStochSim(method = 'TauLeaping',trajectories=1,end=50,mode='time',epsilon=0.03) # Should outperform all other implementations
smod.PlotSpeciesTimeSeries()
#smod.PlotWaitingtimesDistributions() # Should give an error
smod.Model('chain500.psc')
smod.DoStochSim(method = 'Direct',trajectories=1,end=10000,mode='steps')
smod.DoStochSim(method = 'NextReactionMethod',trajectories=1,end=10000,mode='steps') # should outperform the direct method and all other implementations
smod.Model('dsmts-003-03.xml.psc')
smod.DoStochSim(method = 'NextReactionMethod')
smod.DoTestsuite()
smod.Model('dsmts-003-04.xml.psc')
smod.DoStochSim(method = 'FirstReactionMethod')
smod.DoTestsuite()
smod.Model('dsmts-001-11.xml.psc')
smod.DoStochSim(method = 'Direct',trajectories=1000,end=50,mode ='time')
smod.PrintAverageSpeciesTimeSeries()
Timo R. Maarleveld, Brett G. Olivier, and Frank J. Bruggeman Centrum Wiskunde en Informatica, Amsterdam, Netherlands VU University, Amsterdam, Netherlands
e-mail: tmd200@users.sourceforge.net
StochPy: A Comprehensive, User-Friendly Tool for Simulating Stochastic Biological Processes http://dx.doi.org/10.1371/journal.pone.0079345
Copyright (c) 2011-2016, Timo R. Maarleveld, Brett G. Olivier, and Frank J. Bruggeman All rights reserved.
StochPy is distributed under a BSD style licence.