-
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.
Merge pull request #50 from Pathogen-Genomics-Cymru/tbprofiler
Tbprofiler
- Loading branch information
Showing
17 changed files
with
423 additions
and
353 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
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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
params{ | ||
container_enabled = "true" | ||
container_enabled = "true" | ||
} | ||
|
||
|
||
process { | ||
update_tbprofiler = "false" | ||
|
||
|
||
withLabel:low_cpu {cpus = 2} | ||
withLabel:normal_cpu { cpus = 8 } | ||
withLabel:low_memory { memory = '5GB' } | ||
withLabel:medium_memory { memory = '10GB' } | ||
withLabel:high_memory { memory = '18GB' } | ||
|
||
withLabel:getversion { | ||
container = "quay.io/pathogen-genomics-cymru/preprocessing:0.9.8" | ||
} | ||
|
||
withLabel:preprocessing { | ||
container = "quay.io/pathogen-genomics-cymru/preprocessing:0.9.8" | ||
} | ||
|
||
withLabel:tbprofiler { | ||
container = "quay.io/pathogen-genomics-cymru/tbprofiler:0.9.8" | ||
} | ||
|
||
withName:downloadContamGenomes { | ||
shell = ['/bin/bash','-u'] | ||
errorStrategy = { task.exitStatus in 100..113 ? 'retry' : 'terminate' } | ||
maxRetries = 5 | ||
} | ||
|
||
withLabel:retryAfanc { | ||
shell = ['/bin/bash','-u'] | ||
errorStrategy = {task.exitStatus == 1 ? 'retry' : 'ignore' } | ||
maxRetries = 5 | ||
} | ||
|
||
withLabel:clockwork { | ||
container = "quay.io/pathogen-genomics-cymru/clockwork:0.9.8" | ||
} | ||
|
||
withLabel:vcfpredict { | ||
container = "quay.io/pathogen-genomics-cymru/vcfpredict:0.9.8" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
FROM mambaorg/micromamba:1.3.0 as app | ||
|
||
#copy the reference genome to pre-compute our index | ||
COPY resources/tuberculosis.fasta /data/tuberculosis.fasta | ||
|
||
USER root | ||
WORKDIR / | ||
|
||
ARG TBPROFILER_VER="5.0.1" | ||
|
||
# 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 2023-10-26 | ||
ARG TBDB_VER="e25540b" | ||
|
||
# LABEL instructions tag the image with metadata that might be important to the user | ||
LABEL base.image="micromamba:1.3.0" | ||
LABEL dockerfile.version="1" | ||
LABEL software="tbprofiler" | ||
LABEL software.version="${TBPROFILER_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 website="https://github.com/jodyphelan/TBProfiler/" | ||
LABEL license="https://github.com/jodyphelan/TBProfiler/blob/master/LICENSE" | ||
LABEL maintainer="John Arnn" | ||
LABEL maintainer.email="[email protected]" | ||
LABEL maintainer2="Curtis Kapsak" | ||
LABEL maintainer2.email="[email protected]" | ||
|
||
# Install dependencies via apt-get; cleanup apt garbage | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
wget \ | ||
ca-certificates \ | ||
procps && \ | ||
apt-get autoclean && rm -rf /var/lib/apt/lists/* | ||
|
||
# install tb-profiler via bioconda; install into 'base' conda env | ||
RUN micromamba install --yes --name base --channel conda-forge --channel bioconda \ | ||
tb-profiler=${TBPROFILER_VER} | ||
|
||
RUN micromamba install --yes --name base --channel conda-forge --channel bioconda gatk4 | ||
RUN micromamba install --yes --name base --channel conda-forge --channel bioconda samtools | ||
RUN micromamba install --yes --name base --channel conda-forge jq | ||
RUN micromamba clean --all --yes | ||
|
||
# hardcode 'base' env bin into PATH, so conda env does not have to be "activated" at run time | ||
ENV PATH="/opt/conda/bin:${PATH}" | ||
|
||
# Version of database can be confirmed at /opt/conda/share/tbprofiler/tbdb.version.json | ||
# can also run 'tb-profiler list_db' to find the same version info | ||
# In 5.0.1 updating_tbdb does not work with tb-profiler update_tbdb --commit ${TBDB_VER} | ||
RUN tb-profiler update_tbdb --commit ${TBDB_VER} | ||
|
||
WORKDIR /data | ||
RUN tb-profiler update_tbdb --match_ref tuberculosis.fasta |
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 |
---|---|---|
|
@@ -3,19 +3,16 @@ FROM ubuntu:20.04 | |
LABEL maintainer="[email protected]" \ | ||
about.summary="container for the vcf predict workflow" | ||
|
||
#add run-vcf to container | ||
COPY bin/ /opt/bin/ | ||
ENV PATH=/opt/bin:$PATH | ||
|
||
ENV PACKAGES="procps curl wget git build-essential libhdf5-dev libffi-dev r-base-core jq" \ | ||
PYTHON="python3 python3-pip python3-dev" | ||
|
||
ENV vcfmix_version=d4693344bf612780723e39ce27c8ae3868f95417 \ | ||
gumpy_version=1.0.15 \ | ||
piezo_version=0.3 \ | ||
gnomonicus_version=1.1.2 \ | ||
tuberculosis_amr_catalogues=12d38733ad2e238729a3de9f725081e1d4872968 | ||
|
||
COPY bin/ /opt/bin/ | ||
ENV PATH=/opt/bin:$PATH | ||
|
||
|
||
#apt updates | ||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata \ | ||
&& apt-get install -y $PACKAGES $PYTHON \ | ||
|
@@ -27,25 +24,4 @@ RUN apt-get update \ | |
&& pip3 install awscli \ | ||
&& pip3 install . \ | ||
&& cp -r data /usr/local/lib/python3.8/dist-packages \ | ||
&& cd .. | ||
|
||
RUN curl -fsSL https://github.com/oxfordmmm/gumpy/archive/refs/tags/v${gumpy_version}.tar.gz | tar -xz \ | ||
&& cd gumpy-${gumpy_version} \ | ||
&& pip3 install . \ | ||
&& cd .. | ||
|
||
RUN curl -fsSL https://github.com/oxfordmmm/piezo/archive/refs/tags/v${piezo_version}.tar.gz | tar -xz \ | ||
&& cd piezo-${piezo_version} \ | ||
&& pip3 install . \ | ||
&& cd .. | ||
|
||
RUN curl -fsSL https://github.com/oxfordmmm/gnomonicus/archive/refs/tags/v${gnomonicus_version}.tar.gz | tar -xz \ | ||
&& cd gnomonicus-${gnomonicus_version} \ | ||
&& pip3 install . \ | ||
&& cd .. | ||
|
||
RUN git clone https://github.com/oxfordmmm/tuberculosis_amr_catalogues.git \ | ||
&& cd tuberculosis_amr_catalogues \ | ||
&& git checkout ${tuberculosis_amr_catalogues} \ | ||
&& cd .. | ||
|
||
&& cd .. |
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
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
Oops, something went wrong.