/porph-screen

porphyrin screening app

Primary LanguageCommon Lisp

Porphyrin Screen Interpretation

Setup

  • $ indicates the shell prompt
  • * indicates the sbcl prompt

Overview

  1. Install SBCL Common Lisp
  2. Istall rlwrap - makes it easier to work at the sbcl command prompt
  3. Install Quicklisp - the package manager
  4. Install Sqlite3
  5. Install Gnuplot for graphs
  6. Create directories
  7. Clone the porph-screen repo from github

Install SBCL

  • Install SBCL from source to get the latest version
  • First install an old version of SBCL
    • SBCL needs a lisp to compile itself therefore
    • $ sudo apt install sbcl
  • Download SBCL source code from http://www.sbcl.org/platform-table.html
  • Extract it (version numbers will change)
    • $ bzip2 -cd sbcl-2.x.x-source.tar.bz2 | tar xvf -
    • $ cd sbcl-2.x.x
    • $ sh make.sh –dynamic-space-size=60Gb –fancy
  • Optional tests and documentation
    • $ cd tests && sh ./run-tests.sh
    • $ cd ../doc/manual/ && make
    • $ cd ../.. ## back to sbcl-2.x.x
    • $ sudo sh install.sh

Install rlwrap

  • $ sudo apt install rlwrap
  • Add the following line to .bashrc
    • alias sbcl=’rlwrap /usr/local/bin/sbcl’

Install Quicklisp

https://www.quicklisp.org/beta/

  • Download the script to a suitable directory
  • Load this file in sbcl
    • $ sbcl –load quicklisp.lisp
  • Start sbcl as follows:
    • $ sbcl
  • Run the following at the sbcl prompt “*”
    • * (quicklisp-quickstart:install)
    • * (ql:add-to-init-file)

Install sqlite3

  • db engine and libraries
    • $ sudo apt install sqlite3 libsqlite3-dev

Install gnuplot

  • $ sudo apt install gnuplot

Clone repositiory

Test

  • Navigate to ~/common-lisp/porph-screen
    • $ sbcl –load “start-app.lisp”
  • It will confirm or create a data directory and a db file
    • ~/data/
    • ~/data/porph_screen.sqlite
  • In a browser navigate to
    • localhost:4242/select
  • End the process either by closing the terminal or Ctrl-C and selecting EXIT

Run in the background

  • Navigate to ~/common-lisp/porph-screen
  • $ ./start-app.sh
  • This script runs the app in a detached screen session.
  • To reattach
    • $ screen -r
  • The process can be ended closing the terminal or Ctrl-C and selecting EXIT