Skip to content
Chase Miller edited this page Jan 22, 2016 · 8 revisions

This document is old and no longer supported. Please use the docker setup instructions

This document will show you how to download and install all components needed to run bam.iobio.io locally. Running bam.iobio.io locally may be desirable for analyzing sensitive medical data.

OS: This document was generated using Ubuntu Server 14.04 LTS on a clean aws instance.

Setup iobio

  1. Update apt-get - sudo apt-get update
  2. Install git - sudo apt-get install git
  3. Download iobio - git clone https://github.com/chmille4/iobio.git
  4. Install nodejs - sudo apt-get install nodejs
  5. Install nodejs legacy support - sudo apt-get install nodejs-legacy
  6. Install node package manager - sudo apt-get install npm
  7. Change directory to iobio - cd iobio
  8. Install express node module - npm install express
  9. Install binaryjs node module - npm install binaryjs
  10. Install ejs node module - npm install ejs

Setup iobio web services that bam.iobio uses:

  1. Make ./iobio/tools directory – mkdir tools
  2. Change to tools directory – cd tools/
  3. Install bamtools
    1. Install cmake – sudo apt-get install cmake
    2. Download Bamtools - git clone https://github.com/pezmaster31/bamtools.git
    3. cd bamtools
    4. mkdir build
    5. cd build
    6. cmake -DEnableNodeJS=true ../
    7. make
    8. go iobio/bin directory – cd ../../../bin
    9. create link to executable in bin directory - ln -s ../tools/bamtools/bin/bamtools bamtools
    10. go back to iobio directory – cd ../
  4. Install samtools
    1. Install ncurses headers - sudo apt-get install libncurses5-dev
    2. Download and install samtools in ./iobio/tools directory according to samtools instructions
    3. Go to ./iobio/bin directory
    4. Create link to samtools executable in bin directory – ln –s ../tools/samtools-0.1.19/samtools samtools
  5. Install bamReadDepther
    1. Got to ./iobio/tools directory
    2. Download bamReadDepther – git clone https://github.com/chmille4/bamReadDepther.git
    3. Go to bamReadDepther directory – cd bamReadDepther
    4. Compile source code - g++ -o bamReadDepther sampler.cpp
    5. Go to ./iobio/bin directory
    6. Create a link to executable – ln –s ../tools/bamReadDepther/bamReadDepther bamReadDepther
  6. Install bamstatsalive
    1. Go to ./iobo/tools directory
    2. Copy bamtools lib to lib directory - sudo cp bamtools/lib/libbamtools.so.2.3.0 /usr/local/lib
    3. Create links to newly shared lib - sudo ldconfig
    4. Download bamstatsalive – git clone https://github.com/yiq/bamstatsAlive.git
    5. Cd bamstatsalive/
    6. Add export BAMTOOLS=”PATH_TO_BAMTOOLS_DIRECTORY(NOT_EXECUTABLE)” in the ~/.profile file
    7. Reload profile – source ~/.profile
    8. Make
    9. Go to ./iobio/bin directory
    10. Create link to executable - ln –s ../tools/bamstatsAlive/bamstatsAlive bamstatsAlive

Setup web services

  1. Cd ./iobio
  2. Install forever – sudo npm install forever -g
  3. Turn on all relevant webservices:
    1. forever start services/bamtoolsServer.js
    2. forever start services/bamMergerServer.js
    3. forever start services/samtoolsServer.js
    4. forever start services/bamReadDepther.js
    5. forever start services/bamstatsaliveServer.js

Setup bam.iobio.io locally

  1. Place bam.iobio in some server like apache
  2. Download website – git clone https://github.com/chmille4/bam.iobio.io.git
  3. Cd bam.iobio.io
  4. Checkout gh-pages branch – git checkout gh-pages
  5. Update bam.iobio.js to point to new locally running webservices
    1. Edit ./bam.iobio.io/js/bam.iobio.js/bam.iobio.js line 26 and replace ws://bamtools.iobio.io with the ip address of your locally running web service. For example if testing and want to run on localhost you would replace with ws://0.0.0.0:7030. The port (7030) is the default port for the bamtools webservice.
    2. Do this for all 5 webservices. The correct port for each can be found by looking at the webservice config file (e.g. ./iobio/services/bamtoolsServer.js) line 20.

Done! Go to the url for bam.iobio that you are running on your own server and it should work.