Skip to content

Commit

Permalink
Merge pull request #1111 from taylorpaisie/tkp-hostile
Browse files Browse the repository at this point in the history
Adding hostile v1.1.0
  • Loading branch information
erinyoung authored Dec 9, 2024
2 parents 8d47afe + 940a168 commit c165457
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_freyja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
82 changes: 0 additions & 82 deletions .github/workflows/update_pango_aliasor.yml

This file was deleted.

1 change: 1 addition & 0 deletions Program_Licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/heatcluster)](https://hub.docker.com/r/staphb/heatcluster) | <ul><li>[1.0.2c](./heatcluster/1.0.2c/)</li></ul> | https://github.com/DrB-S/heatcluster/tree/main |
| [hmmer](https://hub.docker.com/r/staphb/hmmer) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/hmmer)](https://hub.docker.com/r/staphb/hmmer) | <ul><li>[3.3](hmmer/3.3/)</li><li>[3.3.2](hmmer/3.3.2/)</li><li>[3.4](./hmmer/3.4/)</li></ul> | http://hmmer.org/ |
| [homopolish](https://hub.docker.com/r/staphb/homopolish) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/homopolish)](https://hub.docker.com/r/staphb/homopolish) | <ul><li>0.4.1</li></ul> | https://github.com/ythuang0522/homopolish/ |
| [hostile](https://github.com/bede/hostile) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/hostile)](https://hub.docker.com/r/staphb/hostile | <ul><li>[1.1.0](./hostile/1.1.0)</li></ul> | https://github.com/bede/hostile |
| [htslib](https://hub.docker.com/r/staphb/htslib) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/htslib)](https://hub.docker.com/r/staphb/htslib) | <ul><li>[1.14](./htslib/1.14)</li><li>[1.15](./htslib/1.15)</li><li>[1.16](./htslib/1.16)</li><li>[1.17](./htslib/1.17)</li><li>[1.18](./htslib/1.18/)</li><li>[1.19](./htslib/1.19/)</li><li>[1.20](./htslib/1.20/)</li><li>[1.20.c](./htslib/1.20.c/)</li><li>[1.21](./htslib/1.21/)</li></ul> | https://www.htslib.org/ |
| [Integron Finder](https://hub.docker.com/r/staphb/integron_finder/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/integron_finder)](https://hub.docker.com/r/staphb/integron_finder) | <ul><li>[2.0.5](./integron_finder/2.0.5/)</li></ul> | https://github.com/gem-pasteur/Integron_Finder |
| [iqtree](https://hub.docker.com/r/staphb/iqtree/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/iqtree)](https://hub.docker.com/r/staphb/iqtree) | <ul><li>1.6.7</li></ul> | http://www.iqtree.org/ |
Expand Down
74 changes: 74 additions & 0 deletions hostile/1.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]"

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
40 changes: 40 additions & 0 deletions hostile/1.1.0/README.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit c165457

Please sign in to comment.