-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathDockerfile
55 lines (46 loc) · 2.1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM ubuntu:jammy AS app
ARG STXTYPER_VER="1.0.27"
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="stxtyper"
LABEL software.version="${STXTYPER_VER}"
LABEL description="Search for Shiga toxin genes within bacterial genome assemblies"
LABEL website="https://github.com/ncbi/stxtyper"
LABEL license="https://github.com/ncbi/stxtyper/blob/main/LICENSE"
LABEL maintainer="Curtis Kapsak"
LABEL maintainer.email="[email protected]"
# install dependencies via apt; cleanup apt garbage
# blast from ubuntu:jammy is v2.12.0 (as of 2024-09-06)
# procps is for ps command (required for nextflow)
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
ncbi-blast+ \
procps && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*
# download pre-compiled binary
RUN mkdir /stxtyper && \
wget -q https://github.com/ncbi/stxtyper/releases/download/v${STXTYPER_VER}/stxtyper_v${STXTYPER_VER}_x86_64_Linux.tar.gz && \
tar -xzf stxtyper_v${STXTYPER_VER}_x86_64_Linux.tar.gz --strip-components=1 -C /stxtyper && \
rm -r stxtyper_v${STXTYPER_VER}_x86_64_Linux.tar.gz && \
ls -lh /stxtyper
# set PATH to include where stxtyper & fasta_check executables exist
ENV PATH="${PATH}:/stxtyper" \
TERM=xterm-256color
# set final working directory as /data for passing data in/out of container
WORKDIR /data
FROM app AS test
# print version and help options & run the supplied tests
RUN tblastn -version && \
stxtyper --version && \
stxtyper --help && \
cd /stxtyper && \
bash test_stxtyper.sh
# download genome from NCBI and test stxtyper with it
# expect 1 perfect match to stx2o subtype, with COMPLETE operon designation
# https://www.ncbi.nlm.nih.gov/datasets/genome/GCA_012224845.2/
# grep below requires both strings to be present in the same line
RUN echo "downloading test genome & running through stxtyper..." && \
wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/012/224/845/GCA_012224845.2_ASM1222484v2/GCA_012224845.2_ASM1222484v2_genomic.fna.gz && \
stxtyper -n GCA_012224845.2_ASM1222484v2_genomic.fna.gz | tee test-result.tsv && \
grep 'stx2o' test-result.tsv | grep 'COMPLETE'