Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 36 additions & 46 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# Run Cmd: docker run -v /path/to/file/dir:/data fred2/optitype
#################################################################

ARG LATEST_VERSION="v1.3.4"

# Source Image
FROM biocontainers/biocontainers:latest

Expand All @@ -23,56 +25,34 @@ USER root
# install
RUN apt-get update && apt-get install -y software-properties-common \
&& apt-get update && apt-get install -y \
gcc-4.9 \
g++-4.9 \
coinor-cbc \
zlib1g-dev \
libbz2-dev \
python-pip \
python-sphinx \
python2.7 \
gcc-4.9 \
g++-4.9 \
coinor-cbc \
zlib1g-dev \
libbz2-dev \
libboost-dev \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
&& apt-get purge
&& apt-get purge \
&& pip install --upgrade pip

#HLA Typing
#OptiType dependecies
RUN curl -O https://support.hdfgroup.org/ftp/HDF5/current18/bin/hdf5-1.8.21-Std-centos7-x86_64-shared_64.tar.gz \
&& tar -xvf hdf5-1.8.21-Std-centos7-x86_64-shared_64.tar.gz \
&& mv hdf5-1.8.21-Std-centos7-x86_64-shared_64/bin/* /usr/local/bin/ \
&& mv hdf5-1.8.21-Std-centos7-x86_64-shared_64/lib/* /usr/local/lib/ \
&& mv hdf5-1.8.21-Std-centos7-x86_64-shared_64/include/* /usr/local/include/ \
&& mv hdf5-1.8.21-Std-centos7-x86_64-shared_64/share/* /usr/local/share/ \
&& rm -rf hdf5-1.8.21-Std-centos7-x86_64-shared_64/ \
&& rm -f hdf5-1.8.21-Std-centos7-x86_64-shared_64.tar.gz

ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
ENV HDF5_DIR /usr/local/
&& mv hdf5/bin/* /usr/local/bin/ \
&& mv hdf5/lib/* /usr/local/lib/ \
&& mv hdf5/include/* /usr/local/include/ \
&& mv hdf5/share/* /usr/local/share/ \
&& rm -rf hdf5/ \
&& rm -f hdf5-1.8.21-Std-centos7-x86_64-shared_64.tar.gz

RUN pip install --upgrade pip && pip install \
numpy \
pyomo \
pysam \
matplotlib \
tables \
pandas \
future

#installing optitype form git repository (version Dec 09 2015) and wirtig config.ini
RUN git clone https://github.com/FRED-2/OptiType.git \
&& sed -i -e '1i#!/usr/bin/env python\' OptiType/OptiTypePipeline.py \
&& mv OptiType/ /usr/local/bin/ \
&& chmod 777 /usr/local/bin/OptiType/OptiTypePipeline.py \
&& echo "[mapping]\n\
razers3=/usr/local/bin/razers3 \n\
threads=1 \n\
\n\
[ilp]\n\
solver=cbc \n\
threads=1 \n\
\n\
[behavior]\n\
deletebam=true \n\
unpaired_weight=0 \n\
use_discordant=false\n" >> /usr/local/bin/OptiType/config.ini
ENV LD_LIBRARY_PATH "/usr/local/lib:$LD_LIBRARY_PATH"
ENV HDF5_DIR "/usr/local/"

#installing razers3
RUN git clone https://github.com/seqan/seqan.git seqan-src \
Expand All @@ -83,18 +63,28 @@ RUN git clone https://github.com/seqan/seqan.git seqan-src \
&& cd .. \
&& rm -rf seqan-src

ENV PATH=/usr/local/bin/OptiType:$PATH
#installing optitype form git repository (version Dec 09 2015) and wirtig config.ini
RUN mkdir /usr/local/bin/OptiType/
COPY ./ /usr/local/bin/OptiType/
ENV PATH="/usr/local/bin/OptiType:$PATH"

# Install modules locally
RUN pip2 install --upgrade pip \
&& pip2 install \
numpy \
pyomo \
pysam \
matplotlib \
tables \
pandas \
future

# Change user to back to biodocker
USER biodocker

# Change workdir to /data/
WORKDIR /data/

# Define default command
ENTRYPOINT ["OptiTypePipeline.py"]
CMD ["-h"]

##################### INSTALLATION END ##########################

# File Author / Maintainer
Expand Down
4 changes: 3 additions & 1 deletion OptiTypePipeline.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
#!/usr/bin/env python2
# coding=utf-8

"""
###################################################################

Expand Down Expand Up @@ -96,6 +97,7 @@
be written
--verbose, -v Set verbose mode on.
"""

from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
Expand Down
12 changes: 12 additions & 0 deletions config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[mapping]
razers3=/usr/local/bin/razers3
threads=1

[ilp]
solver=cbc
threads=1

[behavior]
deletebam=true
unpaired_weight=0
use_discordant=false