-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from agduncan94/feature/docker-support
Feature/docker support
- Loading branch information
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.DS_Store | ||
node_modules/ | ||
docker/data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM node:latest | ||
|
||
LABEL maintainer="andrew.duncan@oicr.on.ca" | ||
|
||
ENV JBROWSE_VERSION 1.16.3 | ||
|
||
# Install dependencies | ||
RUN apt-get -qq update --fix-missing | ||
RUN apt-get --no-install-recommends -y install git build-essential zlib1g-dev libxml2-dev libexpat-dev postgresql-client libpq-dev ca-certificates curl | ||
|
||
# Download JBrowse | ||
RUN mkdir -p /jbrowse/ && \ | ||
git clone --recursive https://github.com/gmod/jbrowse /jbrowse/ && \ | ||
cd /jbrowse/ && \ | ||
git checkout ${JBROWSE_VERSION}-release | ||
|
||
WORKDIR /jbrowse/ | ||
|
||
# Download ICGC Viewer | ||
RUN git clone https://github.com/agduncan94/icgc-viewer /icgc-viewer/ && \ | ||
cd /icgc-viewer/ && \ | ||
git checkout 0.1.5 && \ | ||
cp -r icgc-viewer /jbrowse/plugins/icgc-viewer && \ | ||
cat ./data/jbrowse.conf > /jbrowse/jbrowse.conf | ||
|
||
# Setup JBrowse | ||
RUN ./setup.sh && \ | ||
./bin/cpanm --force JSON Hash::Merge PerlIO::gzip Devel::Size \ | ||
Heap::Simple Heap::Simple::XS List::MoreUtils Exception::Class Test::Warn Bio::Perl \ | ||
Bio::DB::SeqFeature::Store File::Next Bio::DB::Das::Chado && \ | ||
rm -rf /root/.cpan/ | ||
|
||
|
||
# Expose port 3000 | ||
EXPOSE 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Running JBrowse with ICGC Plugin in Docker | ||
This will get JBrowse with the ICGC Viewer Plugin running with Express on port 3000. | ||
|
||
Based on [enuggetry/docker-jbrowse](https://github.com/enuggetry/docker-jbrowse) | ||
|
||
## Build and Run from Dockerfile | ||
### Setup data | ||
*Important*: Place your track data in `./data`. This maps to `/jbrowse/data` in the container, which is where JBrowse stores reference data and track information. | ||
|
||
### Build the docker image | ||
`docker build . -t jbrowse-with-icgc` | ||
|
||
### Run the docker image | ||
`docker run -p 3000:3000 -v {pwd}/data:/jbrowse/data jbrowse-with-icgc utils/jb_run.js -p 3000` | ||
|
||
Note: You can run in the background using the detach mode (-d) | ||
|
||
`docker run -d -p 3000:3000 -v {pwd}/data:/jbrowse/data jbrowse-with-icgc utils/jb_run.js -p 3000` | ||
|
||
## Build and Run from Docker Compose | ||
You can also use Docker Compose to build the image. Ensure you are working in the same directory as the `docker-compose.yml`. | ||
|
||
### Build docker-compose | ||
`docker-compose build` | ||
|
||
### Run the docker-compose | ||
`docker-compose up` | ||
|
||
Note: You can run in the background using the detach mode (-d) | ||
|
||
`docker-compose up -d` | ||
|
||
## Load refseq and tracks | ||
If you already have your tracks.conf and seq/, etc., you can simply put these files into your `./data` directory. | ||
|
||
You will have to put the RefSeq data into the `./data` directory. Download the GRCH37 `.fa` and `.fa.fai` files from online (ex. http://bioinfo.hpc.cam.ac.uk/downloads/datasets/fasta/grch37/). Then put the following in `./data/tracks.conf` (note files may be named something else). | ||
|
||
``` | ||
refSeqs=GRCh37.genome.fa.fai | ||
[tracks.refseqs] | ||
urlTemplate=GRCh37.genome.fa | ||
``` | ||
|
||
Now go to `localhost:3000` and you should see JBrowse with your refdata and tracks! | ||
|
||
### Enter the Docker Container | ||
|
||
You can enter the container by doing the following: | ||
|
||
``` | ||
# Get container ID | ||
docker ps | ||
# Enter container | ||
docker exec -it <container-id> /bin/bash | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3' | ||
services: | ||
jbrowse: | ||
build: . | ||
command: utils/jb_run.js -p 3000 | ||
ports: | ||
- "3000:3000" | ||
volumes: | ||
- ./data:/jbrowse/data | ||
|