Skip to content

Commit 80f290e

Browse files
authored
adding staramr version 0.11.1 (#1472)
1 parent 7f5af91 commit 80f290e

File tree

4 files changed

+227
-1
lines changed

4 files changed

+227
-1
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
##### ------------------------------------------------------------------------------------------------ #####
2+
##### This caller workflow tests, builds, and pushes the image to Docker Hub and Quay using the most #####
3+
##### recent databases. #####
4+
##### It takes no manual input. #####
5+
##### ------------------------------------------------------------------------------------------------ #####
6+
7+
name: Update STARAMR
8+
9+
on:
10+
workflow_dispatch:
11+
schedule:
12+
- cron: '30 7 1 1,7 *'
13+
# Runs at 07:30 on the 1st day of January and July
14+
15+
run-name: Updating STARAMR
16+
17+
jobs:
18+
update:
19+
if: github.repository == 'StaPH-B/docker-builds'
20+
runs-on: ubuntu-latest
21+
steps:
22+
23+
- name: pull repo
24+
uses: actions/checkout@v4
25+
26+
- name: set version
27+
id: latest_version
28+
run: |
29+
version=0.11.1
30+
echo "version=$version" >> $GITHUB_OUTPUT
31+
32+
file=build-files/staramr/$version/Dockerfile
33+
ls $file
34+
echo "file=$file" >> $GITHUB_OUTPUT
35+
36+
- name: set up docker buildx
37+
id: buildx
38+
uses: docker/setup-buildx-action@v3
39+
40+
- name: build to test
41+
id: docker_build_to_test
42+
uses: docker/build-push-action@v5
43+
with:
44+
file: ${{ steps.latest_version.outputs.file }}
45+
target: test
46+
load: true
47+
push: false
48+
tags: staramr:update
49+
50+
- name: Get current date
51+
id: date
52+
run: |
53+
date=$(date '+%Y-%m-%d')
54+
echo "the date is $date"
55+
echo "date=$date" >> $GITHUB_OUTPUT
56+
57+
- name: Login to DockerHub
58+
uses: docker/login-action@v3
59+
with:
60+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
61+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
62+
63+
- name: Login to Quay
64+
uses: docker/login-action@v3
65+
with:
66+
registry: quay.io
67+
username: ${{ secrets.QUAY_USERNAME }}
68+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
69+
70+
- name: Build and push user-defined tag to DockerHub
71+
id: docker_build_user_defined_tag
72+
uses: docker/build-push-action@v5
73+
with:
74+
file: ${{ steps.latest_version.outputs.file }}
75+
target: app
76+
push: true
77+
tags: |
78+
staphb/staramr:${{ steps.latest_version.outputs.version }}-${{ steps.date.outputs.date }}
79+
staphb/staramr:latest
80+
quay.io/staphb/staramr:${{ steps.latest_version.outputs.version }}-${{ steps.date.outputs.date }}
81+
quay.io/staphb/staramr:latest

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ To learn more about the docker pull rate limits and the open source software pro
323323
| [SPAdes](https://hub.docker.com/r/staphb/spades/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/spades)](https://hub.docker.com/r/staphb/spades) | <details><summary>Click to see all versions</summary> <ul><li>[3.8.2](./build-files/spades/3.8.2/)</li><li>[3.12.0](./build-files/spades/3.12.0/)</li><li>[3.13.0](./build-files/spades/3.13.0/)</li><li>[3.14.0](./build-files/spades/3.14.0/)</li><li>[3.14.1](./build-files/spades/3.14.1/)</li><li>[3.15.0](./build-files/spades/3.15.0/)</li><li>[3.15.1](./build-files/spades/3.15.1/)</li><li>[3.15.2](./build-files/spades/3.15.2/)</li><li>[3.15.3](./build-files/spades/3.15.3/)</li><li>[3.15.4](./build-files/spades/3.15.4/)</li><li>[3.15.5](./build-files/spades/3.15.5/)</li><li>[4.0.0](./build-files/spades/4.0.0/)</li><li>[4.1.0](./build-files/spades/4.1.0/)</li><li>[4.2.0](./build-files/spades/4.2.0/)</li></ul></details> | https://github.com/ablab/spades </br> http://cab.spbu.ru/software/spades/ |
324324
| [SRA-toolkit](https://hub.docker.com/r/staphb/sratoolkit/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/sratoolkit)](https://hub.docker.com/r/staphb/sratoolkit) | <details><summary>Click to see all versions</summary> <ul><li>[2.9.2](./build-files/sratoolkit/2.9.2/)</li><li>[3.0.7](./build-files/sratoolkit/3.0.7/)</li><li>[3.2.0](./build-files/sratoolkit/3.2.0/)</li><li>[3.2.1](./build-files/sratoolkit/3.2.1/)</li></ul> </details> | https://github.com/ncbi/sra-tools |
325325
| [SRST2](https://hub.docker.com/r/staphb/srst2/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/srst2)](https://hub.docker.com/r/staphb/srst2) | <details><summary>Click to see all versions</summary> <ul><li>[0.2.0](./build-files/srst2/0.2.0/)</li><li>[0.2.0 + custom Vibrio cholerae database](./build-files/srst2/0.2.0-vibrio-230224/README.md)</li></ul> </details> | https://github.com/katholt/srst2 |
326-
| [Staramr](https://hub.docker.com/r/staphb/staramr/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/staramr)](https://hub.docker.com/r/staphb/staramr) | <details><summary>Click to see all versions</summary> <ul><li>[0.5.1](./build-files/staramr/0.5.1/)</li><li>[0.7.1](./build-files/staramr/0.7.1/)</li><li>[0.8.0](./build-files/staramr/0.8.0/)</li><li>[0.10.0](./build-files/staramr/0.10.0/)</li><li>[0.11.0](./build-files/staramr/0.11.0/)</li></ul> </details> | https://github.com/phac-nml/staramr |
326+
| [Staramr](https://hub.docker.com/r/staphb/staramr/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/staramr)](https://hub.docker.com/r/staphb/staramr) | <details><summary>Click to see all versions</summary> <ul><li>[0.5.1](./build-files/staramr/0.5.1/)</li><li>[0.7.1](./build-files/staramr/0.7.1/)</li><li>[0.8.0](./build-files/staramr/0.8.0/)</li><li>[0.10.0](./build-files/staramr/0.10.0/)</li><li>[0.11.0](./build-files/staramr/0.11.0/)</li><li>[0.11.1](./build-files/staramr/0.11.1/)</li></ul> </details> | https://github.com/phac-nml/staramr |
327327
| [stxtyper](https://hub.docker.com/r/staphb/stxtyper) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/stxtyper)](https://hub.docker.com/r/staphb/stxtyper) | <details><summary>Click to see all versions</summary> <ul><li>[1.0.24](./build-files/stxtyper/1.0.24/)</li><li>[1.0.27](./build-files/stxtyper/1.0.27/)</li><li>[1.0.31](./build-files/stxtyper/1.0.31/)</li><li>[1.0.40](./build-files/stxtyper/1.0.40/)</li><li>[1.0.42](./build-files/stxtyper/1.0.42/)</li></ul> </details> | https://github.com/ncbi/stxtyper |
328328
| [sylph](https://hub.docker.com/r/staphb/sylph) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/sylph)](https://hub.docker.com/r/staphb/sylph) | <details><summary>Click to see all versions</summary> <ul><li>[0.4.1](./build-files/sylph/0.4.1)</li><li>[0.5.1](./build-files/sylph/0.5.1)</li><li>[0.6.0](./build-files/sylph/0.6.0/)</li><li>[0.6.1](./build-files/sylph/0.6.1)</li><li>[0.8.0](./build-files/sylph/0.8.0)</li><li>[0.8.1](./build-files/sylph/0.8.1/)</li><li>[0.9.0](./build-files/sylph/0.9.0/)</li></ul> </details> | https://github.com/bluenote-1577/sylph |
329329
| [TBProfiler](https://hub.docker.com/r/staphb/tbprofiler/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/tbprofiler)](https://hub.docker.com/r/staphb/tbprofiler) | <details><summary>Click to see all versions</summary> <ul><li>[4.3.0](./build-files/tbprofiler/4.3.0/)</li><li>[4.4.0](./build-files/tbprofiler/4.4.0/)</li><li>[4.4.2](./build-files/tbprofiler/4.4.2/)</li><li>[5.0.1](./build-files/tbprofiler/5.0.1/)</li><li>[6.2.0](./build-files/tbprofiler/6.2.0/)</li><li>[6.2.1](./build-files/tbprofiler/6.2.1/)</li><li>[6.3.0](./build-files/tbprofiler/6.3.0/)</li><li>[6.4.0](./build-files/tbprofiler/6.4.0/)</li><li>[6.4.1](./build-files/tbprofiler/6.4.1/)</li><li>[6.6.2](./build-files/tbprofiler/6.6.2/)</li><li>[6.6.3](./build-files/tbprofiler/6.6.3/)</li><li>[6.6.5](./build-files/tbprofiler/6.6.5/)</li></ul> </details> | https://github.com/jodyphelan/TBProfiler <br/> https://github.com/jodyphelan/tbdb |
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# base image
2+
FROM python:3.9-slim AS app
3+
4+
ARG STARAMR_VER="0.11.1"
5+
ARG MLST_VER="2.23.0"
6+
ARG ANY2FASTA_VERSION="0.4.2"
7+
8+
LABEL base.image="python:3.9-slim"
9+
LABEL dockerfile.version="1"
10+
LABEL software="staramr"
11+
LABEL software.version="${STARAMR_VER}"
12+
LABEL description="staramr scans bacterial genome contigs for AMR genes and plasmids"
13+
LABEL website="https://github.com/phac-nml/staramr"
14+
LABEL license="https://github.com/phac-nml/staramr/blob/master/LICENSE"
15+
LABEL maintainer="Rachael St. Jacques"
16+
LABEL maintainer.email="rachael.stjacques@dgs.virginia.gov"
17+
LABEL maintainer2="Curtis Kapsak"
18+
LABEL maintainer2.email="curtis.kapsak@theiagen.com"
19+
20+
# install dependencies via apt; cleanup apt garbage
21+
# ncbi-blast+ is v2.9.0 in ubuntu:focal (as of August 2022)
22+
RUN apt-get update && apt-get install -y --no-install-recommends \
23+
git \
24+
wget \
25+
libmoo-perl \
26+
liblist-moreutils-perl \
27+
libjson-perl \
28+
gzip \
29+
file \
30+
ncbi-blast+ \
31+
procps \
32+
ca-certificates && \
33+
apt-get autoclean && rm -rf /var/lib/apt/lists/*
34+
35+
# any2fasta
36+
RUN wget -q https://github.com/tseemann/any2fasta/archive/refs/tags/v${ANY2FASTA_VERSION}.tar.gz && \
37+
tar -xvf v${ANY2FASTA_VERSION}.tar.gz && \
38+
rm v${ANY2FASTA_VERSION}.tar.gz && \
39+
cd any2fasta-${ANY2FASTA_VERSION} && \
40+
chmod +x any2fasta
41+
42+
# mlst
43+
# apt dependencies: wget libmoo-perl liblist-moreutils-perl libjson-perl gzip file
44+
# also requires blast 2.9.0 or greater
45+
RUN wget -q https://github.com/tseemann/mlst/archive/v${MLST_VER}.tar.gz && \
46+
tar -xzf v${MLST_VER}.tar.gz && \
47+
rm v${MLST_VER}.tar.gz
48+
49+
# staramr; make /data
50+
RUN wget -q https://github.com/phac-nml/staramr/archive/refs/tags/${STARAMR_VER}.tar.gz && \
51+
pip install ${STARAMR_VER}.tar.gz --no-cache-dir && \
52+
rm -rf ${STARAMR_VER}.tar.gz && \
53+
mkdir /data
54+
55+
# set $PATH and locale settings for singularity
56+
ENV PATH="${PATH}:/mlst-${MLST_VER}/bin:/any2fasta-${ANY2FASTA_VERSION}/" \
57+
LC_ALL=C
58+
59+
# update staramr default databases and print db info
60+
RUN staramr db update -d && staramr db info
61+
62+
CMD ["staramr", "--help"]
63+
64+
WORKDIR /data
65+
66+
FROM app AS test
67+
68+
RUN staramr --help && staramr --version
69+
70+
# download the FASTA file for ${GENBANK_ACCESSION}
71+
# Salmonella Enterica isolate from PHE-UK: https://www.ncbi.nlm.nih.gov/assembly/GCA_010941835.1/
72+
RUN wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/010/941/835/GCA_010941835.1_PDT000052640.3/GCA_010941835.1_PDT000052640.3_genomic.fna.gz && \
73+
gzip -d GCA_010941835.1_PDT000052640.3_genomic.fna.gz
74+
75+
# run staramr on the second genome mentioned on staramr's documentation; print resulting TSVs
76+
RUN staramr search -o /data/staramr-test-Salmonella \
77+
--pointfinder-organism salmonella \
78+
--plasmidfinder-database-type enterobacteriales \
79+
/data/GCA_010941835.1_PDT000052640.3_genomic.fna
80+
81+
# installing bsdmainutils for installing "column" command
82+
RUN apt-get update && apt-get install -y --no-install-recommends bsdmainutils
83+
84+
# neatly print out resulting/output TSVs
85+
RUN column -t /data/staramr-test-Salmonella/mlst.tsv && echo && \
86+
column -t /data/staramr-test-Salmonella/pointfinder.tsv && echo && \
87+
column -t /data/staramr-test-Salmonella/plasmidfinder.tsv && echo && \
88+
column -t /data/staramr-test-Salmonella/resfinder.tsv && echo && \
89+
column -t /data/staramr-test-Salmonella/detailed_summary.tsv && echo && \
90+
column -t /data/staramr-test-Salmonella/summary.tsv
91+
92+
RUN staramr db info
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# staramr container
2+
3+
Main tool : [staramr](https://github.com/phac-nml/staramr)
4+
5+
Additional tools:
6+
7+
- mlst 2.23.0
8+
- ncbi-blast+ 2.12.0+
9+
- any2fasta 0.4.2
10+
- Databases for PlasmidFinder, PointFinder, ResFinder
11+
12+
Database version information:
13+
14+
```
15+
##### staramr db information at time of docker image build #####
16+
resfinder_db_dir = /usr/local/lib/python3.9/site-packages/staramr/databases/data/update/resfinder
17+
resfinder_db_url = https://bitbucket.org/genomicepidemiology/resfinder_db.git
18+
resfinder_db_commit = c0aa05c5cae9da75e4395e9fa3dd5057e3bf4a75
19+
resfinder_db_date = Tue, 09 Sep 2025 18:35
20+
pointfinder_db_dir = /usr/local/lib/python3.9/site-packages/staramr/databases/data/update/pointfinder
21+
pointfinder_db_url = https://bitbucket.org/genomicepidemiology/pointfinder_db.git
22+
pointfinder_db_commit = 29d83a51cb41e429e38e46b1096608b9accb2b2a
23+
pointfinder_db_date = Fri, 22 Aug 2025 09:34
24+
pointfinder_organisms_all = campylobacter, enterococcus_faecalis, enterococcus_faecium, escherichia_coli, helicobacter_pylori, klebsiella, mycobacterium_tuberculosis, neisseria_gonorrhoeae, plasmodium_falciparum, salmonella, staphylococcus_aureus
25+
pointfinder_organisms_valid = campylobacter, enterococcus_faecalis, enterococcus_faecium, escherichia_coli, helicobacter_pylori, salmonella
26+
plasmidfinder_db_dir = /usr/local/lib/python3.9/site-packages/staramr/databases/data/update/plasmidfinder
27+
plasmidfinder_db_url = https://bitbucket.org/genomicepidemiology/plasmidfinder_db.git
28+
plasmidfinder_db_commit = 49c24c1c9401fa175fbcfdbd4b37227a160baca4
29+
plasmidfinder_db_date = Wed, 10 Sep 2025 18:56
30+
mlst_version = 2.23.0
31+
pointfinder_gene_drug_version = 070623
32+
resfinder_gene_drug_version = 072423
33+
```
34+
35+
STARAMR uses several databases that it does not maintain. As such, this image is re-built twice a year for the latest of these databases {latest-version}={date of rebuilding}.
36+
37+
38+
Full documentation: https://github.com/phac-nml/staramr
39+
40+
staramr scans bacterial genome contigs for AMR genes and plasmids
41+
42+
## Example Usage
43+
44+
```bash
45+
# run "staramr search" on a genome assembly (broken into multiple lines for readability)
46+
staramr search -o /data/staramrtest-Salmonella \
47+
--pointfinder-organism salmonella \
48+
--plasmidfinder-database-type enterobacteriales \
49+
/data/salmonella_enterica_assembly.fasta
50+
51+
# to get database information
52+
staramr db info
53+
```

0 commit comments

Comments
 (0)