Code Monkey home page Code Monkey logo

scala-smfsb's Introduction

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.6"
  • The current unstable snapshot release of this library is "0.7-SNAPSHOT"

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

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.6"
set libraryDependencies += "org.scalanlp" %% "breeze-viz" % "0.13.2"
set scalaVersion := "2.12.6"
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.6"

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

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

Snapshot:

Just add something like:

libraryDependencies += "com.github.darrenjw" %% "scala-smfsb" % "0.7-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:

sbt clean compile test doc package

from the top-level directory.

scala-smfsb's People

Contributors

darrenjw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.