diff --git a/.github/workflows/update_freyja.yml b/.github/workflows/update_freyja.yml index 367599a20..32303fdbf 100644 --- a/.github/workflows/update_freyja.yml +++ b/.github/workflows/update_freyja.yml @@ -86,4 +86,4 @@ jobs: quay.io/staphb/freyja:latest - name: Image digest - run: echo ${{ steps.docker_build_user_defined_tag.outputs.digest }} + run: echo ${{ steps.docker_build_user_defined_tag.outputs.digest }} \ No newline at end of file diff --git a/.github/workflows/update_pango_aliasor.yml b/.github/workflows/update_pango_aliasor.yml deleted file mode 100644 index cc3e46ed2..000000000 --- a/.github/workflows/update_pango_aliasor.yml +++ /dev/null @@ -1,82 +0,0 @@ -##### ------------------------------------------------------------------------------------------------ ##### -##### This caller workflow tests, builds, and pushes the image to Docker Hub and Quay using the most ##### -##### recent version of pango_aliasor and downloads the current pangolin lineages. ##### -##### It takes no manual input. ##### -##### ------------------------------------------------------------------------------------------------ ##### - -name: Update pango aliasor - -on: - workflow_dispatch: - schedule: - - cron: '30 7 * * 1' - -run-name: Updating pango aliasor - -jobs: - update: - runs-on: ubuntu-latest - steps: - - - name: pull repo - uses: actions/checkout@v4 - - - name: set pango_aliasor version - id: latest_version - run: | - version=0.3.0 - echo "version=$version" >> $GITHUB_OUTPUT - - file=pango_aliasor/0.3.0/Dockerfile - ls $file - echo "file=$file" >> $GITHUB_OUTPUT - - - name: set up docker buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - - name: build to test - id: docker_build_to_test - uses: docker/build-push-action@v5 - with: - context: pango_aliasor/${{ steps.latest_version.outputs.version }} - target: test - load: true - push: false - tags: pango_aliasor:update - - - 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@v3 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Login to Quay - uses: docker/login-action@v3 - 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@v5 - with: - file: ${{ steps.latest_version.outputs.file }} - target: app - push: true - tags: | - staphb/pango_aliasor:${{ steps.latest_version.outputs.version }}-${{ steps.date.outputs.date }} - staphb/pango_aliasor:latest - quay.io/staphb/pango_aliasor:${{ steps.latest_version.outputs.version }}-${{ steps.date.outputs.date }} - quay.io/staphb/pango_aliasor:latest - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Program_Licenses.md b/Program_Licenses.md index d57e19474..6c51de32d 100644 --- a/Program_Licenses.md +++ b/Program_Licenses.md @@ -73,6 +73,7 @@ The licenses of the open-source software that is contained in these Docker image | HeatCluster | GPL-3.0 | https://github.com/DrB-S/heatcluster/blob/main/LICENSE | | Hmmer | BSD-3 | http://eddylab.org/software/hmmer/Userguide.pdf | | homopolish | GNU GPLv3 | https://github.com/ythuang0522/homopolish/blob/master/LICENSE | +| hostile | MIT | https://github.com/bede/hostile?tab=MIT-1-ov-file#readme | | htslib | MIT | https://github.com/samtools/htslib/blob/develop/LICENSE | | Integron Finder | GNU GPLv3 | https://github.com/gem-pasteur/Integron_Finder/blob/master/COPYING | | iqtree | GNU GPLv2 | https://github.com/Cibiv/IQ-TREE/blob/master/LICENSE | diff --git a/README.md b/README.md index 201a52398..d6b3aa002 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,7 @@ To learn more about the docker pull rate limits and the open source software pro | [heatcluster](https://hub.docker.com/r/staphb/heatcluster)
[![docker pulls](https://badgen.net/docker/pulls/staphb/heatcluster)](https://hub.docker.com/r/staphb/heatcluster) | | https://github.com/DrB-S/heatcluster/tree/main | | [hmmer](https://hub.docker.com/r/staphb/hmmer)
[![docker pulls](https://badgen.net/docker/pulls/staphb/hmmer)](https://hub.docker.com/r/staphb/hmmer) | | http://hmmer.org/ | | [homopolish](https://hub.docker.com/r/staphb/homopolish)
[![docker pulls](https://badgen.net/docker/pulls/staphb/homopolish)](https://hub.docker.com/r/staphb/homopolish) | | https://github.com/ythuang0522/homopolish/ | +| [hostile](https://github.com/bede/hostile)
[![docker pulls](https://badgen.net/docker/pulls/staphb/hostile)](https://hub.docker.com/r/staphb/hostile | | https://github.com/bede/hostile | | [htslib](https://hub.docker.com/r/staphb/htslib)
[![docker pulls](https://badgen.net/docker/pulls/staphb/htslib)](https://hub.docker.com/r/staphb/htslib) | | https://www.htslib.org/ | | [Integron Finder](https://hub.docker.com/r/staphb/integron_finder/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/integron_finder)](https://hub.docker.com/r/staphb/integron_finder) | | https://github.com/gem-pasteur/Integron_Finder | | [iqtree](https://hub.docker.com/r/staphb/iqtree/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/iqtree)](https://hub.docker.com/r/staphb/iqtree) | | http://www.iqtree.org/ | diff --git a/hostile/1.1.0/Dockerfile b/hostile/1.1.0/Dockerfile new file mode 100644 index 000000000..9b589b106 --- /dev/null +++ b/hostile/1.1.0/Dockerfile @@ -0,0 +1,74 @@ +# Set global variables +ARG HOSTILE_VER="1.1.0" +ARG BOWTIE2_VER="2.5.1" + +# Stage 1: Build Dockerfile +FROM ubuntu:focal AS builder +ARG HOSTILE_VER +ARG BOWTIE2_VER + +RUN apt-get update && apt-get install -y --no-install-recommends \ + software-properties-common && \ + add-apt-repository ppa:deadsnakes/ppa && \ + apt-get update && apt-get install -y --no-install-recommends \ + python3.10 python3.10-distutils build-essential \ + wget unzip samtools minimap2 bedtools gawk ca-certificates && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install pip for Python 3.10 +RUN wget https://bootstrap.pypa.io/get-pip.py && python3.10 get-pip.py && \ + rm get-pip.py && pip install --no-cache-dir setuptools pytest && \ + ln -sf /usr/bin/python3.10 /usr/bin/python3 && \ + ln -sf /usr/local/bin/pip /usr/bin/pip + +# Install bowtie2 and ensure all executables are accessible +RUN wget https://github.com/BenLangmead/bowtie2/releases/download/v${BOWTIE2_VER}/bowtie2-${BOWTIE2_VER}-linux-x86_64.zip && \ + unzip bowtie2-${BOWTIE2_VER}-linux-x86_64.zip && \ + mv bowtie2-${BOWTIE2_VER}-linux-x86_64 /usr/local/bowtie2 && \ + ln -s /usr/local/bowtie2/bowtie2* /usr/bin/ && \ + rm -f bowtie2-${BOWTIE2_VER}-linux-x86_64.zip + +# Install hostile +RUN wget https://github.com/bede/hostile/archive/refs/tags/${HOSTILE_VER}.tar.gz && \ + tar -xzvf ${HOSTILE_VER}.tar.gz && cd hostile-${HOSTILE_VER} && \ + pip install --no-cache-dir . && \ + pytest && \ + cd .. && rm -rf ${HOSTILE_VER}.tar.gz + + +# Stage 2: Final image +FROM ubuntu:focal AS app +ARG HOSTILE_VER + +LABEL base.image="ubuntu:focal" +LABEL dockerfile.version="1" +LABEL software="hostile" +LABEL software.version=${HOSTILE_VER} +LABEL description="Precise host read removal." +LABEL website="https://github.com/bede/hostile" +LABEL license.url="https://github.com/bede/hostile?tab=MIT-1-ov-file#readme" +LABEL maintainer="Taylor K. Paisie" +LABEL maintainer.email="ltj8@cdc.gov" + +COPY --from=builder /usr/ /usr/ +COPY --from=builder /hostile-${HOSTILE_VER}/tests/data/sars-cov-2/ /data/test/sars-cov-2/ + +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates && update-ca-certificates && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +CMD hostile --help +WORKDIR /data + +# Optional stage: Test data +FROM app AS test + +WORKDIR /data/test + +RUN wget https://github.com/bacterial-genomics/test-datasets/raw/assembly/test_data/test_miniburk_R1.fastq.gz \ + --no-check-certificate && \ + wget https://github.com/bacterial-genomics/test-datasets/raw/assembly/test_data/test_miniburk_R2.fastq.gz \ + --no-check-certificate && \ + hostile clean --index /data/test/sars-cov-2/sars-cov-2 --fastq1 test_miniburk_R1.fastq.gz --fastq2 test_miniburk_R2.fastq.gz + +WORKDIR /data diff --git a/hostile/1.1.0/README.md b/hostile/1.1.0/README.md new file mode 100644 index 000000000..008602b23 --- /dev/null +++ b/hostile/1.1.0/README.md @@ -0,0 +1,40 @@ +# hostile + +Main tool: [hostile](https://github.com/bede/hostile) + +Code repository: https://github.com/bede/hostile + +Basic information on how to use this tool: +- executable: | +``` +usage: hostile [-h] [--version] {clean,mask,fetch} ... + +positional arguments: + {clean,mask,fetch} + clean Remove reads aligning to an index from fastq[.gz] input files + mask Mask reference genome against target genome(s) + fetch Download and cache indexes from object storage for use with hostile clean + +options: + -h, --help show this help message and exit + --version show program's version number and exit +``` + +- help: `hostile --help` +- version: `hostle --version` +- description: | +> Hostile accurately removes host sequences from short and long read (meta)genomes, consuming single-read or paired fastq input. + + +Full documentation: https://github.com/bede/hostile + + +# Testing hostile analysis +``` +# Downloading test dataset +wget https://github.com/bacterial-genomics/test-datasets/raw/assembly/test_data/test_miniburk_R1.fastq.gz --no-check-certificate +wget https://github.com/bacterial-genomics/test-datasets/raw/assembly/test_data/test_miniburk_R2.fastq.gz --no-check-certificate + +# Running hostile clean on test dataset +hostile clean --index /data/test/sars-cov-2/sars-cov-2 --fastq1 test_miniburk_R1.fastq.gz --fastq2 test_miniburk_R2.fastq.gz +``` \ No newline at end of file