-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial Dockerfile * adding drprg 0.1.1 * attempted downloading index at new location * added htslib * working version * made lowercase
- Loading branch information
Showing
4 changed files
with
119 additions
and
0 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,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 |
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 @@ | ||
<!-- | ||
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/ | ||
``` |