-
Notifications
You must be signed in to change notification settings - Fork 9
Local iobio setup
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.
- Update apt-get - sudo apt-get update
- Install git - sudo apt-get install git
- Download iobio - git clone https://github.com/chmille4/iobio.git
- Install nodejs - sudo apt-get install nodejs
- Install nodejs legacy support - sudo apt-get install nodejs-legacy
- Install node package manager - sudo apt-get install npm
- Change directory to iobio - cd iobio
- Install express node module - npm install express
- Install binaryjs node module - npm install binaryjs
- Install ejs node module - npm install ejs
- Make ./iobio/tools directory – mkdir tools
- Change to tools directory – cd tools/
- Install bamtools
- Install cmake – sudo apt-get install cmake
- Download Bamtools - git clone https://github.com/pezmaster31/bamtools.git
- cd bamtools
- mkdir build
- cd build
- cmake -DEnableNodeJS=true ../
- make
- go iobio/bin directory – cd ../../../bin
- create link to executable in bin directory - ln -s ../tools/bamtools/bin/bamtools bamtools
- go back to iobio directory – cd ../
- Install samtools
- Install ncurses headers - sudo apt-get install libncurses5-dev
- Download and install samtools in ./iobio/tools directory according to samtools instructions
- Go to ./iobio/bin directory
- Create link to samtools executable in bin directory – ln –s ../tools/samtools-0.1.19/samtools samtools
- Install bamReadDepther
- Got to ./iobio/tools directory
- Download bamReadDepther – git clone https://github.com/chmille4/bamReadDepther.git
- Go to bamReadDepther directory – cd bamReadDepther
- Compile source code - g++ -o bamReadDepther sampler.cpp
- Go to ./iobio/bin directory
- Create a link to executable – ln –s ../tools/bamReadDepther/bamReadDepther bamReadDepther
- Install bamstatsalive
- Go to ./iobo/tools directory
- Copy bamtools lib to lib directory - sudo cp bamtools/lib/libbamtools.so.2.3.0 /usr/local/lib
- Create links to newly shared lib - sudo ldconfig
- Download bamstatsalive – git clone https://github.com/yiq/bamstatsAlive.git
- Cd bamstatsalive/
- Add export BAMTOOLS=”PATH_TO_BAMTOOLS_DIRECTORY(NOT_EXECUTABLE)” in the ~/.profile file
- Reload profile – source ~/.profile
- Make
- Go to ./iobio/bin directory
- Create link to executable - ln –s ../tools/bamstatsAlive/bamstatsAlive bamstatsAlive
- Cd ./iobio
- Install forever – sudo npm install forever -g
- Turn on all relevant webservices:
- forever start services/bamtoolsServer.js
- forever start services/bamMergerServer.js
- forever start services/samtoolsServer.js
- forever start services/bamReadDepther.js
- forever start services/bamstatsaliveServer.js
- Place bam.iobio in some server like apache
- Download website – git clone https://github.com/chmille4/bam.iobio.io.git
- Cd bam.iobio.io
- Checkout gh-pages branch – git checkout gh-pages
- Update bam.iobio.js to point to new locally running webservices
- 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.
- 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.