|  | 
|  | 1 | +FROM ubuntu:focal | 
|  | 2 | + | 
|  | 3 | +ENV tbdb_version=a5e1d48 \ | 
|  | 4 | +    tbprofiler_version=6.2.1 \ | 
|  | 5 | +    TMPDIR="." | 
|  | 6 | + | 
|  | 7 | +#USER root | 
|  | 8 | +WORKDIR / | 
|  | 9 | +ENV TMPDIR="/data" | 
|  | 10 | +ARG TBPROFILER_VER="2c92475" | 
|  | 11 | + | 
|  | 12 | +# this version is the shortened commit hash on the `master` branch here https://github.com/jodyphelan/tbdb/ | 
|  | 13 | +# commits are found on https://github.com/jodyphelan/tbdb/commits/master | 
|  | 14 | +# this was the latest commit as of 2024-05-21 | 
|  | 15 | +ARG TBDB_VER="a5e1d48" | 
|  | 16 | + | 
|  | 17 | +# LABEL instructions tag the image with metadata that might be important to the user | 
|  | 18 | +LABEL base.image="ubuntu:focal" | 
|  | 19 | +LABEL dockerfile.version="0.9.8.1" | 
|  | 20 | +LABEL software="tbprofiler" | 
|  | 21 | +LABEL software.version="${TBPROFILER_VER}" | 
|  | 22 | +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." | 
|  | 23 | +LABEL maintainer3="Tom Whalley" | 
|  | 24 | +LABEL maintainer3.email="[email protected] " | 
|  | 25 | + | 
|  | 26 | +#set env for root prefix | 
|  | 27 | +ENV MAMBA_ROOT_PREFIX="/opt/conda" | 
|  | 28 | + | 
|  | 29 | +RUN apt-get update && apt-get install -y apt-utils wget bzip2 curl | 
|  | 30 | +RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest| tar -xvj bin/micromamba \ | 
|  | 31 | +    && touch /root/.bashrc \ | 
|  | 32 | +    && ./bin/micromamba shell init -s bash -p /opt/conda  \ | 
|  | 33 | +    && grep -v '[ -z "\$PS1" ] && return' /root/.bashrc  > /opt/conda/bashrc   # this line has been modified \ | 
|  | 34 | +    && apt-get clean autoremove --yes \ | 
|  | 35 | +    && rm -rf /var/lib/{apt,dpkg,cache,log} | 
|  | 36 | + | 
|  | 37 | + | 
|  | 38 | +# install tb-profiler via bioconda; install into 'base' conda env | 
|  | 39 | +RUN micromamba install --yes --name base --channel conda-forge --channel bioconda  \ | 
|  | 40 | +    tb-profiler=${TBPROFILER_VER} | 
|  | 41 | +RUN micromamba install --yes --name base --channel conda-forge --channel bioconda gatk4 | 
|  | 42 | +RUN micromamba install --yes --name base --channel conda-forge --channel bioconda samtools  | 
|  | 43 | +RUN micromamba install --yes --name base --channel conda-forge jq | 
|  | 44 | +RUN micromamba clean --all --yes | 
|  | 45 | + | 
|  | 46 | +# hardcode 'base' env bin into PATH, so conda env does not have to be "activated" at run time | 
|  | 47 | +ENV PATH="/opt/conda/bin:${PATH}" | 
|  | 48 | + | 
|  | 49 | + | 
|  | 50 | +# Version of database can be confirmed at /opt/conda/share/tbprofiler/tbdb.version.json | 
|  | 51 | +# can also run 'tb-profiler list_db' to find the same version info | 
|  | 52 | +# In 5.0.1 updating_tbdb does not work with tb-profiler update_tbdb --commit ${TBDB_VER} | 
|  | 53 | + | 
|  | 54 | +WORKDIR /data | 
|  | 55 | + | 
|  | 56 | +#wants full path to reference | 
|  | 57 | +RUN tb-profiler update_tbdb --commit ${TBDB_VER} | 
|  | 58 | + | 
0 commit comments