diff --git a/README.md b/README.md index bda448883..60646d573 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ To learn more about the docker pull rate limits and the open source software pro | [pasty](https://hub.docker.com/r/staphb/pasty)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pasty)](https://hub.docker.com/r/staphb/pasty) | | https://github.com/rpetit3/pasty | | [pbmm2](https://hub.docker.com/r/staphb/pbmm2)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pbmm2)](https://hub.docker.com/r/staphb/pbmm2) | | https://github.com/PacificBiosciences/pbmm2 | | [Pavian](https://hub.docker.com/r/staphb/pavian)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pavian)](https://hub.docker.com/r/staphb/pavian) | | https://github.com/fbreitwieser/pavian | -| [pbptyper](https://hub.docker.com/r/staphb/pbptyper)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pbptyper)](https://hub.docker.com/r/staphb/pbptyper) | | https://github.com/rpetit3/pbptyper | +| [pbptyper](https://hub.docker.com/r/staphb/pbptyper)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pbptyper)](https://hub.docker.com/r/staphb/pbptyper) | | https://github.com/rpetit3/pbptyper | | [pbtk](https://hub.docker.com/r/staphb/pbtk)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pbtk)](https://hub.docker.com/r/staphb/pbtk) | | https://github.com/PacificBiosciences/pbtk | | [Phyml](https://hub.docker.com/r/staphb/phyml)
[![docker pulls](https://badgen.net/docker/pulls/staphb/phyml)](https://hub.docker.com/r/staphb/phyml) | | https://github.com/stephaneguindon/phyml | | [phyTreeViz](https://hub.docker.com/r/staphb/phytreeviz)
[![docker pulls](https://badgen.net/docker/pulls/staphb/phytreeviz)](https://hub.docker.com/r/staphb/phytreeviz) | | https://github.com/moshi4/phyTreeViz/ | diff --git a/pbptyper/2.0.0/Dockerfile b/pbptyper/2.0.0/Dockerfile new file mode 100644 index 000000000..1915213c3 --- /dev/null +++ b/pbptyper/2.0.0/Dockerfile @@ -0,0 +1,104 @@ +ARG PBPTYPER_VERSION="2.0.0" + +FROM mambaorg/micromamba:1.5.8 as app + +# Version arguments +# ARG variables only persist during build time +ARG PBPTYPER_VERSION + +# 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 base.image="mambaorg/micromamba:1.5.8" +LABEL dockerfile.version="1" +LABEL software="pbptyper" +LABEL software.version="${PBPTYPER_VERSION}" +LABEL description="In silico Penicillin Binding Protein (PBP) typer for Streptococcus pneumoniae assemblies" +LABEL website="https://github.com/rpetit3/pbptyper" +LABEL license="https://github.com/rpetit3/pbptyper/blob/main/LICENSE" +LABEL maintainer="Curtis Kapsak" +LABEL maintainer.email="curtis.kapsak@theiagen.com" + +# install dependencies; cleanup apt garbage +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget \ + ca-certificates \ + procps && \ + apt-get autoclean && rm -rf /var/lib/apt/lists/* + +# Install pbptyper into the base conda/micromamba environment, pinning the version +# clean up conda garbage +RUN micromamba install --name base -c conda-forge -c bioconda -c defaults pbptyper=${PBPTYPER_VERSION} && \ + micromamba clean -a -f -y + +# 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 + +# set final working directory to /data +WORKDIR /data + +CMD pbptyper --help + +# new base for testing +FROM app as test + +ARG PBPTYPER_VERSION + +RUN pbptyper --help && \ + pbptyper --version + +# so that all test inputs & outputs are kept in /test +WORKDIR /test + +# download test data from pbptyper repo +RUN wget -q https://github.com/rpetit3/pbptyper/archive/refs/tags/v${PBPTYPER_VERSION}.tar.gz && \ + tar -vxf v${PBPTYPER_VERSION}.tar.gz + +# shamelessly stolen and modified from https://github.com/rpetit3/pbptyper/blob/main/.github/workflows/test-pbptyper.yml (again) +RUN cd pbptyper-${PBPTYPER_VERSION} && \ + echo "ERR1065617" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/ERR1065617.fna.gz --prefix ERR1065617 && \ + cat ERR1065617.tsv && \ + head ERR1065617.tblastn.tsv && \ + echo "SRR2912551" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/SRR2912551.fna.gz --prefix SRR2912551 && \ + cat SRR2912551.tsv && \ + head SRR2912551.tblastn.tsv && \ + echo "SRR8654742" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/SRR8654742.fna --prefix SRR8654742 --outdir SRR8654742 && \ + cat SRR8654742/SRR8654742.tsv && \ + head SRR8654742/SRR8654742.tblastn.tsv && \ + echo "S. pseudopneumoniae" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/spseudopneumoniae.fna.gz --prefix spseudopneumoniae --outdir spseudopneumoniae && \ + cat spseudopneumoniae/spseudopneumoniae.tsv && \ + head spseudopneumoniae/spseudopneumoniae.tblastn.tsv && \ + echo "S. mitis" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/smitis.fna.gz --prefix smitis --outdir smitis && \ + cat smitis/smitis.tsv && \ + head smitis/smitis.tblastn.tsv && \ + echo "S. suis" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/ssuis.fna.gz --prefix ssuis --outdir ssuis && \ + cat ssuis/ssuis.tsv && \ + head ssuis/ssuis.tblastn.tsv && \ + echo "not-spn" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/not-spn.fna.gz --prefix not-spn && \ + cat not-spn.tsv && \ + head not-spn.tblastn.tsv && \ + echo "not-a-fasta" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/not-a-fasta.fasta --prefix not-a-fasta && \ + cat not-a-fasta.tsv && \ + head not-a-fasta.tblastn.tsv && \ + echo "poor" && \ + pbptyper --yaml data/pbptyper.yaml --targets data/pbptyper.fasta --input test/poor.fasta --prefix poor --outdir poor && \ + cat poor/poor.tsv && \ + head poor/poor.tblastn.tsv + +RUN cd pbptyper-${PBPTYPER_VERSION} && \ + echo "ERR1065617 again" && \ + pbptyper --input test/ERR1065617.fna.gz --prefix ERR1065617_2 && \ + cat ERR1065617_2.tsv && \ + head ERR1065617_2.tblastn.tsv diff --git a/pbptyper/2.0.0/README.md b/pbptyper/2.0.0/README.md new file mode 100644 index 000000000..95e8506cd --- /dev/null +++ b/pbptyper/2.0.0/README.md @@ -0,0 +1,31 @@ +# pbptyper container + +Main tool : [pbptyper](https://github.com/rpetit3/pbptyper) + +Full documentation: [https://github.com/rpetit3/pbptyper](https://github.com/rpetit3/pbptyper) + +In silico Penicillin Binding Protein (PBP) typer for Streptococcus pneumoniae assemblies + +## Example Usage + +```bash +# run pbptyper on an test S. pneumo assembly included with pbptyper +# WARNING: test data no longer included in docker image, visit here to get test data: https://github.com/rpetit3/pbptyper/tree/main/test +$ pbptyper --input SRR2912551.fna.gz --prefix SRR2912551 --db /pbptyper-*/db/ --outdir /SRR2912551-pbptyper-test +Running TBLASTN for 1A... +TBLASTN results written to /SRR2912551-pbptyper-test/SRR2912551-1A.tblastn.tsv + +Running TBLASTN for 2B... +TBLASTN results written to /SRR2912551-pbptyper-test/SRR2912551-2B.tblastn.tsv + +Running TBLASTN for 2X... +TBLASTN results written to /SRR2912551-pbptyper-test/SRR2912551-2X.tblastn.tsv + + Predicted PBP Type +┏━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━┓ +┃ sample ┃ pbptype ┃ 1A_coverage ┃ 1A_pident ┃ 2B_coverage ┃ 2B_pident ┃ 2X_coverage ┃ 2X_pident ┃ +┡━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━┩ +│ SRR2912551 │ 23:0:2 │ 100 │ 100.000 │ 100 │ 100.000 │ 100 │ 100.000 │ +└────────────┴─────────┴─────────────┴───────────┴─────────────┴───────────┴─────────────┴───────────┘ +Predicted pbp type result written to /SRR2912551-pbptyper-test/SRR2912551.tsv +```