Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Dr. PRG #776

Merged
merged 6 commits into from
Nov 16, 2023
Merged
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
1 change: 1 addition & 0 deletions Program_Licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/datasets-sars-cov-2)](https://hub.docker.com/r/staphb/datasets-sars-cov-2) | <ul><li>0.6.2</li><li>0.6.3</li><li>0.7.2</li></ul> | https://github.com/CDCgov/datasets-sars-cov-2 |
| [dnaapler](https://hub.docker.com/r/staphb/dnaapler) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dnaapler)](https://hub.docker.com/r/staphb/dnaapler) | <ul><li>[0.1.0](dnaapler/0.1.0/)</li></ul> | https://github.com/gbouras13/dnaapler |
| [dragonflye](https://hub.docker.com/r/staphb/dragonflye) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dragonflye)](https://hub.docker.com/r/staphb/dragonflye) | <ul><li>1.0.14</li><li>[1.1.1](dragonflye/1.1.1/)</li></ul> | https://github.com/rpetit3/dragonflye |
| [Dr. PRG ](https://hub.docker.com/r/staphb/drprg) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/drprg)](https://hub.docker.com/r/staphb/drprg) | <ul><li>[0.1.1](drprg/0.1.1/)</li></ul> | https://mbh.sh/drprg/ |
| [DSK](https://hub.docker.com/r/staphb/dsk) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dsk)](https://hub.docker.com/r/staphb/dsk) | <ul><li>0.0.100</li></ul> | https://gatb.inria.fr/software/dsk/ |
| [emboss](https://hub.docker.com/r/staphb/emboss) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/emboss)](https://hub.docker.com/r/staphb/emboss) | <ul><li>6.6.0 (no version)</li></ul> | http://emboss.sourceforge.net |
| [emmtyper](https://hub.docker.com/r/staphb/emmtyper) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/emmtyper)](https://hub.docker.com/r/staphb/emmtyper) | <ul><li>0.2.0</li></ul> | https://github.com/MDU-PHL/emmtyper |
Expand Down
69 changes: 69 additions & 0 deletions drprg/0.1.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# '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

# 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"

# 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 /

# 'LABEL' instructions tag the image with metadata that might be important to the user

LABEL base.image="mambaorg/micromamba:1.4.9"
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="[email protected]"

# '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 \
procps && \
rm -rf /var/lib/apt/lists/* && apt-get autoclean

# 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

WORKDIR /data

FROM app as test

WORKDIR /test

RUN drprg --help

# 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/ && \
ls outdir/*

# list available databases for download
RUN drprg index --list
48 changes: 48 additions & 0 deletions drprg/0.1.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
Please edit this readme with some basic information about the tool and how to use this container.
- Include information about databases and additional files that are included.
- Keep it short - you don't need to recreate the documentation from the creators.
- Do not just copy and paste the readme or help for the tool.
-->

# Dr. PRG - Drug resistance Prediction with Reference Graphs️ container

Main tool: [Dr. PRG](https://mbh.sh/drprg/)

Code repository: https://github.com/mbhall88/drprg

Basic information on how to use this tool:
- executable: drprg
- help: --help
- version: --version
- description: Drug Resistance Prediction with Reference Graphs

Additional information:

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

# list available indices
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/
```