Skip to content

Commit

Permalink
Add samtools to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Minot committed Feb 5, 2018
1 parent bab505c commit 6155736
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ MAINTAINER [email protected]

# Install prerequisites
RUN apt update && \
apt-get install -y build-essential wget unzip python2.7 python-dev git python-pip bats awscli curl
apt-get install -y build-essential wget unzip python2.7 python-dev git python-pip \
bats awscli curl zlib1g-dev libbz2-dev liblzma-dev libcurl4-openssl-dev libssl1.0.0 libssl-dev


# Use /share as the working directory
RUN mkdir /share
Expand All @@ -26,11 +28,23 @@ ENV PYTHONPATH="/usr/midas/MIDAS-1.3.2:${PYTHONPATH}"
ENV PATH="/usr/midas/MIDAS-1.3.2/bin/Linux:${PATH}"
ENV PATH="/usr/midas/MIDAS-1.3.2/scripts:${PATH}"

# Install SAMTOOLS
RUN cd /usr/midas && \
wget https://github.com/samtools/samtools/releases/download/1.4/samtools-1.4.tar.bz2 && \
tar xf samtools-1.4.tar.bz2 && \
cd samtools-1.4 && \
./configure --without-curses && \
make && \
make install && \
rm /usr/local/bin/samtools && \
rm /usr/midas/MIDAS-1.3.2/bin/Linux/samtools && \
ln -s /usr/midas/samtools-1.4/samtools /usr/local/bin/ && \
rm /usr/midas/samtools-1.4.tar.bz2

# Install the SRA toolkit
RUN cd /usr/local/bin && \
wget https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.8.2/sratoolkit.2.8.2-ubuntu64.tar.gz && \
tar xzvf sratoolkit.2.8.2-ubuntu64.tar.gz && \
tar xzf sratoolkit.2.8.2-ubuntu64.tar.gz && \
ln -s /usr/local/bin/sratoolkit.2.8.2-ubuntu64/bin/* /usr/local/bin/ && \
rm sratoolkit.2.8.2-ubuntu64.tar.gz

Expand Down
6 changes: 6 additions & 0 deletions tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
[[ "$v" =~ "7.47.0" ]]
}

@test "Samtools v1.4" {
v="$(samtools --version)"

[[ "$v" =~ "samtools 1.4" ]]
}

@test "Make sure MIDAS is in the PATH" {
h="$(run_midas.py -h)"

Expand Down

0 comments on commit 6155736

Please sign in to comment.