From d8de6aca505cd69df548bfc98208ed74203d8c2b Mon Sep 17 00:00:00 2001 From: Taylor Paisie Date: Thu, 22 Feb 2024 15:15:41 -0500 Subject: [PATCH 01/23] Create main.yml --- .github/workflows/main.yml | 137 +++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..09a300dee --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,137 @@ + +##### ------------------------------------------------------------------------------------------------ ##### +##### This caller workflow tests, builds, and pushes the image to Docker Hub and Quay using the most ##### +##### recent version of Freyja and downloading the most recent variant information. ##### +##### It takes no manual input. ##### +##### ------------------------------------------------------------------------------------------------ ##### + +name: Update Freyja + +on: + workflow_dispatch: + schedule: + - cron: '30 7 * * *' + +run-name: Updating Freyja + +jobs: + update: + runs-on: ubuntu-latest + steps: + +# Keeping here in case we want to use it to keep Freyja's version up-to-date as well +# - name: Get latest release +# uses: rez0n/actions-github-release@main +# id: latest_release +# with: +# token: ${{ secrets.GITHUB_TOKEN }} +# repository: andersen-lab/Freyja +# type: "stable" +# - name: Remove V +# id: strip +# run: | +# version=$(echo "${{ steps.latest_release.outputs.release }}" | sed 's/V//g' | sed 's/v//g' ) +# echo "The version is $version" +# echo "version=$version" >> $GITHUB_OUTPUT + + - name: pull repo + uses: actions/checkout@v3 + +# Keeping here in case we want to figure out why this doesn't work +# - name: get latest version of freyja in docker-builds repo +# id: latest_version +# run: | +# file=$(git log -1 --name-only --format=%cd --date=iso freyja/*/Dockerfile | grep Dockerfile | head -n 1 ) +# echo "the latest file is $file" +# echo "file=$file" >> $GITHUB_OUTPUT +# +# version=$(echo $file | cut -f 2 -d "/" | cut -f 1 -d "_") +# echo "the latest version is $version" +# echo "version=$version" >> $GITHUB_OUTPUT + + - name: set freyja version + id: latest_version + run: | + version=1.4.8 + echo "version=$version" >> $GITHUB_OUTPUT + + file=freyja/$version/Dockerfile + ls $file + echo "file=$file" >> $GITHUB_OUTPUT + - name: set up docker buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: cache docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache-freyja + key: ${{ runner.os }}-buildx-freyja-${{ github.sha }} + restore-keys: ${{ runner.os }}-buildx-freyja + + - name: build to test + id: docker_build_to_test + uses: docker/build-push-action@v3 + with: + file: ${{ steps.latest_version.outputs.file }} + target: test + load: true + push: false + cache-from: type=local,src=/tmp/.buildx-cache-freyja + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-freyja-new + tags: freyja:update + + - name: get freyja database version + id: db_version + run: | + docker run freyja:update freyja demix --version + version=$(docker run freyja:update freyja demix --version | grep . | grep -v Barcode | head -n 1) + echo "the latest version is $version" + echo "version=$version" >> $GITHUB_OUTPUT + - name: Get current date + id: date + run: | + date=$(date '+%Y-%m-%d') + echo "the date is $date" + echo "date=$date" >> $GITHUB_OUTPUT + + # - name: Login to DockerHub + # uses: docker/login-action@v2 + # with: + # username: ${{ secrets.DOCKER_HUB_USERNAME }} + # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Login to Quay + uses: docker/login-action@v2 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_ROBOT_TOKEN }} + + - name: Build and push user-defined tag to DockerHub + id: docker_build_user_defined_tag + uses: docker/build-push-action@v3 + with: + file: ${{ steps.latest_version.outputs.file }} + target: app + push: true + cache-from: type=local,src=/tmp/.buildx-cache-freyja + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-freyja-new # mode=max means export layers from all stage to cache + tags: staphb/freyja:${{ steps.latest_version.outputs.version }}-${{ steps.db_version.outputs.version }}-${{ steps.date.outputs.date }} + + - name: Build and push to Quay + id: build + uses: docker/build-push-action@v3 + with: + file: ${{ steps.latest_version.outputs.file }} + target: app + push: true + cache-from: type=local,src=/tmp/.buildx-cache-freyja + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-freyja-new # mode=max means export + tags: quay.io/staphb/freyja:${{ steps.latest_version.outputs.version }}-${{ steps.db_version.outputs.version }}-${{ steps.date.outputs.date }} + + - name: Move cache # apparently prevents the cache from growing in size forever + run: | + rm -rf /tmp/.buildx-cache-freyja + mv /tmp/.buildx-cache-freyja-new /tmp/.buildx-cache-freyja + - name: Image digest From d345f7ae69913430af0d55b13467f1851760fefb Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 11 Sep 2024 13:32:24 -0400 Subject: [PATCH 02/23] adding my seqfu docker container to branch --- seqfu/1.20.3/Dockerfile | 87 +++++++++++++++++++++++++++++++++++++++++ seqfu/1.20.3/README.md | 46 ++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 seqfu/1.20.3/Dockerfile create mode 100644 seqfu/1.20.3/README.md diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile new file mode 100644 index 000000000..a22a46dec --- /dev/null +++ b/seqfu/1.20.3/Dockerfile @@ -0,0 +1,87 @@ +# Set global variables +ARG SEQFU_VER="1.20.3" + +# Build Dockerfile +FROM ubuntu:focal AS builder +ARG SEQFU_VER + +LABEL base.image="ubuntu:focal" +LABEL dockerfile.version="1" +LABEL software="SeqFu" +LABEL software.version=${SEQFU_VER} +LABEL description="A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files." +LABEL website="https://github.com/telatin/seqfu2" +LABEL license.url="https://github.com/telatin/seqfu2?tab=GPL-3.0-1-ov-file#readme" +LABEL maintainer="Taylor K. Paisie" +LABEL maintainer.email='ltj8@cdc.gov' + +# Set non-interactive frontend +ENV DEBIAN_FRONTEND=noninteractive + +# Set PATH globally to include Nimble binaries +ENV PATH="/root/.nimble/bin:${PATH}" + +# Install required dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget \ + unzip \ + build-essential \ + zlib1g-dev \ + curl \ + python3 \ + python3-pip \ + git \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +# Set the working directory to /root +WORKDIR /root + +# Run commands in non-interactive mode +RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y && \ + wget https://github.com/telatin/seqfu2/archive/refs/tags/v${SEQFU_VER}.tar.gz && \ + tar -xzf v${SEQFU_VER}.tar.gz && \ + rm -r v${SEQFU_VER}.tar.gz && \ + cd seqfu2-${SEQFU_VER} && \ + # make 2>&1 | tee /tmp/make_output.log && \ + make && \ + # Run tests and allow build to continue even if some tests fail + make test VERBOSE=1 || (echo "Tests failed, but continuing build"; exit 0) + + +# Copy the built binary to a location in the PATH +RUN cp /root/seqfu2-${SEQFU_VER}/bin/seqfu /usr/local/bin/seqfu + +# Final image +FROM ubuntu:focal AS app +ARG SEQFU_VER + +# Copy the necessary files from the builder +COPY --from=builder /usr/local/bin/seqfu /usr/local/bin/seqfu +COPY --from=builder /root/seqfu2-${SEQFU_VER}/data/tests /root/seqfu2-${SEQFU_VER}/data/tests + +RUN apt-get update && apt-get install -y --no-install-recommends \ + curl \ + wget \ + && rm -rf /var/lib/apt/lists/* + +# Setting working directory +RUN mkdir /data +WORKDIR /data + +RUN seqfu --version &&\ + seqfu --help + + +# ## Test ## +# FROM app as test + +# RUN apt-get update && apt-get install -y \ +# python3 \ +# wget + +# RUN mkdir ../tests/ +# COPY tests/ ../tests/ + + +# RUN python3 -m unittest discover -v -s ../tests \ No newline at end of file diff --git a/seqfu/1.20.3/README.md b/seqfu/1.20.3/README.md new file mode 100644 index 000000000..024720839 --- /dev/null +++ b/seqfu/1.20.3/README.md @@ -0,0 +1,46 @@ +# SeqFu + +Main tool: [SeqFu](https://sourceforge.net/projects/rdp-classifier/) + +Code repository: https://github.com/telatin/seqfu2 + +Basic information on how to use this tool: +- executable: | +``` + · count [cnt] : count FASTA/FASTQ reads, pair-end aware + · deinterleave [dei] : deinterleave FASTQ + · derep [der] : feature-rich dereplication of FASTA/FASTQ files + · interleave [ilv] : interleave FASTQ pair ends + · lanes [mrl] : merge Illumina lanes + · list [lst] : print sequences from a list of names + · metadata [met] : print a table of FASTQ reads (mapping files) + · sort [srt] : sort sequences by size (uniques) + · stats [st] : statistics on sequence lengths + + · cat : concatenate FASTA/FASTQ files + · grep : select sequences with patterns + · head : print first sequences + · rc : reverse complement strings or files + · tab : tabulate reads to TSV (and viceversa) + · tail : view last sequences + · view : view sequences with colored quality and oligo matches +``` + +- help: seqfu --help +- version: seqfu --version +- description: | +> A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files. + + +Full documentation: https://telatin.github.io/seqfu2/ + + +# Testing SeqFU analysis +``` +seqfu check \ + --deep \ + --verbose \ + /root/seqfu2-1.20.3/data/tests/sample1_R1.fq \ + /root/seqfu2-1.20.3/data/tests/sample1_R2.fq +``` + From 91f036648a49a5d4b8ded7e029cf73fd4d6b13e2 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 11 Sep 2024 13:34:10 -0400 Subject: [PATCH 03/23] editing seqfu readme --- seqfu/1.20.3/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seqfu/1.20.3/README.md b/seqfu/1.20.3/README.md index 024720839..d399605da 100644 --- a/seqfu/1.20.3/README.md +++ b/seqfu/1.20.3/README.md @@ -26,8 +26,8 @@ Basic information on how to use this tool: · view : view sequences with colored quality and oligo matches ``` -- help: seqfu --help -- version: seqfu --version +- help: `seqfu --help` +- version: `seqfu --version` - description: | > A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files. From fdf1a331be8aab6fdb22bc4270dc80358b7bcc39 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 11 Sep 2024 14:09:25 -0400 Subject: [PATCH 04/23] updated seqfu readme --- seqfu/1.20.3/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seqfu/1.20.3/README.md b/seqfu/1.20.3/README.md index d399605da..98d5794f9 100644 --- a/seqfu/1.20.3/README.md +++ b/seqfu/1.20.3/README.md @@ -1,6 +1,6 @@ # SeqFu -Main tool: [SeqFu](https://sourceforge.net/projects/rdp-classifier/) +Main tool: [SeqFu](https://github.com/telatin/seqfu2) Code repository: https://github.com/telatin/seqfu2 From d0f59ae99d87b49efb8545a1238a9c8cbcd07e52 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 11 Sep 2024 14:19:10 -0400 Subject: [PATCH 05/23] removed extra 1.20.3 seqfu dir in wrong spot --- seqfu/1.20.3/Dockerfile | 78 ++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 47 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index a22a46dec..c1f025a45 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -1,25 +1,24 @@ # Set global variables ARG SEQFU_VER="1.20.3" -# Build Dockerfile +# Stage 1: Build Dockerfile FROM ubuntu:focal AS builder ARG SEQFU_VER -LABEL base.image="ubuntu:focal" -LABEL dockerfile.version="1" -LABEL software="SeqFu" -LABEL software.version=${SEQFU_VER} -LABEL description="A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files." -LABEL website="https://github.com/telatin/seqfu2" -LABEL license.url="https://github.com/telatin/seqfu2?tab=GPL-3.0-1-ov-file#readme" -LABEL maintainer="Taylor K. Paisie" -LABEL maintainer.email='ltj8@cdc.gov' - -# Set non-interactive frontend -ENV DEBIAN_FRONTEND=noninteractive - -# Set PATH globally to include Nimble binaries -ENV PATH="/root/.nimble/bin:${PATH}" +# Metadata +LABEL base.image="ubuntu:focal" \ + dockerfile.version="1" \ + software="SeqFu" \ + software.version="${SEQFU_VER}" \ + description="A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files." \ + website="https://github.com/telatin/seqfu2" \ + license.url="https://github.com/telatin/seqfu2?tab=GPL-3.0-1-ov-file#readme" \ + maintainer="Taylor K. Paisie" \ + maintainer.email="ltj8@cdc.gov" + +# Set non-interactive frontend and update PATH +ENV DEBIAN_FRONTEND=noninteractive \ + PATH="/root/.nimble/bin:${PATH}" # Install required dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -31,57 +30,42 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 \ python3-pip \ git \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* + ca-certificates && \ + rm -rf /var/lib/apt/lists/* -# Set the working directory to /root +# Set the working directory WORKDIR /root -# Run commands in non-interactive mode +# Install Nim and SeqFu RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y && \ wget https://github.com/telatin/seqfu2/archive/refs/tags/v${SEQFU_VER}.tar.gz && \ tar -xzf v${SEQFU_VER}.tar.gz && \ - rm -r v${SEQFU_VER}.tar.gz && \ + rm v${SEQFU_VER}.tar.gz && \ cd seqfu2-${SEQFU_VER} && \ - # make 2>&1 | tee /tmp/make_output.log && \ make && \ - # Run tests and allow build to continue even if some tests fail make test VERBOSE=1 || (echo "Tests failed, but continuing build"; exit 0) - # Copy the built binary to a location in the PATH -RUN cp /root/seqfu2-${SEQFU_VER}/bin/seqfu /usr/local/bin/seqfu +RUN ls -l /root/seqfu2-${SEQFU_VER}/bin && \ + cp -R /root/seqfu2-${SEQFU_VER}/bin/* /usr/local/bin/ && \ + chmod +x /usr/local/bin/seqfu -# Final image +# Stage 2: Create the final image FROM ubuntu:focal AS app ARG SEQFU_VER # Copy the necessary files from the builder -COPY --from=builder /usr/local/bin/seqfu /usr/local/bin/seqfu +COPY --from=builder /usr/local/bin /usr/local/bin COPY --from=builder /root/seqfu2-${SEQFU_VER}/data/tests /root/seqfu2-${SEQFU_VER}/data/tests +# Install minimal runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ - wget \ - && rm -rf /var/lib/apt/lists/* + wget && \ + rm -rf /var/lib/apt/lists/* -# Setting working directory -RUN mkdir /data +# Set working directory WORKDIR /data -RUN seqfu --version &&\ - seqfu --help - - -# ## Test ## -# FROM app as test - -# RUN apt-get update && apt-get install -y \ -# python3 \ -# wget - -# RUN mkdir ../tests/ -# COPY tests/ ../tests/ - - -# RUN python3 -m unittest discover -v -s ../tests \ No newline at end of file +# Verify installation +RUN ls -l /usr/local/bin && seqfu --version && seqfu --help \ No newline at end of file From 1f8ce15b3788e859f1fcb7b2b244dc242a3a3900 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 11 Sep 2024 14:26:20 -0400 Subject: [PATCH 06/23] restored files for seqfu --- seqfu/1.20.3/Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index c1f025a45..43e93efb0 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -68,4 +68,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /data # Verify installation -RUN ls -l /usr/local/bin && seqfu --version && seqfu --help \ No newline at end of file +RUN ls -l /usr/local/bin && seqfu --version && seqfu --help + +# Uncomment for testing +# FROM app as test +# RUN apt-get update && apt-get install -y python3 wget +# RUN mkdir ../tests/ +# COPY tests/ ../tests/ +# RUN python3 -m unittest discover -v -s ../tests + +# tpaisie/seqfu@sha256:e2d3e2f7229cf64c20634701dca5206619191551b91f2f306bdd326e623864c8 From 9ea00af9ef58e4e3943efd3a35d1fd48b061acbc Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 11 Sep 2024 14:29:16 -0400 Subject: [PATCH 07/23] cleaning up dockerfile --- seqfu/1.20.3/Dockerfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 43e93efb0..2dc175901 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -68,13 +68,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /data # Verify installation -RUN ls -l /usr/local/bin && seqfu --version && seqfu --help - -# Uncomment for testing -# FROM app as test -# RUN apt-get update && apt-get install -y python3 wget -# RUN mkdir ../tests/ -# COPY tests/ ../tests/ -# RUN python3 -m unittest discover -v -s ../tests - -# tpaisie/seqfu@sha256:e2d3e2f7229cf64c20634701dca5206619191551b91f2f306bdd326e623864c8 +RUN seqfu --version && seqfu --help From d06fe74a6e4c876fb32f6196cbbd4563c0b6d300 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 11 Sep 2024 14:40:54 -0400 Subject: [PATCH 08/23] updated readme and program licenses with seqfu --- Program_Licenses.md | 1 + README.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Program_Licenses.md b/Program_Licenses.md index fd5fbcec7..559ffbbc4 100644 --- a/Program_Licenses.md +++ b/Program_Licenses.md @@ -133,6 +133,7 @@ The licenses of the open-source software that is contained in these Docker image | Roary | GNU GPLv3 | https://github.com/sanger-pathogens/Roary/blob/master/GPL-LICENSE | | SalmID| MIT | https://github.com/hcdenbakker/SalmID/blob/master/LICENSE | | Samtools | GNU GPLv3 | https://github.com/samtools/samtools/blob/develop/LICENSE | +| SeqFu | GNU GPLv3 | https://github.com/telatin/seqfu2 | | SeqKit | MIT | https://github.com/shenwei356/seqkit/blob/master/LICENSE | SeqSero | GNU GPLv2 | https://github.com/denglab/SeqSero/blob/master/LICENSE | | SeqSero2 | GNU GPLv2 | https://github.com/denglab/SeqSero2/blob/master/LICENSE | diff --git a/README.md b/README.md index 01e1407e8..bb22190e0 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,7 @@ To learn more about the docker pull rate limits and the open source software pro | [Roary](https://hub.docker.com/r/staphb/roary/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/roary)](https://hub.docker.com/r/staphb/roary) |
  • 3.12.0
  • 3.13.0
| https://github.com/sanger-pathogens/Roary | | [SalmID](https://hub.docker.com/r/staphb/salmid)
[![docker pulls](https://badgen.net/docker/pulls/staphb/salmid)](https://hub.docker.com/r/staphb/salmid) |
  • 0.1.23
| https://github.com/hcdenbakker/SalmID | | [Samtools](https://hub.docker.com/r/staphb/samtools)
[![docker pulls](https://badgen.net/docker/pulls/staphb/samtools)](https://hub.docker.com/r/staphb/samtools) |
  • [1.9](./samtools/1.9/)
  • [1.10](./samtools/1.10/)
  • [1.11](./samtools/1.11/)
  • [1.12](./samtools/1.12/)
  • [1.13](./samtools/1.13/)
  • [1.14](./samtools/1.14/)
  • [1.15](./samtools/1.15/)
  • [1.16](./samtools/1.16/)
  • [1.16.1](./samtools/1.16.1/)
  • [1.17](./samtools/1.17/)
  • [1.17-2023-06](./samtools/1.17-2023-06/)
  • [1.18](./samtools/1.18/)
  • [1.19](./samtools/1.19/)
| https://github.com/samtools/samtools | +| [SeqFu](https://hub.docker.com/r/staphb/SeqFu)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqfu)](https://hub.docker.com/r/staphb/seqfu) | | [SeqKit](https://hub.docker.com/r/staphb/SeqKit)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqkit)](https://hub.docker.com/r/staphb/seqkit) |
  • [2.3.1](./seqkit/2.3.1/)
  • [2.6.1](./seqkit/2.6.1/)
  • [2.7.0](./seqkit/2.7.0/)
| https://github.com/shenwei356/seqkit | | [SeqSero](https://hub.docker.com/r/staphb/seqsero/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqsero)](https://hub.docker.com/r/staphb/seqsero) |
  • 1.0.1
| https://github.com/denglab/SeqSero | | [SeqSero2](https://hub.docker.com/r/staphb/seqsero2/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqsero2)](https://hub.docker.com/r/staphb/seqsero2) |
  • 0.1.0
  • 1.0.0
  • 1.0.2
  • 1.1.0
  • 1.1.1
  • 1.2.1
| https://github.com/denglab/SeqSero2/ | @@ -344,3 +345,4 @@ Each Dockerfile lists the author(s)/maintainer(s) as a metadata `LABEL`, but the * [@evagunawan](https://github.com/evagunawan) * [@nawrockie](https://github.com/nawrockie) * [@stephenturner](https://github.com/stephenturner) + * [@taylorpaisie](https://github.com/taylorpaisie) From ecbc8b82acda4ca6b5c978ef2efa78772233b5a4 Mon Sep 17 00:00:00 2001 From: Young Date: Thu, 12 Sep 2024 12:54:46 -0600 Subject: [PATCH 09/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57b11813b..75b9cf911 100644 --- a/README.md +++ b/README.md @@ -257,7 +257,7 @@ To learn more about the docker pull rate limits and the open source software pro | [SalmID](https://hub.docker.com/r/staphb/salmid)
[![docker pulls](https://badgen.net/docker/pulls/staphb/salmid)](https://hub.docker.com/r/staphb/salmid) |
  • 0.1.23
| https://github.com/hcdenbakker/SalmID | | [samclip](https://hub.docker.com/r/staphb/samclip)
[![docker pulls](https://badgen.net/docker/pulls/staphb/samclip)](https://hub.docker.com/r/staphb/samclip) |
  • [0.4.0](./samclip/0.4.0/)
| https://github.com/tseemann/samclip | | [Samtools](https://hub.docker.com/r/staphb/samtools)
[![docker pulls](https://badgen.net/docker/pulls/staphb/samtools)](https://hub.docker.com/r/staphb/samtools) |
  • [1.9](./samtools/1.9/)
  • [1.10](./samtools/1.10/)
  • [1.11](./samtools/1.11/)
  • [1.12](./samtools/1.12/)
  • [1.13](./samtools/1.13/)
  • [1.14](./samtools/1.14/)
  • [1.15](./samtools/1.15/)
  • [1.16](./samtools/1.16/)
  • [1.16.1](./samtools/1.16.1/)
  • [1.17](./samtools/1.17/)
  • [1.17-2023-06](./samtools/1.17-2023-06/)
  • [1.18](./samtools/1.18/)
  • [1.19](./samtools/1.19/)
  • [1.20](./samtools/1.20/)
  • [1.20.c](./samtools/1.20.c/)
| https://github.com/samtools/samtools | -| [SeqFu](https://hub.docker.com/r/staphb/SeqFu)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqfu)](https://hub.docker.com/r/staphb/seqfu) | +| [SeqFu](https://hub.docker.com/r/staphb/SeqFu)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqfu)](https://hub.docker.com/r/staphb/seqfu) |
  • [1.20.3](./seqfu/1.20.3/)
| https://github.com/telatin/seqfu2 | | [SeqKit](https://hub.docker.com/r/staphb/SeqKit)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqkit)](https://hub.docker.com/r/staphb/seqkit) |
  • [2.3.1](./seqkit/2.3.1/)
  • [2.6.1](./seqkit/2.6.1/)
  • [2.7.0](./seqkit/2.7.0/)
  • [2.8.0](./seqkit/2.8.0/)
  • [2.8.1](./seqkit/2.8.1/)
  • [2.8.2](./seqkit/2.8.2/)
| https://github.com/shenwei356/seqkit | | [SeqSero](https://hub.docker.com/r/staphb/seqsero/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqsero)](https://hub.docker.com/r/staphb/seqsero) |
  • 1.0.1
| https://github.com/denglab/SeqSero | | [SeqSero2](https://hub.docker.com/r/staphb/seqsero2/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/seqsero2)](https://hub.docker.com/r/staphb/seqsero2) |
  • [0.1.0](./seqsero2/0.1.0/)
  • [1.0.0](./seqsero2/1.0.0/)
  • [1.0.2](./seqsero2/1.0.2/)
  • [1.1.0](./seqsero2/1.1.0/)
  • [1.1.1](./seqsero2/1.1.1/)
  • [1.2.1](./seqsero2/1.2.1/)
  • [1.3.1](./seqsero2/1.3.1/)
| https://github.com/denglab/SeqSero2/ | From d42f0e84fffa2f3c7a2d5d3d4e70b1370524a0d4 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Sat, 14 Sep 2024 14:20:09 +0200 Subject: [PATCH 10/23] removed main.yml and edited dockerfile to removing test data from seqfu container --- .github/workflows/main.yml | 137 ------------------------------------- seqfu/1.20.3/Dockerfile | 6 +- 2 files changed, 4 insertions(+), 139 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 09a300dee..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,137 +0,0 @@ - -##### ------------------------------------------------------------------------------------------------ ##### -##### This caller workflow tests, builds, and pushes the image to Docker Hub and Quay using the most ##### -##### recent version of Freyja and downloading the most recent variant information. ##### -##### It takes no manual input. ##### -##### ------------------------------------------------------------------------------------------------ ##### - -name: Update Freyja - -on: - workflow_dispatch: - schedule: - - cron: '30 7 * * *' - -run-name: Updating Freyja - -jobs: - update: - runs-on: ubuntu-latest - steps: - -# Keeping here in case we want to use it to keep Freyja's version up-to-date as well -# - name: Get latest release -# uses: rez0n/actions-github-release@main -# id: latest_release -# with: -# token: ${{ secrets.GITHUB_TOKEN }} -# repository: andersen-lab/Freyja -# type: "stable" -# - name: Remove V -# id: strip -# run: | -# version=$(echo "${{ steps.latest_release.outputs.release }}" | sed 's/V//g' | sed 's/v//g' ) -# echo "The version is $version" -# echo "version=$version" >> $GITHUB_OUTPUT - - - name: pull repo - uses: actions/checkout@v3 - -# Keeping here in case we want to figure out why this doesn't work -# - name: get latest version of freyja in docker-builds repo -# id: latest_version -# run: | -# file=$(git log -1 --name-only --format=%cd --date=iso freyja/*/Dockerfile | grep Dockerfile | head -n 1 ) -# echo "the latest file is $file" -# echo "file=$file" >> $GITHUB_OUTPUT -# -# version=$(echo $file | cut -f 2 -d "/" | cut -f 1 -d "_") -# echo "the latest version is $version" -# echo "version=$version" >> $GITHUB_OUTPUT - - - name: set freyja version - id: latest_version - run: | - version=1.4.8 - echo "version=$version" >> $GITHUB_OUTPUT - - file=freyja/$version/Dockerfile - ls $file - echo "file=$file" >> $GITHUB_OUTPUT - - name: set up docker buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: cache docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache-freyja - key: ${{ runner.os }}-buildx-freyja-${{ github.sha }} - restore-keys: ${{ runner.os }}-buildx-freyja - - - name: build to test - id: docker_build_to_test - uses: docker/build-push-action@v3 - with: - file: ${{ steps.latest_version.outputs.file }} - target: test - load: true - push: false - cache-from: type=local,src=/tmp/.buildx-cache-freyja - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-freyja-new - tags: freyja:update - - - name: get freyja database version - id: db_version - run: | - docker run freyja:update freyja demix --version - version=$(docker run freyja:update freyja demix --version | grep . | grep -v Barcode | head -n 1) - echo "the latest version is $version" - echo "version=$version" >> $GITHUB_OUTPUT - - name: Get current date - id: date - run: | - date=$(date '+%Y-%m-%d') - echo "the date is $date" - echo "date=$date" >> $GITHUB_OUTPUT - - # - name: Login to DockerHub - # uses: docker/login-action@v2 - # with: - # username: ${{ secrets.DOCKER_HUB_USERNAME }} - # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Login to Quay - uses: docker/login-action@v2 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_ROBOT_TOKEN }} - - - name: Build and push user-defined tag to DockerHub - id: docker_build_user_defined_tag - uses: docker/build-push-action@v3 - with: - file: ${{ steps.latest_version.outputs.file }} - target: app - push: true - cache-from: type=local,src=/tmp/.buildx-cache-freyja - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-freyja-new # mode=max means export layers from all stage to cache - tags: staphb/freyja:${{ steps.latest_version.outputs.version }}-${{ steps.db_version.outputs.version }}-${{ steps.date.outputs.date }} - - - name: Build and push to Quay - id: build - uses: docker/build-push-action@v3 - with: - file: ${{ steps.latest_version.outputs.file }} - target: app - push: true - cache-from: type=local,src=/tmp/.buildx-cache-freyja - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-freyja-new # mode=max means export - tags: quay.io/staphb/freyja:${{ steps.latest_version.outputs.version }}-${{ steps.db_version.outputs.version }}-${{ steps.date.outputs.date }} - - - name: Move cache # apparently prevents the cache from growing in size forever - run: | - rm -rf /tmp/.buildx-cache-freyja - mv /tmp/.buildx-cache-freyja-new /tmp/.buildx-cache-freyja - - name: Image digest diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 2dc175901..85b52540d 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -56,7 +56,7 @@ ARG SEQFU_VER # Copy the necessary files from the builder COPY --from=builder /usr/local/bin /usr/local/bin -COPY --from=builder /root/seqfu2-${SEQFU_VER}/data/tests /root/seqfu2-${SEQFU_VER}/data/tests +# COPY --from=builder /root/seqfu2-${SEQFU_VER}/data/tests /root/seqfu2-${SEQFU_VER}/data/tests # Install minimal runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -68,4 +68,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /data # Verify installation -RUN seqfu --version && seqfu --help +RUN ls -l /usr/local/bin && \ +seqfu --version && seqfu --help + From 799681465b098e0cf57e460bb783c33efe81aa2c Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Mon, 30 Sep 2024 13:21:47 -0400 Subject: [PATCH 11/23] cleaning and fixing up seqfu dockerfile --- seqfu/1.20.3/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 85b52540d..6f1d5b9a1 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -37,13 +37,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /root # Install Nim and SeqFu -RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y && \ +RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y --ver 1.22.2 && \ wget https://github.com/telatin/seqfu2/archive/refs/tags/v${SEQFU_VER}.tar.gz && \ tar -xzf v${SEQFU_VER}.tar.gz && \ rm v${SEQFU_VER}.tar.gz && \ cd seqfu2-${SEQFU_VER} && \ make && \ - make test VERBOSE=1 || (echo "Tests failed, but continuing build"; exit 0) + /bin/bash # Start an interactive shell to manually inspect and debug tests # Copy the built binary to a location in the PATH RUN ls -l /root/seqfu2-${SEQFU_VER}/bin && \ From df9da92509924d050465e3b52d0c9ece2bd30ab3 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Mon, 30 Sep 2024 13:44:44 -0400 Subject: [PATCH 12/23] cleaning up seqfu dockerfile --- seqfu/1.20.3/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 6f1d5b9a1..76a7ad9b8 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -42,8 +42,7 @@ RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y --ver 1.22.2 tar -xzf v${SEQFU_VER}.tar.gz && \ rm v${SEQFU_VER}.tar.gz && \ cd seqfu2-${SEQFU_VER} && \ - make && \ - /bin/bash # Start an interactive shell to manually inspect and debug tests + make # Copy the built binary to a location in the PATH RUN ls -l /root/seqfu2-${SEQFU_VER}/bin && \ @@ -56,7 +55,6 @@ ARG SEQFU_VER # Copy the necessary files from the builder COPY --from=builder /usr/local/bin /usr/local/bin -# COPY --from=builder /root/seqfu2-${SEQFU_VER}/data/tests /root/seqfu2-${SEQFU_VER}/data/tests # Install minimal runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ From a85d15d33d8f7a1d562d2ac4d6f13fb975b3357e Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 2 Oct 2024 13:12:58 -0400 Subject: [PATCH 13/23] adding tests data for seqfu in dockerfile --- seqfu/1.20.3/Dockerfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 76a7ad9b8..68f2b92ec 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -59,6 +59,8 @@ COPY --from=builder /usr/local/bin /usr/local/bin # Install minimal runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ + git \ + ca-certificates \ wget && \ rm -rf /var/lib/apt/lists/* @@ -69,3 +71,26 @@ WORKDIR /data RUN ls -l /usr/local/bin && \ seqfu --version && seqfu --help +# Running RDP on test controls +FROM app AS test + +RUN mkdir tests && cd tests && \ + wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \ + wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_2.fastq.gz && \ + seqfu check SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz && \ + seqfu count -f SRR13957123_1.fastq.gz -r SRR13957123_2.fastq.gz + + +# RUN wget -q https://github.com/telatin/seqfu2/blob/main/data/tests/sample1_1.fq && \ +# wget -q https://github.com/telatin/seqfu2/blob/main/data/tests/sample1_2.fq && \ +# seqfu count -f sample1_1.fq -r sample1_2.fq + +# RUN wget -q https://github.com/telatin/seqfu2/blob/main/data/tests/sample1_R1.fq && \ +# wget -q https://github.com/telatin/seqfu2/blob/main/data/tests/sample1_R2.fq && \ +# seqfu count -f sample1_R1.fq -r sample1_R2.fq + + + + + + From 183227580de4f4bb2bc3898cddfa2d29a3b6fa2a Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 2 Oct 2024 13:15:43 -0400 Subject: [PATCH 14/23] updating test data in seqfu dockerfile --- seqfu/1.20.3/Dockerfile | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 68f2b92ec..8fcf217c0 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -71,26 +71,8 @@ WORKDIR /data RUN ls -l /usr/local/bin && \ seqfu --version && seqfu --help -# Running RDP on test controls -FROM app AS test - RUN mkdir tests && cd tests && \ wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \ wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_2.fastq.gz && \ seqfu check SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz && \ seqfu count -f SRR13957123_1.fastq.gz -r SRR13957123_2.fastq.gz - - -# RUN wget -q https://github.com/telatin/seqfu2/blob/main/data/tests/sample1_1.fq && \ -# wget -q https://github.com/telatin/seqfu2/blob/main/data/tests/sample1_2.fq && \ -# seqfu count -f sample1_1.fq -r sample1_2.fq - -# RUN wget -q https://github.com/telatin/seqfu2/blob/main/data/tests/sample1_R1.fq && \ -# wget -q https://github.com/telatin/seqfu2/blob/main/data/tests/sample1_R2.fq && \ -# seqfu count -f sample1_R1.fq -r sample1_R2.fq - - - - - - From 8d846457862d3ea7adbe4f2c66a2cd17cf8062c6 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 2 Oct 2024 13:22:10 -0400 Subject: [PATCH 15/23] updating seqfu tests in dockerfile --- seqfu/1.20.3/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 8fcf217c0..64338ca30 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -71,8 +71,12 @@ WORKDIR /data RUN ls -l /usr/local/bin && \ seqfu --version && seqfu --help +# Running seqfu on test staph-b test dataset +FROM app AS test + RUN mkdir tests && cd tests && \ wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \ wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_2.fastq.gz && \ - seqfu check SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz && \ - seqfu count -f SRR13957123_1.fastq.gz -r SRR13957123_2.fastq.gz + seqfu check SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz > seqfu_check_test.txt && \ + seqfu count -f SRR13957123_1.fastq.gz -r SRR13957123_2.fastq.gz > seqfu_count_test.txt + From 1581984f6471c0fd9dedfa7bbbb7c1e64b2fd2cb Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 2 Oct 2024 13:36:23 -0400 Subject: [PATCH 16/23] fixing seqfu dockerfile labels for staph-b template --- seqfu/1.20.3/Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 64338ca30..3cdf718a8 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -6,15 +6,15 @@ FROM ubuntu:focal AS builder ARG SEQFU_VER # Metadata -LABEL base.image="ubuntu:focal" \ - dockerfile.version="1" \ - software="SeqFu" \ - software.version="${SEQFU_VER}" \ - description="A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files." \ - website="https://github.com/telatin/seqfu2" \ - license.url="https://github.com/telatin/seqfu2?tab=GPL-3.0-1-ov-file#readme" \ - maintainer="Taylor K. Paisie" \ - maintainer.email="ltj8@cdc.gov" +LABEL base.image="ubuntu:focal" +LABEL dockerfile.version="1" +LABEL software="SeqFu" +LABEL software.version="${SEQFU_VER}" +LABEL description="A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files." +LABEL website="https://github.com/telatin/seqfu2" +LABEL license.url="https://github.com/telatin/seqfu2?tab=GPL-3.0-1-ov-file#readme" +LABEL maintainer="Taylor K. Paisie" +LABEL maintainer.email="ltj8@cdc.gov" # Set non-interactive frontend and update PATH ENV DEBIAN_FRONTEND=noninteractive \ From d982925aa369d22cdd7f8495cc75f9dfd14ddd1f Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 2 Oct 2024 13:48:59 -0400 Subject: [PATCH 17/23] making edits to seqfu test in dockerfile --- seqfu/1.20.3/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 3cdf718a8..c2a597be1 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -64,8 +64,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ wget && \ rm -rf /var/lib/apt/lists/* -# Set working directory -WORKDIR /data + + # Verify installation RUN ls -l /usr/local/bin && \ @@ -74,9 +74,11 @@ seqfu --version && seqfu --help # Running seqfu on test staph-b test dataset FROM app AS test -RUN mkdir tests && cd tests && \ - wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \ +WORKDIR /data/test + +RUN wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \ wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_2.fastq.gz && \ seqfu check SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz > seqfu_check_test.txt && \ seqfu count -f SRR13957123_1.fastq.gz -r SRR13957123_2.fastq.gz > seqfu_count_test.txt +WORKDIR /data From a63df03e33ba70b31d52ebbd8861ba33b32c2f9a Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 2 Oct 2024 13:51:28 -0400 Subject: [PATCH 18/23] updating seqfu docker container readme --- seqfu/1.20.3/README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/seqfu/1.20.3/README.md b/seqfu/1.20.3/README.md index 98d5794f9..e8e7fbbb5 100644 --- a/seqfu/1.20.3/README.md +++ b/seqfu/1.20.3/README.md @@ -37,10 +37,16 @@ Full documentation: https://telatin.github.io/seqfu2/ # Testing SeqFU analysis ``` +wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz + +wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_2.fastq.gz + seqfu check \ - --deep \ - --verbose \ - /root/seqfu2-1.20.3/data/tests/sample1_R1.fq \ - /root/seqfu2-1.20.3/data/tests/sample1_R2.fq + SRR13957123_1.fastq.gz \ + SRR13957123_2.fastq.gz + +seqfu count \ + -f SRR13957123_1.fastq.gz \ + -r SRR13957123_2.fastq.gz ``` From 43978a71e924ec3c2c9c3def34b633fc2e7950e6 Mon Sep 17 00:00:00 2001 From: taylorpaisie Date: Wed, 2 Oct 2024 13:58:13 -0400 Subject: [PATCH 19/23] cleaning up seqfu dockerfile --- seqfu/1.20.3/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index c2a597be1..5fd1080a6 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -64,8 +64,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ wget && \ rm -rf /var/lib/apt/lists/* - - # Verify installation RUN ls -l /usr/local/bin && \ From 6f0ef56cf374d1c297245e4cbf0bdbbc589f817e Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 4 Oct 2024 10:24:21 -0600 Subject: [PATCH 20/23] Moving labels to app stage from builder --- seqfu/1.20.3/Dockerfile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 5fd1080a6..c5cc51645 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -5,17 +5,6 @@ ARG SEQFU_VER="1.20.3" FROM ubuntu:focal AS builder ARG SEQFU_VER -# Metadata -LABEL base.image="ubuntu:focal" -LABEL dockerfile.version="1" -LABEL software="SeqFu" -LABEL software.version="${SEQFU_VER}" -LABEL description="A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files." -LABEL website="https://github.com/telatin/seqfu2" -LABEL license.url="https://github.com/telatin/seqfu2?tab=GPL-3.0-1-ov-file#readme" -LABEL maintainer="Taylor K. Paisie" -LABEL maintainer.email="ltj8@cdc.gov" - # Set non-interactive frontend and update PATH ENV DEBIAN_FRONTEND=noninteractive \ PATH="/root/.nimble/bin:${PATH}" @@ -53,6 +42,18 @@ RUN ls -l /root/seqfu2-${SEQFU_VER}/bin && \ FROM ubuntu:focal AS app ARG SEQFU_VER +# Metadata +LABEL base.image="ubuntu:focal" +LABEL dockerfile.version="1" +LABEL software="SeqFu" +LABEL software.version="${SEQFU_VER}" +LABEL description="A general-purpose program to manipulate and parse information from FASTA/FASTQ files, supporting gzipped input files." +LABEL website="https://github.com/telatin/seqfu2" +LABEL license.url="https://github.com/telatin/seqfu2?tab=GPL-3.0-1-ov-file#readme" +LABEL maintainer="Taylor K. Paisie" +LABEL maintainer.email="ltj8@cdc.gov" + + # Copy the necessary files from the builder COPY --from=builder /usr/local/bin /usr/local/bin From ecd7ea992cf78afd9dee11782140804de7c0cbed Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 4 Oct 2024 11:12:36 -0600 Subject: [PATCH 21/23] Add CMD layer and more tests --- seqfu/1.20.3/Dockerfile | 43 +++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index c5cc51645..2733bbbf0 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -1,5 +1,6 @@ # Set global variables ARG SEQFU_VER="1.20.3" +ARG NIM_VER="1.22.2" # Stage 1: Build Dockerfile FROM ubuntu:focal AS builder @@ -26,18 +27,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /root # Install Nim and SeqFu -RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y --ver 1.22.2 && \ - wget https://github.com/telatin/seqfu2/archive/refs/tags/v${SEQFU_VER}.tar.gz && \ +RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y --ver ${NIM_VER} + +# Install SeqFu +RUN wget https://github.com/telatin/seqfu2/archive/refs/tags/v${SEQFU_VER}.tar.gz && \ tar -xzf v${SEQFU_VER}.tar.gz && \ rm v${SEQFU_VER}.tar.gz && \ cd seqfu2-${SEQFU_VER} && \ make -# Copy the built binary to a location in the PATH -RUN ls -l /root/seqfu2-${SEQFU_VER}/bin && \ - cp -R /root/seqfu2-${SEQFU_VER}/bin/* /usr/local/bin/ && \ - chmod +x /usr/local/bin/seqfu - # Stage 2: Create the final image FROM ubuntu:focal AS app ARG SEQFU_VER @@ -53,31 +51,38 @@ LABEL license.url="https://github.com/telatin/seqfu2?tab=GPL-3.0-1-ov-file#readm LABEL maintainer="Taylor K. Paisie" LABEL maintainer.email="ltj8@cdc.gov" - # Copy the necessary files from the builder -COPY --from=builder /usr/local/bin /usr/local/bin +COPY --from=builder /root/seqfu2-${SEQFU_VER}/bin /usr/local/bin # Install minimal runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ - curl \ - git \ ca-certificates \ wget && \ - rm -rf /var/lib/apt/lists/* + apt-get autoclean && rm -rf /var/lib/apt/lists/* +ENV LC_ALL=C -# Verify installation -RUN ls -l /usr/local/bin && \ -seqfu --version && seqfu --help +CMD seqfu --help -# Running seqfu on test staph-b test dataset +# Stage 3: testing the installation FROM app AS test -WORKDIR /data/test +ARG SEQFU_VER + +# Verify installation +RUN seqfu --version && seqfu --help + +WORKDIR /test +# using dev supplied tests +COPY --from=builder /root/seqfu2-${SEQFU_VER} /test + +# skipping test-check.sh because it through error on dev-supplied fastq files +RUN mv test/test-check.sh test/test-check.sh_skip && \ + bash test/mini.sh + +# testing on user-supplied files RUN wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_1.fastq.gz && \ wget -q https://github.com/StaPH-B/docker-builds/raw/master/tests/SARS-CoV-2/SRR13957123_2.fastq.gz && \ seqfu check SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz > seqfu_check_test.txt && \ seqfu count -f SRR13957123_1.fastq.gz -r SRR13957123_2.fastq.gz > seqfu_count_test.txt - -WORKDIR /data From 62e2ec0b0af64287feb94d5cb6a3ac708269dd3b Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 4 Oct 2024 11:21:46 -0600 Subject: [PATCH 22/23] add curl to apt-get layer --- seqfu/1.20.3/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 2733bbbf0..56e481e10 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -55,7 +55,9 @@ LABEL maintainer.email="ltj8@cdc.gov" COPY --from=builder /root/seqfu2-${SEQFU_VER}/bin /usr/local/bin # Install minimal runtime dependencies +# curl is used in checking for the versions of dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ + curl \ ca-certificates \ wget && \ apt-get autoclean && rm -rf /var/lib/apt/lists/* From cc9f01ef64e882da5e274553eadac07c8fc6073c Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 4 Oct 2024 11:23:13 -0600 Subject: [PATCH 23/23] Update Dockerfile --- seqfu/1.20.3/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seqfu/1.20.3/Dockerfile b/seqfu/1.20.3/Dockerfile index 56e481e10..06a56b5d7 100644 --- a/seqfu/1.20.3/Dockerfile +++ b/seqfu/1.20.3/Dockerfile @@ -79,7 +79,7 @@ WORKDIR /test # using dev supplied tests COPY --from=builder /root/seqfu2-${SEQFU_VER} /test -# skipping test-check.sh because it through error on dev-supplied fastq files +# skipping test-check.sh because it throws an error on dev-supplied fastq files RUN mv test/test-check.sh test/test-check.sh_skip && \ bash test/mini.sh