scala-smfsb


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.github.darrenjw
ArtifactId

ArtifactId

scala-smfsb_2.12
Last Version

Last Version

0.7
Release Date

Release Date

Type

Type

jar
Description

Description

scala-smfsb
scala-smfsb
Project URL

Project URL

https://github.com/darrenjw/scala-smfsb/blob/master/README.md
Project Organization

Project Organization

com.github.darrenjw
Source Code Management

Source Code Management

https://github.com/darrenjw/scala-smfsb

Download scala-smfsb_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.darrenjw/scala-smfsb_2.12/ -->
<dependency>
    <groupId>com.github.darrenjw</groupId>
    <artifactId>scala-smfsb_2.12</artifactId>
    <version>0.7</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.darrenjw/scala-smfsb_2.12/
implementation 'com.github.darrenjw:scala-smfsb_2.12:0.7'
// https://jarcasting.com/artifacts/com.github.darrenjw/scala-smfsb_2.12/
implementation ("com.github.darrenjw:scala-smfsb_2.12:0.7")
'com.github.darrenjw:scala-smfsb_2.12:jar:0.7'
<dependency org="com.github.darrenjw" name="scala-smfsb_2.12" rev="0.7">
  <artifact name="scala-smfsb_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.darrenjw', module='scala-smfsb_2.12', version='0.7')
)
libraryDependencies += "com.github.darrenjw" % "scala-smfsb_2.12" % "0.7"
[com.github.darrenjw/scala-smfsb_2.12 "0.7"]

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.10
org.scalanlp : breeze_2.12 jar 1.0
org.scalanlp : breeze-viz_2.12 jar 1.0
org.scalanlp : breeze-natives_2.12 jar 1.0

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.8

Project Modules

There are no modules declared in this project.

scala-smfsb

Scala library for stochastic kinetic modelling, biochemical network simulation, and parameter inference, associated with the 3rd edition of the textbook Stochastic Modelling for Systems Biology

  • The current stable version of this library is "0.7"
  • The current unstable snapshot release of this library is "0.8-SNAPSHOT"

Binaries are published to Sonatype, cross-built for Scala 2.11.x and 2.12.x.

N.B. Version 0.7 includes SIR and SEIR epidemic models, for convenience, due to their topical interest.

Quickstart

  • To use this software library, you should first install a recent JDK and Sbt.
  • Run sbt from an empty/temp directory
  • At the sbt prompt, enter:
set libraryDependencies += "com.github.darrenjw" %% "scala-smfsb" % "0.7"
set libraryDependencies += "org.scalanlp" %% "breeze-viz" % "1.0"
set scalaVersion := "2.12.10"
console
  • You should now have a Scala REPL with a dependency on this library. At the Scala REPL, enter the following:
import smfsb._
import breeze.linalg._
val model = SpnModels.lv[IntState]()
val step = Step.gillespie(model)
val ts = Sim.ts(DenseVector(50, 40), 0.0, 20.0, 0.1, step)
Sim.plotTs(ts)
  • This should simulate a trajectory from a Lotka-Volterra model and plot the result in a window on the console which looks a little bit like the following:

Lotka-Volterra trajectory

To get the most out of this library, it will be helpful if you are already familiar with the R package smfsb associated with the (2nd or) 3rd edition of the textbook Stochastic modelling for systems biology, and have a basic familiarity with Scala and Breeze. For those new to Scala, my course on Scala for statistical computing is a good place to start.

Documentation

Using the library in your own Scala projects

giter8 template:

To create a new Scala sbt project template, just use:

sbt new darrenjw/scala-smfsb.g8

This will create a new project including a dependence on the stable version of the library.

Stable:

Just add:

"com.github.darrenjw" %% "scala-smfsb" % "0.7"

to your Sbt library dependencies. You might also need to add an explicit dependence on breeze-viz:

"org.scalanlp" %% "breeze-viz" % "1.0"

Snapshot:

Just add something like:

libraryDependencies += "com.github.darrenjw" %% "scala-smfsb" % "0.8-SNAPSHOT"
resolvers += "Sonatype Snapshots" at
    "https://oss.sonatype.org/content/repositories/snapshots/"

to your Sbt build file.

Building from source

Download or clone the repo and do something like:

sbt clean compile doc test package

from the top-level directory (the directory containing build.sbt).

Versions

Version
0.7
0.6
0.5
0.4
0.3
0.2