From bc2f773d1c769b93f3f9ce112dae555ae27cf2af Mon Sep 17 00:00:00 2001 From: Erin Young Date: Thu, 26 Oct 2023 22:28:54 +0000 Subject: [PATCH 1/6] initial Dockerfile --- drprg/0.1.1/Dockerfile | 123 +++++++++++++++++++++++++++++++++++++++++ drprg/0.1.1/README.md | 62 +++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 drprg/0.1.1/Dockerfile create mode 100644 drprg/0.1.1/README.md diff --git a/drprg/0.1.1/Dockerfile b/drprg/0.1.1/Dockerfile new file mode 100644 index 000000000..b1da31c45 --- /dev/null +++ b/drprg/0.1.1/Dockerfile @@ -0,0 +1,123 @@ +ARG DRPRG_VER="0.1.1" + +FROM ubuntu:jammy AS builder +# "inspired" by https://github.com/mbhall88/drprg/blob/main/Dockerfile + +ARG DRPRG_VER +ARG RASUSA_VER="0.7.0" +ARG SEQFU_VER="1.16.0" +ARG PANDORA_VER="0.9.2" +ARG MAKEPRG_VER="0.3.0" + +RUN apt-get update && apt-get install --no-install-recommends -y \ + wget \ + ca-certificates \ + unzip && \ + rm -rf /var/lib/apt/lists/* && apt-get autoclean + +# download drprg source code from github +RUN wget -q https://github.com/mbhall88/drprg/releases/download/${DRPRG_VER}/drprg-${DRPRG_VER}-x86_64-unknown-linux-gnu.tar.gz && \ + tar -xvf drprg-${DRPRG_VER}-x86_64-unknown-linux-gnu.tar.gz && \ + cp drprg-${DRPRG_VER}-x86_64-unknown-linux-gnu/drprg /usr/bin/drprg && \ + chmod +x /usr/bin/drprg + +# download makeprg +RUN wget -q https://github.com/leoisl/make_prg/releases/download/v${MAKEPRG_VER}/make_prg_${MAKEPRG_VER} && \ + cp make_prg_${MAKEPRG_VER} /usr/bin/make_prg && \ + chmod +x /usr/bin/make_prg + +# downloading pandora +RUN wget -q https://github.com/rmcolq/pandora/releases/download/${PANDORA_VER}/pandora-linux-precompiled-v${PANDORA_VER} && \ + cp pandora-linux-precompiled-v${PANDORA_VER} /usr/bin/pandora && \ + chmod +x /usr/bin/pandora + +# install rasusa +RUN wget -q https://github.com/mbhall88/rasusa/releases/download/${RASUSA_VER}/rasusa-${RASUSA_VER}-x86_64-unknown-linux-musl.tar.gz && \ + tar -xvf rasusa-${RASUSA_VER}-x86_64-unknown-linux-musl.tar.gz && \ + cp rasusa-${RASUSA_VER}-x86_64-unknown-linux-musl/rasusa /usr/bin/rasusa && \ + chmod +x /usr/bin/rasusa + +# install seqfu +RUN wget -q https://github.com/telatin/seqfu2/releases/download/v${SEQFU_VER}/SeqFu-v${SEQFU_VER}-Linux-x86_64.zip && \ + unzip -d /usr/bin SeqFu-v${SEQFU_VER}-Linux-x86_64.zip + +# test dependencies before moving on +RUN drprg --help && \ + pandora --help && \ + make_prg --help && \ + seqfu version && \ + rasusa --version + +FROM staphb/bcftools:1.18 AS builder2 + +FROM ubuntu:jammy AS app + +ARG MAFFT_VER="7.505" + +LABEL base.image="ubuntu:jammy" +LABEL dockerfile.version="1" +LABEL software="Dr. PRG" +LABEL software.version="${DRPRG_VER}" +LABEL description="Antimicrobial resistance prediction" +LABEL website="https://github.com/mbhall88/drprg" +LABEL license="https://github.com/mbhall88/drprg/blob/main/LICENSE" +LABEL maintainer="Erin Young" +LABEL maintainer.email="eriny@utah.gov" + +COPY --from=builder /usr/bin/* /usr/local/bin/ +COPY --from=builder2 /usr/local/bin/* /usr/local/bin/ + +RUN apt-get update && apt-get install --no-install-recommends -y \ + wget \ + ca-certificates \ + unzip \ + perl \ + zlib1g \ + libncurses5 \ + bzip2 \ + liblzma-dev \ + libcurl4-gnutls-dev \ + procps && \ + rm -rf /var/lib/apt/lists/* && apt-get autoclean + +# install mafft +RUN wget -q https://mafft.cbrc.jp/alignment/software/mafft_${MAFFT_VER}-1_amd64.deb && \ + dpkg -i mafft_${MAFFT_VER}-1_amd64.deb + +# test dependencies before moving on +RUN drprg --help && \ + pandora --help && \ + make_prg --help && \ + mafft --version && \ + bcftools --version && \ + seqfu version && \ + rasusa --version + +ENV PATH="$PATH" \ + LC_ALL=C + +CMD drprg --help + +WORKDIR /data + +FROM app AS test + +WORKDIR /test + +# test dependencies +RUN drprg --help && \ + pandora --help && \ + make_prg --help && \ + mafft --version && \ + bcftools --version && \ + seqfu version && \ + rasusa --version + +# testing index and prediction +RUN drprg index --download mtb@latest && \ + drprg index --list && \ + wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_1.fastq.gz && \ + wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_2.fastq.gz && \ + cat SRR23086705_1.fastq.gz SRR23086705_2.fastq.gz > test.fastq.gz && \ + drprg predict -x mtb -i test.fastq.gz --illumina -o outdir/ && \ + ls outdir/* \ No newline at end of file diff --git a/drprg/0.1.1/README.md b/drprg/0.1.1/README.md new file mode 100644 index 000000000..d205b147b --- /dev/null +++ b/drprg/0.1.1/README.md @@ -0,0 +1,62 @@ + + +# container + +Main tool: [](link to program) + +Code repository: + +Additional tools: +- list: version + +Basic information on how to use this tool: +- executable: +- help: <-h> +- version: <-v> +- description: + +Additional information: + + + +Full documentation: link to documentation or wiki + +## Example Usage + +```bash + +``` + + + From d7db7b566cf5943e53494b0fdf64595e5d1f9cd8 Mon Sep 17 00:00:00 2001 From: Erin Young Date: Tue, 14 Nov 2023 16:41:33 -0700 Subject: [PATCH 2/6] adding drprg 0.1.1 --- Program_Licenses.md | 1 + README.md | 1 + drprg/0.1.1/Dockerfile | 48 +++++++++++++-------------------- drprg/0.1.1/README.md | 61 +++++++++++++++--------------------------- 4 files changed, 42 insertions(+), 69 deletions(-) diff --git a/Program_Licenses.md b/Program_Licenses.md index bcd0c34d2..119ead087 100644 --- a/Program_Licenses.md +++ b/Program_Licenses.md @@ -28,6 +28,7 @@ The licenses of the open-source software that is contained in these Docker image | datasets-sars-cov-2 | Apache 2.0 | https://github.com/CDCgov/datasets-sars-cov-2/blob/master/LICENSE | | dnaapler | MIT | https://github.com/gbouras13/dnaapler/blob/main/LICENSE | | dragonflye | GNU GPLv3 | https://github.com/rpetit3/dragonflye/blob/main/LICENSE | +| drprg | MIT | https://github.com/mbhall88/drprg/blob/main/LICENSE | | DSK | GNU Affero GPLv3 | https://github.com/GATB/dsk/blob/master/LICENSE | | emboss | GNU GPLv3 | http://emboss.sourceforge.net/licence/ | | emmtyper | GNU GPLv3 | https://github.com/MDU-PHL/emmtyper/blob/master/LICENSE | diff --git a/README.md b/README.md index a64c99cc2..e8f03ab96 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ To learn more about the docker pull rate limits and the open source software pro | [datasets-sars-cov-2](https://github.com/CDCgov/datasets-sars-cov-2)
[![docker pulls](https://badgen.net/docker/pulls/staphb/datasets-sars-cov-2)](https://hub.docker.com/r/staphb/datasets-sars-cov-2) |
  • 0.6.2
  • 0.6.3
  • 0.7.2
| https://github.com/CDCgov/datasets-sars-cov-2 | | [dnaapler](https://hub.docker.com/r/staphb/dnaapler)
[![docker pulls](https://badgen.net/docker/pulls/staphb/dnaapler)](https://hub.docker.com/r/staphb/dnaapler) |
  • [0.1.0](dnaapler/0.1.0/)
| https://github.com/gbouras13/dnaapler | | [dragonflye](https://hub.docker.com/r/staphb/dragonflye)
[![docker pulls](https://badgen.net/docker/pulls/staphb/dragonflye)](https://hub.docker.com/r/staphb/dragonflye) |
  • 1.0.14
  • [1.1.1](dragonflye/1.1.1/)
| https://github.com/rpetit3/dragonflye | +| [Dr. PRG ](https://hub.docker.com/r/staphb/drprg)
[![docker pulls](https://badgen.net/docker/pulls/staphb/drprg)](https://hub.docker.com/r/staphb/drprg) |
  • [0.1.1](drprg/0.1.1/)
| https://mbh.sh/drprg/ | | [DSK](https://hub.docker.com/r/staphb/dsk)
[![docker pulls](https://badgen.net/docker/pulls/staphb/dsk)](https://hub.docker.com/r/staphb/dsk) |
  • 0.0.100
| https://gatb.inria.fr/software/dsk/ | | [emboss](https://hub.docker.com/r/staphb/emboss)
[![docker pulls](https://badgen.net/docker/pulls/staphb/emboss)](https://hub.docker.com/r/staphb/emboss) |
  • 6.6.0 (no version)
| http://emboss.sourceforge.net | | [emmtyper](https://hub.docker.com/r/staphb/emmtyper)
[![docker pulls](https://badgen.net/docker/pulls/staphb/emmtyper)](https://hub.docker.com/r/staphb/emmtyper) |
  • 0.2.0
| https://github.com/MDU-PHL/emmtyper | diff --git a/drprg/0.1.1/Dockerfile b/drprg/0.1.1/Dockerfile index b1da31c45..39e3bc186 100644 --- a/drprg/0.1.1/Dockerfile +++ b/drprg/0.1.1/Dockerfile @@ -1,6 +1,6 @@ ARG DRPRG_VER="0.1.1" -FROM ubuntu:jammy AS builder +FROM staphb/bcftools:1.18 AS builder # "inspired" by https://github.com/mbhall88/drprg/blob/main/Dockerfile ARG DRPRG_VER @@ -48,11 +48,11 @@ RUN drprg --help && \ seqfu version && \ rasusa --version -FROM staphb/bcftools:1.18 AS builder2 - FROM ubuntu:jammy AS app +ARG DRPRG_VER ARG MAFFT_VER="7.505" +ARG MTB_VER="20230308" LABEL base.image="ubuntu:jammy" LABEL dockerfile.version="1" @@ -64,8 +64,8 @@ LABEL license="https://github.com/mbhall88/drprg/blob/main/LICENSE" LABEL maintainer="Erin Young" LABEL maintainer.email="eriny@utah.gov" -COPY --from=builder /usr/bin/* /usr/local/bin/ -COPY --from=builder2 /usr/local/bin/* /usr/local/bin/ +COPY --from=builder /usr/bin/* /usr/local/bin/ +COPY --from=builder /usr/local/bin/* /usr/local/bin/ RUN apt-get update && apt-get install --no-install-recommends -y \ wget \ @@ -82,20 +82,15 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ # install mafft RUN wget -q https://mafft.cbrc.jp/alignment/software/mafft_${MAFFT_VER}-1_amd64.deb && \ - dpkg -i mafft_${MAFFT_VER}-1_amd64.deb - -# test dependencies before moving on -RUN drprg --help && \ - pandora --help && \ - make_prg --help && \ - mafft --version && \ - bcftools --version && \ - seqfu version && \ - rasusa --version + dpkg -i mafft_${MAFFT_VER}-1_amd64.deb && \ + rm mafft_${MAFFT_VER}-1_amd64.deb && \ + mafft --version ENV PATH="$PATH" \ LC_ALL=C +RUN drprg index --download mtb@${MTB_VER} + CMD drprg --help WORKDIR /data @@ -105,19 +100,12 @@ FROM app AS test WORKDIR /test # test dependencies -RUN drprg --help && \ - pandora --help && \ - make_prg --help && \ - mafft --version && \ - bcftools --version && \ - seqfu version && \ - rasusa --version +RUN drprg --help && pandora --help && make_prg --help && mafft --version && bcftools --version && rasusa --version + +# testing prediction +RUN wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_1.fastq.gz && \ + drprg predict -x mtb -i SRR23086705_1.fastq.gz --illumina -o outdir/ && \ + ls outdir/* -# testing index and prediction -RUN drprg index --download mtb@latest && \ - drprg index --list && \ - wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_1.fastq.gz && \ - wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_2.fastq.gz && \ - cat SRR23086705_1.fastq.gz SRR23086705_2.fastq.gz > test.fastq.gz && \ - drprg predict -x mtb -i test.fastq.gz --illumina -o outdir/ && \ - ls outdir/* \ No newline at end of file +# list available databases for download +RUN drprg index --list \ No newline at end of file diff --git a/drprg/0.1.1/README.md b/drprg/0.1.1/README.md index d205b147b..348f5a40a 100644 --- a/drprg/0.1.1/README.md +++ b/drprg/0.1.1/README.md @@ -5,58 +5,41 @@ Please edit this readme with some basic information about the tool and how to us - Do not just copy and paste the readme or help for the tool. --> -# container +# Dr. PRG - Drug resistance Prediction with Reference Graphs️ container -Main tool: [](link to program) +Main tool: [Dr. PRG](https://mbh.sh/drprg/) -Code repository: +Code repository: https://github.com/mbhall88/drprg Additional tools: -- list: version +- mafft version 7.505 +- rasusa version 0.7.0 +- seqfu version 1.16.0 +- makeprg version 0.3.0 +- pandora version 0.9.2 Basic information on how to use this tool: -- executable: -- help: <-h> -- version: <-v> -- description: +- executable: drprg +- help: --help +- version: --version +- description: Drug Resistance Prediction with Reference Graphs Additional information: - - -Full documentation: link to documentation or wiki +Imagine contains the mtb@20230308 database. + +Full documentation: https://mbh.sh/drprg/guide/download.html ## Example Usage ```bash - -``` - - - From 4e156808d3a96a61ee7d4abf04cb00349fe1daa4 Mon Sep 17 00:00:00 2001 From: Erin Young Date: Wed, 15 Nov 2023 00:12:23 +0000 Subject: [PATCH 3/6] attempted downloading index at new location --- drprg/0.1.1/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drprg/0.1.1/Dockerfile b/drprg/0.1.1/Dockerfile index 39e3bc186..14d33694e 100644 --- a/drprg/0.1.1/Dockerfile +++ b/drprg/0.1.1/Dockerfile @@ -89,7 +89,7 @@ RUN wget -q https://mafft.cbrc.jp/alignment/software/mafft_${MAFFT_VER}-1_amd64. ENV PATH="$PATH" \ LC_ALL=C -RUN drprg index --download mtb@${MTB_VER} +RUN mkdir /drprg && drprg index --download mtb@${MTB_VER} --outdir /drprg && ls /drprg/ && mv /drprg/mtb/mtb-${MTB_VER} /drprg/mtb/mtb CMD drprg --help @@ -103,8 +103,8 @@ WORKDIR /test RUN drprg --help && pandora --help && make_prg --help && mafft --version && bcftools --version && rasusa --version # testing prediction -RUN wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_1.fastq.gz && \ - drprg predict -x mtb -i SRR23086705_1.fastq.gz --illumina -o outdir/ && \ +RUN wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_1.fastq.gz && \ + drprg predict -x /drprg/mtb/mtb -i SRR23086705_1.fastq.gz --illumina -o outdir/ && \ ls outdir/* # list available databases for download From e2d6aa8bc7cdc1388eef4f838b4270c4b9e0872f Mon Sep 17 00:00:00 2001 From: Erin Young Date: Wed, 15 Nov 2023 17:36:10 +0000 Subject: [PATCH 4/6] added htslib --- drprg/0.1.1/Dockerfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drprg/0.1.1/Dockerfile b/drprg/0.1.1/Dockerfile index 14d33694e..b3e3dee06 100644 --- a/drprg/0.1.1/Dockerfile +++ b/drprg/0.1.1/Dockerfile @@ -1,5 +1,7 @@ ARG DRPRG_VER="0.1.1" +FROM staphb/htslib:1.18 AS htslib + FROM staphb/bcftools:1.18 AS builder # "inspired" by https://github.com/mbhall88/drprg/blob/main/Dockerfile @@ -66,6 +68,7 @@ LABEL maintainer.email="eriny@utah.gov" COPY --from=builder /usr/bin/* /usr/local/bin/ COPY --from=builder /usr/local/bin/* /usr/local/bin/ +COPY --from=htslib /usr/local/bin/* /usr/local/bin/ RUN apt-get update && apt-get install --no-install-recommends -y \ wget \ @@ -77,6 +80,13 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ bzip2 \ liblzma-dev \ libcurl4-gnutls-dev \ + procps \ + perl \ + zlib1g \ + libncurses5 \ + bzip2 \ + liblzma-dev \ + libcurl4-gnutls-dev \ procps && \ rm -rf /var/lib/apt/lists/* && apt-get autoclean @@ -102,6 +112,26 @@ WORKDIR /test # test dependencies RUN drprg --help && pandora --help && make_prg --help && mafft --version && bcftools --version && rasusa --version +# test rasusa +RUN wget https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \ + wget https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_2.fastq.gz && \ + rasusa -i SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz -n 40434 -s 1 -O g -o SRR13957123_downsampled_1.fastq.gz SRR13957123_downsampled_2.fastq.gz && \ + ls -lh + +# test pandora +# test make_prg +# test seqfu +# test mafft + +# test bcftools +RUN echo "downloading test SC2 BAM and FASTA and running bcftools mpileup and bcftools call test commands..." && \ + wget -q https://raw.githubusercontent.com/artic-network/artic-ncov2019/master/primer_schemes/nCoV-2019/V4/SARS-CoV-2.reference.fasta && \ + wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam && \ + bcftools mpileup -A -d 200 -B -Q 0 -f SARS-CoV-2.reference.fasta SRR13957123.primertrim.sorted.bam | \ + bcftools call -mv -Ov -o SRR13957123.vcf + +RUN echo $PATH && ls /usr/local/bin && echo whatever + # testing prediction RUN wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_1.fastq.gz && \ drprg predict -x /drprg/mtb/mtb -i SRR23086705_1.fastq.gz --illumina -o outdir/ && \ From d93ebfe45242546bd5740234f069126f417c28e1 Mon Sep 17 00:00:00 2001 From: Erin Young Date: Wed, 15 Nov 2023 17:50:38 +0000 Subject: [PATCH 5/6] working version --- drprg/0.1.1/Dockerfile | 138 ++++++++++------------------------------- drprg/0.1.1/README.md | 21 ++++--- 2 files changed, 45 insertions(+), 114 deletions(-) diff --git a/drprg/0.1.1/Dockerfile b/drprg/0.1.1/Dockerfile index b3e3dee06..ccc9ef444 100644 --- a/drprg/0.1.1/Dockerfile +++ b/drprg/0.1.1/Dockerfile @@ -1,62 +1,20 @@ -ARG DRPRG_VER="0.1.1" - -FROM staphb/htslib:1.18 AS htslib - -FROM staphb/bcftools:1.18 AS builder -# "inspired" by https://github.com/mbhall88/drprg/blob/main/Dockerfile - -ARG DRPRG_VER -ARG RASUSA_VER="0.7.0" -ARG SEQFU_VER="1.16.0" -ARG PANDORA_VER="0.9.2" -ARG MAKEPRG_VER="0.3.0" - -RUN apt-get update && apt-get install --no-install-recommends -y \ - wget \ - ca-certificates \ - unzip && \ - rm -rf /var/lib/apt/lists/* && apt-get autoclean - -# download drprg source code from github -RUN wget -q https://github.com/mbhall88/drprg/releases/download/${DRPRG_VER}/drprg-${DRPRG_VER}-x86_64-unknown-linux-gnu.tar.gz && \ - tar -xvf drprg-${DRPRG_VER}-x86_64-unknown-linux-gnu.tar.gz && \ - cp drprg-${DRPRG_VER}-x86_64-unknown-linux-gnu/drprg /usr/bin/drprg && \ - chmod +x /usr/bin/drprg - -# download makeprg -RUN wget -q https://github.com/leoisl/make_prg/releases/download/v${MAKEPRG_VER}/make_prg_${MAKEPRG_VER} && \ - cp make_prg_${MAKEPRG_VER} /usr/bin/make_prg && \ - chmod +x /usr/bin/make_prg - -# downloading pandora -RUN wget -q https://github.com/rmcolq/pandora/releases/download/${PANDORA_VER}/pandora-linux-precompiled-v${PANDORA_VER} && \ - cp pandora-linux-precompiled-v${PANDORA_VER} /usr/bin/pandora && \ - chmod +x /usr/bin/pandora +# 'FROM' defines the base docker image. This command has to come first in the file +# The 'as' keyword lets you name the folowing stage. The production image uses everything to the 'app' stage. +FROM mambaorg/micromamba:1.5.1 as app -# install rasusa -RUN wget -q https://github.com/mbhall88/rasusa/releases/download/${RASUSA_VER}/rasusa-${RASUSA_VER}-x86_64-unknown-linux-musl.tar.gz && \ - tar -xvf rasusa-${RASUSA_VER}-x86_64-unknown-linux-musl.tar.gz && \ - cp rasusa-${RASUSA_VER}-x86_64-unknown-linux-musl/rasusa /usr/bin/rasusa && \ - chmod +x /usr/bin/rasusa - -# install seqfu -RUN wget -q https://github.com/telatin/seqfu2/releases/download/v${SEQFU_VER}/SeqFu-v${SEQFU_VER}-Linux-x86_64.zip && \ - unzip -d /usr/bin SeqFu-v${SEQFU_VER}-Linux-x86_64.zip - -# test dependencies before moving on -RUN drprg --help && \ - pandora --help && \ - make_prg --help && \ - seqfu version && \ - rasusa --version +# List all software versions are ARGs near the top of the dockerfile +# 'ARG' sets environment variables during the build stage +ARG DRPRG_VER="0.1.1" +ARG MTB_VER="20230308" -FROM ubuntu:jammy AS app +# build and run as root users since micromamba image has 'mambauser' set as the $USER +USER root +# set workdir to default for building; set to /data at the end +WORKDIR / -ARG DRPRG_VER -ARG MAFFT_VER="7.505" -ARG MTB_VER="20230308" +# 'LABEL' instructions tag the image with metadata that might be important to the user -LABEL base.image="ubuntu:jammy" +LABEL base.image="mambaorg/micromamba:1.4.9" LABEL dockerfile.version="1" LABEL software="Dr. PRG" LABEL software.version="${DRPRG_VER}" @@ -66,40 +24,31 @@ LABEL license="https://github.com/mbhall88/drprg/blob/main/LICENSE" LABEL maintainer="Erin Young" LABEL maintainer.email="eriny@utah.gov" -COPY --from=builder /usr/bin/* /usr/local/bin/ -COPY --from=builder /usr/local/bin/* /usr/local/bin/ -COPY --from=htslib /usr/local/bin/* /usr/local/bin/ - +# 'RUN' executes code during the build +# Install dependencies via apt-get or yum if using a centos or fedora base RUN apt-get update && apt-get install --no-install-recommends -y \ wget \ ca-certificates \ - unzip \ - perl \ - zlib1g \ - libncurses5 \ - bzip2 \ - liblzma-dev \ - libcurl4-gnutls-dev \ - procps \ - perl \ - zlib1g \ - libncurses5 \ - bzip2 \ - liblzma-dev \ - libcurl4-gnutls-dev \ procps && \ rm -rf /var/lib/apt/lists/* && apt-get autoclean -# install mafft -RUN wget -q https://mafft.cbrc.jp/alignment/software/mafft_${MAFFT_VER}-1_amd64.deb && \ - dpkg -i mafft_${MAFFT_VER}-1_amd64.deb && \ - rm mafft_${MAFFT_VER}-1_amd64.deb && \ - mafft --version - -ENV PATH="$PATH" \ - LC_ALL=C - -RUN mkdir /drprg && drprg index --download mtb@${MTB_VER} --outdir /drprg && ls /drprg/ && mv /drprg/mtb/mtb-${MTB_VER} /drprg/mtb/mtb +# Install your desired software into the base conda/micromamba environment, pinning the version +# clean up conda garbage +# make /data to use as a working directory +RUN micromamba install --name base -c conda-forge -c bioconda -c defaults drprg=${DRPRG_VER} && \ + micromamba clean -a -y && \ + mkdir /data + +# 'ENV' instructions set environment variables that persist from the build into the resulting image +# set the environment, add base conda/micromamba bin directory into path +# set locale settings to UTF-8 +ENV PATH="/opt/conda/bin/:${PATH}" \ + LC_ALL=C.UTF-8 + +# download MTB index and change the name +RUN mkdir /drprg && \ + drprg index --download mtb@${MTB_VER} --outdir /drprg && \ + mv /drprg/mtb/mtb-${MTB_VER} /drprg/mtb/mtb CMD drprg --help @@ -109,28 +58,7 @@ FROM app AS test WORKDIR /test -# test dependencies -RUN drprg --help && pandora --help && make_prg --help && mafft --version && bcftools --version && rasusa --version - -# test rasusa -RUN wget https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \ - wget https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_2.fastq.gz && \ - rasusa -i SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz -n 40434 -s 1 -O g -o SRR13957123_downsampled_1.fastq.gz SRR13957123_downsampled_2.fastq.gz && \ - ls -lh - -# test pandora -# test make_prg -# test seqfu -# test mafft - -# test bcftools -RUN echo "downloading test SC2 BAM and FASTA and running bcftools mpileup and bcftools call test commands..." && \ - wget -q https://raw.githubusercontent.com/artic-network/artic-ncov2019/master/primer_schemes/nCoV-2019/V4/SARS-CoV-2.reference.fasta && \ - wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam && \ - bcftools mpileup -A -d 200 -B -Q 0 -f SARS-CoV-2.reference.fasta SRR13957123.primertrim.sorted.bam | \ - bcftools call -mv -Ov -o SRR13957123.vcf - -RUN echo $PATH && ls /usr/local/bin && echo whatever +RUN drprg --help # testing prediction RUN wget -q ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR230/005/SRR23086705/SRR23086705_1.fastq.gz && \ diff --git a/drprg/0.1.1/README.md b/drprg/0.1.1/README.md index 348f5a40a..2e4779c43 100644 --- a/drprg/0.1.1/README.md +++ b/drprg/0.1.1/README.md @@ -11,13 +11,6 @@ Main tool: [Dr. PRG](https://mbh.sh/drprg/) Code repository: https://github.com/mbhall88/drprg -Additional tools: -- mafft version 7.505 -- rasusa version 0.7.0 -- seqfu version 1.16.0 -- makeprg version 0.3.0 -- pandora version 0.9.2 - Basic information on how to use this tool: - executable: drprg - help: --help @@ -26,13 +19,24 @@ Basic information on how to use this tool: Additional information: -Imagine contains the mtb@20230308 database. +Imagine contains the mtb@20230308 database located at `/drprg/mtb/mtb`. Full documentation: https://mbh.sh/drprg/guide/download.html ## Example Usage +Using the index in from the image + +```bash + +# prediction (paired-end fastq files much be contatenated together into one) +drprg predict -x /drprg/mtb/mtb -i input.fastq.gz --illumina -o outdir/ +``` + +Getting the latest index and using it + ```bash + # download latest TB database drprg index --download mtb @@ -42,4 +46,3 @@ drprg index --list # prediction (paired-end fastq files much be contatenated together into one) drprg predict -x mtb -i input.fastq.gz --illumina -o outdir/ ``` - From b07e656b8dbb52e496aac1aaf73448ce2e0c9d17 Mon Sep 17 00:00:00 2001 From: Erin Young Date: Wed, 15 Nov 2023 17:52:06 +0000 Subject: [PATCH 6/6] made lowercase --- drprg/0.1.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drprg/0.1.1/Dockerfile b/drprg/0.1.1/Dockerfile index ccc9ef444..96da65dd0 100644 --- a/drprg/0.1.1/Dockerfile +++ b/drprg/0.1.1/Dockerfile @@ -54,7 +54,7 @@ CMD drprg --help WORKDIR /data -FROM app AS test +FROM app as test WORKDIR /test