-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
4 changed files
with
67 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,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 |
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,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 ` |