Skip to content

Commit

Permalink
dockerfile added
Browse files Browse the repository at this point in the history
  • Loading branch information
calkan committed Aug 15, 2018
1 parent b232b01 commit e0a7b39
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,19 @@ Assume that you have your alignment file `alignment.bam`, original long reads `l
./hercules -2 -li long.fasta -ai alignment.bam -si preprocessing/short.fasta -t 30 -o corrected_long.fasta
```
Resulting fasta file `corrected_long.fasta` will be the final output of Hercules.


## Running Hercules via Docker

To build a Docker image:

cd docker
docker build . -t hercules:latest

Your image named "hercules" should be ready. You can run hercules using this image by

docker run --user=$UID -v /path/to/inputs:/input -v /path/to/outputdir:/output hercules [args]

- ```[args]``` are usual arguments you would pass to hercules executable. Be careful about mapping. You need to specify folders respective to container directory structure.
- You need to map host machine input and output directory to responding volume directories inside the container. These options are specified by '-v' argment.
- Docker works with root user by default. "--user" option saves your outputs.
19 changes: 19 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:18.04

RUN apt-get update -y --fix-missing
RUN apt-get install git make gcc zlib1g-dev -y

RUN mkdir /hercules
RUN mkdir /input
RUN mkdir /output
WORKDIR /hercules

RUN apt install -y xz-utils
RUN apt install -y g++
RUN git clone https://github.com/BilkentCompGen/hercules.git /hercules
RUN cd src && make

ENV PATH="/hercules/bin:${PATH}"
VOLUME /input
VOLUME /output
ENTRYPOINT ["/hercules/bin/hercules"]

0 comments on commit e0a7b39

Please sign in to comment.