Skip to content

Commit

Permalink
add dockerfile for pgma (#290)
Browse files Browse the repository at this point in the history
* add dockerfile for pgma

* Add dokerfile version

* Add quote

* updated pmga readme - fixed path for blastdbs

Got this error on my first attempt, wound up just being a small typo

```
$ docker run --rm -u $(id -u):$(id -g) -v ${PWD}:/data robert/pmga:latest pmga /data/GCF_021535585.1_ASM2153558v1_genomic.Ngonorrhoeae.fna --blast /pmga/blastdb -t 4 -o /data/Ngonorrhoeae-pmga-test
2022-02-08 15:49:39:root:ERROR - Input BLAST directory (/pmga/blastdb) does not exist, please verify and try again
```

Co-authored-by: Curtis Kapsak <kapsakcj@gmail.com>
  • Loading branch information
rpetit3 and kapsakcj committed Feb 8, 2022
1 parent ff07631 commit 91f790f
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions Program_Licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ The licenses of the open-source software that is contained in these Docker image
| Piggy | GNU GPLv3 | https://github.com/harry-thorpe/piggy/blob/master/LICENSE |
| Pilon | GNU GPLv2 | https://github.com/broadinstitute/pilon/blob/master/LICENSE |
| PlasmidSeeker | BSD 3-Clause | https://github.com/bioinfo-ut/PlasmidSeeker/blob/master/LICENSE |
| pmga | GNU GPLv2 |https://github.com/rpetit3/pmga/blob/master/LICENSE |
| Prokka | GNU GPLv3 | https://raw.githubusercontent.com/tseemann/prokka/master/doc/LICENSE.Prokka |
| QUAST | GNU GPLv2 | https://github.com/ablab/quast/blob/master/LICENSE.txt |
| racon | MIT | https://github.com/isovic/racon/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 @@ -93,6 +93,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [Piggy](https://hub.docker.com/r/staphb/piggy) <br/> [![docker pulls](https://img.shields.io/docker/pulls/staphb/piggy.svg?style=popout)](https://hub.docker.com/r/staphb/piggy) | <ul><li>1.5</li></ul> | https://github.com/harry-thorpe/piggy |
| [Pilon](https://hub.docker.com/r/staphb/pilon) <br/> [![docker pulls](https://img.shields.io/docker/pulls/staphb/pilon.svg?style=popout)](https://hub.docker.com/r/staphb/pilon) | <ul><li>1.23.0</li></ul> | https://github.com/broadinstitute/pilon |
| [PlasmidSeeker](https://hub.docker.com/r/staphb/plasmidseeker) <br/> [![docker pulls](https://img.shields.io/docker/pulls/staphb/plasmidseeker.svg?style=popout)](https://hub.docker.com/r/staphb/plasmidseeker) | <ul><li>1.0</li></ul> | https://github.com/bioinfo-ut/PlasmidSeeker |
| [pmga](https://hub.docker.com/r/staphb/pmga/) <br/> [![docker pulls](https://img.shields.io/docker/pulls/staphb/pmga.svg?style=popout)](https://hub.docker.com/r/staphb/pmga) | <ul><li>3.0.2</li></ul> | https://github.com/rpetit3/pmga |
| [Prokka](https://hub.docker.com/r/staphb/prokka/) <br/> [![docker pulls](https://img.shields.io/docker/pulls/staphb/prokka.svg?style=popout)](https://hub.docker.com/r/staphb/prokka) | <ul><li>1.13.4</li><li>1.14.0</li><li>1.14.5</li></ul> | https://github.com/tseemann/prokka |
| [QUAST](https://hub.docker.com/r/staphb/quast/) <br/> [![docker pulls](https://img.shields.io/docker/pulls/staphb/quast.svg?style=popout)](https://hub.docker.com/r/staphb/quast) | <ul><li>5.0.0</li><li>5.0.2</li></ul> | https://github.com/ablab/quast |
| [racon](https://hub.docker.com/r/staphb/racon) <br/> [![docker pulls](https://img.shields.io/docker/pulls/staphb/racon.svg?style=popout)](https://hub.docker.com/r/staphb/racon)| <ul><li>1.4.3</li><li>1.4.20</li></ul> | https://github.com/lbcb-sci/racon <br/> https://github.com/isovic/racon (ARCHIVED) |
Expand Down
48 changes: 48 additions & 0 deletions pmga/3.0.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Base Image
FROM ubuntu:focal

ARG PMGA_VERSION="3.0.2"
ARG MASH_VERSION="1.1"

# Metadata
LABEL base.image="ubuntu:focal"
LABEL dockerfile.version="1"
LABEL software="pmga"
LABEL software.version="3.0.1"
LABEL description="A command-line version of PMGA (PubMLST Genome Annotator) for serotyping, serotyping and MLST of all Neisseria species and Haemophilus influenzae"
LABEL website="https://github.com/rpetit3/pmga"
LABEL license="https://github.com/rpetit3/pmga/blob/master/LICENSE"
LABEL maintainer="Robert A. Petit III"
LABEL maintainer.email="robert.petit@theiagen.com"

# Install dependencies
RUN apt-get update && \
apt-get install -y \
python3 \
python3-pip \
ncbi-blast+ \
pigz \
wget && \
pip3 install biopython>=1.78 executor requests && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

# Install Mash
RUN wget https://github.com/marbl/Mash/releases/download/v${MASH_VERSION}/mash-Linux64-v${MASH_VERSION}.tar.gz && \
tar -xvf mash-Linux64-v${MASH_VERSION}.tar.gz && \
rm -rf mash-Linux64-v${MASH_VERSION}.tar && \
mv /mash-Linux64-v${MASH_VERSION} /mash

# Install PMGA
RUN wget https://github.com/rpetit3/pmga/archive/refs/tags/v${PMGA_VERSION}.tar.gz && \
tar -xzf v${PMGA_VERSION}.tar.gz && \
rm v${PMGA_VERSION}.tar.gz && \
mv pmga-${PMGA_VERSION} /pmga && \
cp /pmga/pmga.py /pmga/pmga && \
cp /pmga/pmga-build.py /pmga/pmga-build && \
cd /pmga && \
/pmga/pmga-build --outdir blastdbs && \
mkdir /data

ENV PATH="/mash:/pmga:${PATH}"

WORKDIR /data
17 changes: 17 additions & 0 deletions pmga/3.0.2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# pmga v3.0.2

Main tool: [pmga](https://github.com/rpetit3/pmga)

In addition to `pmga`, this docker image contains the required databases built by `pmga-build`. The pre-built databases are located in `/pmga/blastdbs`.

## Example commands

```{bash}
# Test H. influenzae genome
docker run --rm -u $(id -u):$(id -g) -v ${PWD}:/data pmga:latest pmga /data/GCF_900478275.fna --blast /pmga/blastdbs
# Force H. influenzae genome (via --species)
docker run --rm -u $(id -u):$(id -g) -v ${PWD}:/data pmga:latest pmga /data/GCF_900478275.fna --blast /pmga/blastdbs --species hinfluenzae
```

View full pmga help options: `docker run --rm -u $(id -u):$(id -g) -v ${PWD}:/data pmga:latest pmga --help `

0 comments on commit 91f790f

Please sign in to comment.