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

Kaptive version 2.0.8 #844

Merged
merged 4 commits into from
Feb 13, 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 @@ -171,7 +171,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [IRMA](https://hub.docker.com/r/staphb/irma/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/irma)](https://hub.docker.com/r/staphb/irma) | <ul><li>1.0.2</li><li>1.0.3</li><li>1.1.2</li><li>1.1.3</li></ul> | https://wonder.cdc.gov/amd/flu/irma/|
| [isPcr](https://users.soe.ucsc.edu/~kent/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/ispcr)](https://hub.docker.com/r/staphb/ispcr) | <ul><li>[33](ispcr/33/)</li></ul> | https://users.soe.ucsc.edu/~kent/ |
| [iVar](https://hub.docker.com/r/staphb/ivar/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/ivar)](https://hub.docker.com/r/staphb/ivar) | <ul><li>1.1</li><li>1.1 (+SARS-CoV2 reference)</li><li>1.2.1</li><li>1.2.1 (+SC2 ref)</li><li>1.2.2 (+SC2 ref and artic bedfiles)</li><li>1.3</li><li>1.3.1</li><li>1.3.2</li><li>1.4.1</li><li>1.4.2</li></ul> | https://github.com/andersen-lab/ivar |
| [Kaptive](https://hub.docker.com/r/staphb/kaptive/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/kaptive)](https://hub.docker.com/r/staphb/kaptive) | <ul><li>2.0.0</li><li>2.0.3</li><li>2.0.5</li></ul> | https://github.com/katholt/Kaptive/ |
| [Kaptive](https://hub.docker.com/r/staphb/kaptive/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/kaptive)](https://hub.docker.com/r/staphb/kaptive) | <ul><li>[2.0.0](./kaptive/2.0.0/)</li><li>[2.0.3](./kaptive/2.0.3/)</li><li>[2.0.5](./kaptive/2.0.5/)</li><li>[2.0.8](./kaptive/2.0.8/)</li></ul> | https://github.com/klebgenomics/Kaptive |
| [Kleborate](https://hub.docker.com/r/staphb/kleborate/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/kleborate)](https://hub.docker.com/r/staphb/kleborate) | <ul><li>[2.0.4](./kleborate/2.0.4/)</li><li>[2.1.0](./kleborate/2.1.0/)</li><li>[2.2.0](./kleborate/2.3.2/)</li><li>[2.3.2](./kleborate/2.3.2)</li><li>[2.3.2-2023-05](kleborate/2.3.2-2023-05/)</li><li>[2.4.1](kleborate/2.4.1/)</li></ul> | https://github.com/katholt/Kleborate/ <br/> https://github.com/katholt/Kaptive/ |
| [kma](https://hub.docker.com/r/staphb/kma/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/kma)](https://hub.docker.com/r/staphb/kma) | <ul><li>1.2.21</li><li>1.4.10 (no database)</li></ul> | https://bitbucket.org/genomicepidemiology/kma/ |
| [Kraken](https://hub.docker.com/r/staphb/kraken/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/kraken)](https://hub.docker.com/r/staphb/kraken) | <ul><li>1.0</li><li>1.1.1</li><li>1.1.1 (no database)</li></ul> | https://github.com/DerrickWood/kraken |
Expand Down
111 changes: 111 additions & 0 deletions kaptive/2.0.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
FROM ubuntu:jammy as app

ARG KAPTIVE_VER="2.0.8"
# note: blast version 2.15 causes errors
ARG blastVer="2.3.0"
ARG VP_GENOMOSEROTYPING_VER="1.0"
# so that apt doesn't try to ask for user input
ARG BIOPYTHON_VER="1.81"

ARG DEBIAN_FRONTEND=noninteractive

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="Kaptive"
LABEL software.version="${KAPTIVE_VER}"
LABEL description="Report information about surface polysaccharide loci for Klebsiella pneumoniae species complex and Acinetobacter baumannii genome assemblies"
LABEL website="https://github.com/klebgenomics/Kaptive/"
LABEL license="https://github.com/klebgenomics/Kaptive/blob/master/LICENSE"
LABEL website.VPdatabase="https://github.com/aldertzomer/vibrio_parahaemolyticus_genomoserotyping"
LABEL license.VPdatabase="https://github.com/aldertzomer/vibrio_parahaemolyticus_genomoserotyping/blob/main/LICENSE"
LABEL maintainer="Tamas Stirling"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Curtis Kapsak"
LABEL maintainer2.email="[email protected]"
LABEL maintainer3="Erin Young"
LABEL maintainer3.email="[email protected]"

# install some dependencies via apt; cleanup apt garbage
RUN apt-get update && apt-get install -y --no-install-recommends \
locales \
python3 \
python3-pip \
python3-setuptools \
software-properties-common \
wget \
ca-certificates \
procps \
unzip && \
rm -rf /var/lib/apt/lists/* && apt-get autoclean

# set locale
RUN locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8

# ncbi-blast+
RUN wget -q ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${blastVer}/ncbi-blast-${blastVer}+-x64-linux.tar.gz && \
tar -zxpf ncbi-blast-${blastVer}+-x64-linux.tar.gz && \
rm -v ncbi-blast-${blastVer}+-x64-linux.tar.gz

# kaptive
RUN wget -q https://github.com/klebgenomics/Kaptive/archive/refs/tags/v${KAPTIVE_VER}.tar.gz && \
tar -xzf v${KAPTIVE_VER}.tar.gz && \
rm -vf v${KAPTIVE_VER}.tar.gz && \
mv -v /Kaptive-${KAPTIVE_VER} /kaptive

# install biopython globally via system pip
RUN pip3 install biopython==${BIOPYTHON_VER}

# download Vibrio parahemolyticus database; rename directory to static location
RUN wget -q https://github.com/aldertzomer/vibrio_parahaemolyticus_genomoserotyping/archive/refs/tags/${VP_GENOMOSEROTYPING_VER}.tar.gz && \
tar -xzf ${VP_GENOMOSEROTYPING_VER}.tar.gz && \
rm -v ${VP_GENOMOSEROTYPING_VER}.tar.gz && \
mv -v vibrio_parahaemolyticus_genomoserotyping-${VP_GENOMOSEROTYPING_VER}/*gbk /kaptive/reference_database/. && \
rm -rf vibrio_parahaemolyticus_genomoserotyping-${VP_GENOMOSEROTYPING_VER}

# set $PATH, with /kaptive at the highest priority
ENV PATH="/kaptive:/ncbi-blast-${blastVer}+/bin:${PATH}"

# final working directory is /data
WORKDIR /data

# default command is to print help options
CMD [ "kaptive.py", "--help"]

# test layer
FROM app as test

WORKDIR /test1

# test with A. baumannii; testing both k and o locus
RUN echo "downloading an A. baumannii genome & testing Kaptive..." && \
wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/016/486/705/GCA_016486705.1_PDT000751301.1/GCA_016486705.1_PDT000751301.1_genomic.fna.gz && \
gzip -d GCA_016486705.1_PDT000751301.1_genomic.fna.gz && \
kaptive.py -a GCA_016486705.1_PDT000751301.1_genomic.fna -k /kaptive/reference_database/Acinetobacter_baumannii_k_locus_primary_reference.gbk -o /test1/Abaum && \
kaptive.py -a GCA_016486705.1_PDT000751301.1_genomic.fna -k /kaptive/reference_database/Acinetobacter_baumannii_OC_locus_primary_reference.gbk -o /test1/Abaum

WORKDIR /test2

# test with K. pneumoniae; testing both k and o locus
RUN echo "downloading an K. pneumoniae genome & testing Kaptive..." && \
wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/022/268/055/GCA_022268055.1_PDT000434809.1/GCA_022268055.1_PDT000434809.1_genomic.fna.gz && \
gzip -d GCA_022268055.1_PDT000434809.1_genomic.fna.gz && \
kaptive.py -a GCA_022268055.1_PDT000434809.1_genomic.fna -k /kaptive/reference_database/Klebsiella_k_locus_primary_reference.gbk -o /test2/kpneu && \
kaptive.py -a GCA_022268055.1_PDT000434809.1_genomic.fna -k /kaptive/reference_database/Klebsiella_o_locus_primary_reference.gbk -o /test2/kpneu

WORKDIR /test3

### test with at 2 Vibrio parahaemolyticus genomes with a known serotype. These 2 are pulled from the publication describing custom database ##
# GCA_001558495.2 - expect OL1 and KL1
# GCA_001728135.1 - expect OL4 KL53
# more info on test genome here: https://www.ncbi.nlm.nih.gov/data-hub/genome/GCF_001558495.2/
# strain: ATCC17802
# more info on 2nd test genome here: https://www.ncbi.nlm.nih.gov/data-hub/genome/GCF_001728135.1/
# strain: CDC_K5009W
RUN echo "downloading an 2 V. parahaemolyticus genomes & testing Kaptive..." && \
wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/001/558/495/GCF_001558495.2_ASM155849v2/GCF_001558495.2_ASM155849v2_genomic.fna.gz && \
wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/001/728/135/GCF_001728135.1_ASM172813v1/GCF_001728135.1_ASM172813v1_genomic.fna.gz && \
gzip -d GCF_001558495.2_ASM155849v2_genomic.fna.gz && \
gzip -d GCF_001728135.1_ASM172813v1_genomic.fna.gz && \
kaptive.py -a *.fna -k /kaptive/reference_database/VibrioPara_Kaptivedb_K.gbk -o /test3/Vparahaemolyticus && \
kaptive.py -a *.fna -k /kaptive/reference_database/VibrioPara_Kaptivedb_O.gbk -o /test3/Vparahaemolyticus
58 changes: 58 additions & 0 deletions kaptive/2.0.8/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Kaptive

Main tool: [Kaptive](https://github.com/klebgenomics/Kaptive)

Additional tools:

- ncbi-blast+ 2.3.0
- python 3.8.10
- biopython 1.81

## Kaptive databases

There are few databases included in this docker image for Kaptive v2.0.8:

- Klebsiella pneumoniae species complex
- included w/ Kaptive
- Acinetobacter baumannii
- included w/ Kaptive
- Vibrio parahaemolyticus
- Located in separate GitHub repo: https://github.com/aldertzomer/vibrio_parahaemolyticus_genomoserotyping
- Publication: https://www.microbiologyresearch.org/content/journal/mgen/10.1099/mgen.0.001007

The databases (Genbank/GBK files) are located as follows in the container filesystem:

```bash
# Klebsiella pneumoniae species complex
/kaptive/reference_database/Klebsiella_k_locus_primary_reference.gbk
/kaptive/reference_database/Klebsiella_o_locus_primary_reference.gbk

# Acinetobacter baumannii
/kaptive/reference_database/Acinetobacter_baumannii_k_locus_primary_reference.gbk
/kaptive/reference_database/Acinetobacter_baumannii_OC_locus_primary_reference.gbk

# Vibrio parahaeolyticus
/kaptive/reference_database/VibrioPara_Kaptivedb_K.gbk
/kaptive/reference_database/VibrioPara_Kaptivedb_O.gbk
```

Example commands for each of these databases can be found below.

## Example Usage

```bash
# K locus, A. baumannii
kaptive.py -a assembly.fasta -k /kaptive/reference_database/Acinetobacter_baumannii_k_locus_primary_reference.gbk
# O locus, A. baumannii
kaptive.py -a assembly.fasta -k /kaptive/reference_database/Acinetobacter_baumannii_OC_locus_primary_reference.gbk

# K locus, K. pneumoniae
kaptive.py -a assembly.fasta -k /kaptive/reference_database/Klebsiella_k_locus_primary_reference.gbk
# O locus, K. pneumoniae
kaptive.py -a assembly.fasta -k /kaptive/reference_database/Klebsiella_o_locus_primary_reference.gbk

# K locus, V. parahaemolyticus
kaptive.py -a assembly.fasta -k /kaptive/reference_database/VibrioPara_Kaptivedb_K.gbk
# O locus, V. parahaemolyticus
kaptive.py -a assembly.fasta -k /kaptive/reference_database/VibrioPara_Kaptivedb_O.gbk
```
Loading