-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
32 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,34 +1,46 @@ | ||
FROM ubuntu:jammy | ||
|
||
ENV pathogenprofiler_version="3b4c6e2ffba8f7a44d12cc2ed4369ee635464093" | ||
ENV ntmprofiler_version="2e4116bff2c09461b2d452f4075c6589e0a66965" | ||
ENV ntmdb_version="93c979b4c3825c591e5bceb55f86538e10d556d2" | ||
|
||
ARG PATHOGEN_PROFILER_VERSION="3b4c6e2ffba8f7a44d12cc2ed4369ee635464093" | ||
ARG NTM_PROFILER_VERSION="2e4116bff2c09461b2d452f4075c6589e0a66965" | ||
ARG NTMDB_VERSION="93c979b4c3825c591e5bceb55f86538e10d556d2" | ||
|
||
#python packages | ||
ENV PACKAGES="procps curl wget git build-essential libhdf5-dev libffi-dev r-base-core jq" \ | ||
PYTHON="python3.12 python3-pip python3-dev python3-packaging" | ||
|
||
#apt-get python stuff | ||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install \ | ||
tzdata software-properties-common && \ | ||
add-apt-repository ppa:deadsnakes/ppa && \ | ||
apt install -y $PACKAGES $PYTHON && \ | ||
apt remove -y python3.8 && \ | ||
apt install -y python3.12-distutils python3.12-venv | ||
|
||
#reinstall pip | ||
RUN python3.12 -m ensurepip --upgrade | ||
RUN python3.12 -m pip install --upgrade setuptools | ||
|
||
#use pip to install ntm stuff | ||
RUN python3.12 -m pip install pysam joblib tqdm pydantic jinja2 rich-argparse packaging==24.1 | ||
RUN python3.12 -m pip install git+https://github.com/jodyphelan/pathogen-profiler.git@${PATHOGEN_PROFILER_VERSION} | ||
RUN python3.12 -m pip install git+https://github.com/jodyphelan/ntm-profiler.git@${NTM_PROFILER_VERSION} | ||
|
||
#update DB to our commit | ||
RUN ntm-profiler update_db --commit ${NTMDB_VERSION} | ||
ENV ntmdb_version=93c979b4c3825c591e5bceb55f86538e10d556d2 \ | ||
ntmprofiler_version=0.4.0 \ | ||
TMPDIR="." | ||
|
||
#USER root | ||
WORKDIR / | ||
ARG NTMPROFILER_VER="0.4.0" | ||
ARG NTMDB_VER="93c979b4c3825c591e5bceb55f86538e10d556d2" | ||
|
||
# this version is the shortened commit hash on the `master` branch here https://github.com/jodyphelan/tbdb/ | ||
# commits are found on https://github.com/jodyphelan/tbdb/commits/master | ||
# this was the latest commit as of 2024-05-21 | ||
ARG TBDB_VER="a5e1d48" | ||
|
||
# LABEL instructions tag the image with metadata that might be important to the user | ||
LABEL base.image="ubuntu:jammy" | ||
LABEL dockerfile.version="0.9.9" | ||
LABEL software="tbprofiler" | ||
LABEL software.version="${NTMROFILER_VER}" | ||
LABEL description="The pipeline aligns reads to the H37Rv reference using bowtie2, BWA or minimap2 and then calls variants using bcftools. These variants are then compared to a drug-resistance database." | ||
LABEL maintainer3="Tom Whalley" | ||
LABEL maintainer3.email="[email protected]" | ||
|
||
#set env for root prefix | ||
ENV MAMBA_ROOT_PREFIX="/opt/conda" | ||
|
||
RUN apt-get update && apt-get install -y apt-utils wget bzip2 curl | ||
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest| tar -xvj bin/micromamba \ | ||
&& touch /root/.bashrc \ | ||
&& ./bin/micromamba shell init -s bash -p /opt/conda \ | ||
&& grep -v '[ -z "\$PS1" ] && return' /root/.bashrc > /opt/conda/bashrc # this line has been modified \ | ||
&& apt-get clean autoremove --yes \ | ||
&& rm -rf /var/lib/{apt,dpkg,cache,log} | ||
|
||
|
||
# install tb-profiler via bioconda; install into 'base' conda env | ||
RUN micromamba install --yes --name base --channel conda-forge --channel bioconda \ | ||
ntm-profiler=${NTMPROFILER_VER} | ||
|
||
# hardcode 'base' env bin into PATH, so conda env does not have to be "activated" at run time | ||
ENV PATH="/opt/conda/bin:${PATH}" | ||
|
||
RUN tb-profiler update_tbdb --match_ref /data/tuberculosis.fasta --commit ${NTMDB_VER} | ||
|