Welcome to the q-bio Summer School and Conference!

ML-Rules and SESSL

From Q-bio

Back to The Tenth q-bio Summer School - New Mexico

Downloads

  • ML-Rules current
    • This is a Java JAR file containing a sandbox for implementing and simulating ML-Rules models. To run, it requires a recent Java Development Kit (JDK) such as OpenJDK or Oracle's JDK
    • Once downloaded, open a command shell and navigate to the folder where the file is located and type: java -jar mlrules.jar to start the sandbox
  • SESSL current
    • This is a folder containing the SESSL library and bindings for ML-Rules (2 JAR files) as well as a folder containing additional libraries for integrating SESSL-based experiments with various computational tools
    • SESSL is written in Scala and therefore needs access to a Scala compiler to run. To obtain the necessary tools either download Scala directly or use a package manager to do this for you (e.g. Homebrew for OS X, apt-get for Ubuntu Linux). Be sure that you can locate the top-level Scala directory

Instructions for using SESSL on the command line

  • Confirm that Scala is on your system as well as a JDK
  • Once you have your Scala file specifying your desired experiment(s) with SESSL (e.g. "Experiment.scala"), navigate to the enclosing folder using the command line
  • Assuming you downloaded and installed Scala directly, compile the .scala file using a command of the form:
/path/to/scalac -classpath "/path/to/sessl/jars/*:/path/to/sessl/libs/*" Experiment.scala -d Experiment.jar
  • Run the program
java -classpath "*:/path/to/sessl/jars/*:/path/to/sessl/libs/*" Experiment

Instructions for using SESSL with Intellij

  • Intellij is a Java IDE that has a good plugin for Scala
    • Install the Community version of Intellij IDEA and navigate to the Settings/Preferences menu
    • Go to the Plugins option and click "Install Jetbrains plugin" and install the Scala plugin listed
    • Restart Intellij IDEA
  • To create a new project in Intellij:
    • Click "Create New Project"
    • Select Scala on the left-hand panel and select Scala in the subsequent menu
    • Click next and enter in relevant names/directories for your project
    • If the Scala SDK item is not populated, click Create and choose the top-level folder of your Scala installation (it should contain a set of folders including "bin" and "lib")
  • To create a SESSL experiment we need to add the ML-Rules and SESSL JARs to the project classpath
    • In your newly created project find and navigate to "Project Structure"
    • Select "Modules" in the left-hand panel
    • Select the "Dependencies" tab and click on the "+" icon, choosing JARs or directories
    • Navigate to the directory containing the SESSL JARs and repeat this process, selecting the "libs" subfolder in the SESSL directory
    • Confirm that the Scope is set to Compile
  • The project should now be ready for building a SESSL experiment. The actual Experiment.scala file should be placed in the "src" folder of the project


Note that there are a number of ways to set up such a project and this is only one. Build tools such as SBT or Apache Maven can automate this setup process, but require their own configuration.

Links