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 pbptyper version 2.0.0 #1064

Merged
merged 3 commits into from
Oct 2, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pasty)](https://hub.docker.com/r/staphb/pasty) | <ul><li>1.0.2</li><li>[1.0.3](pasty/1.0.3/)</li><li>[2.2.1](./pasty/2.2.1/)</li></ul> | https://github.com/rpetit3/pasty |
| [pbmm2](https://hub.docker.com/r/staphb/pbmm2) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pbmm2)](https://hub.docker.com/r/staphb/pbmm2) | <ul><li>[1.13.1](./pbmm2/1.13.1/)</li></ul> | https://github.com/PacificBiosciences/pbmm2 |
| [Pavian](https://hub.docker.com/r/staphb/pavian) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pavian)](https://hub.docker.com/r/staphb/pavian) | <ul><li>[1.2.1](pavian/1.2.1/)</li></ul> | https://github.com/fbreitwieser/pavian |
| [pbptyper](https://hub.docker.com/r/staphb/pbptyper) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pbptyper)](https://hub.docker.com/r/staphb/pbptyper) | <ul><li>1.0.0</li><li>1.0.1</li><li>1.0.4</li></ul> | https://github.com/rpetit3/pbptyper |
| [pbptyper](https://hub.docker.com/r/staphb/pbptyper) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pbptyper)](https://hub.docker.com/r/staphb/pbptyper) | <ul><li>[1.0.0](./pbptyper/1.0.0/)</li><li>[1.0.1](./pbptyper/1.0.0/)</li><li>[1.0.4](./pbptyper/1.0.4/)</li><li>[2.0.0](./pbptyper/2.0.0/)</li></ul> | https://github.com/rpetit3/pbptyper |
| [pbtk](https://hub.docker.com/r/staphb/pbtk) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pbtk)](https://hub.docker.com/r/staphb/pbtk) | <ul><li>[3.1.1](./pbtk/3.1.1/)</li></ul> | https://github.com/PacificBiosciences/pbtk |
| [Phyml](https://hub.docker.com/r/staphb/phyml) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/phyml)](https://hub.docker.com/r/staphb/phyml) | <ul><li>3.3.20220408</li></ul> | https://github.com/stephaneguindon/phyml |
| [phyTreeViz](https://hub.docker.com/r/staphb/phytreeviz) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/phytreeviz)](https://hub.docker.com/r/staphb/phytreeviz) | <ul><li>[0.1.0](./phytreeviz/0.1.0/)</li><li>[0.2.0](./phytreeviz/0.2.0/)</li></ul> | https://github.com/moshi4/phyTreeViz/ |
Expand Down
104 changes: 104 additions & 0 deletions pbptyper/2.0.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]"

# 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
31 changes: 31 additions & 0 deletions pbptyper/2.0.0/README.md
Original file line number Diff line number Diff line change
@@ -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
```