From 12b06b39778a5cd947eba47da39c026f877ab6e2 Mon Sep 17 00:00:00 2001 From: Erin Young Date: Wed, 25 Sep 2024 14:52:16 +0000 Subject: [PATCH 1/2] adding flye version 2.9.5 --- README.md | 2 +- flye/2.9.5/Dockerfile | 69 +++++++++++++++++++++++++++++++++++++++++++ flye/2.9.5/README.md | 14 +++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 flye/2.9.5/Dockerfile create mode 100644 flye/2.9.5/README.md diff --git a/README.md b/README.md index bda448883..356e49ab3 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ To learn more about the docker pull rate limits and the open source software pro | [Freebayes](https://hub.docker.com/r/staphb/freebayes)
[![docker pulls](https://badgen.net/docker/pulls/staphb/freebayes)](https://hub.docker.com/r/staphb/freebayes) | | https://github.com/freebayes/freebayes | | [Filtlong](https://hub.docker.com/r/staphb/filtlong)
[![docker pulls](https://badgen.net/docker/pulls/staphb/filtlong)](https://hub.docker.com/r/staphb/filtlong) | | https://github.com/rrwick/filtlong | | [FLASH](https://hub.docker.com/r/staphb/flash)
[![docker pulls](https://badgen.net/docker/pulls/staphb/flash)](https://hub.docker.com/r/staphb/flash) | | http://ccb.jhu.edu/software/FLASH | -| [Flye](https://hub.docker.com/r/staphb/flye)
[![docker pulls](https://badgen.net/docker/pulls/staphb/flye)](https://hub.docker.com/r/staphb/flye) | | https://github.com/fenderglass/Flye | +| [Flye](https://hub.docker.com/r/staphb/flye)
[![docker pulls](https://badgen.net/docker/pulls/staphb/flye)](https://hub.docker.com/r/staphb/flye) | | https://github.com/fenderglass/Flye | | [Freyja](https://hub.docker.com/r/staphb/freyja)
[![docker pulls](https://badgen.net/docker/pulls/staphb/freyja)](https://hub.docker.com/r/staphb/freyja) | | https://github.com/andersen-lab/Freyja | | [GAMBIT](https://hub.docker.com/r/staphb/gambit)
[![docker pulls](https://badgen.net/docker/pulls/staphb/gambit)](https://hub.docker.com/r/staphb/gambit) | | https://github.com/jlumpe/gambit | | [GAMMA](https://hub.docker.com/r/staphb/gamma)
[![docker pulls](https://badgen.net/docker/pulls/staphb/gamma)](https://hub.docker.com/r/staphb/gamma) | | https://github.com/rastanton/GAMMA/ | diff --git a/flye/2.9.5/Dockerfile b/flye/2.9.5/Dockerfile new file mode 100644 index 000000000..b2554e5fe --- /dev/null +++ b/flye/2.9.5/Dockerfile @@ -0,0 +1,69 @@ +# for easy upgrade later +ARG FLYE_VER="2.9.5" + +FROM ubuntu:jammy as app + +# have to re-instantiate variable within app stage +ARG FLYE_VER + +LABEL base.image="ubuntu:jammy" +LABEL dockerfile.version="1" +LABEL software="Flye" +LABEL software.version="${FLYE_VER}" +LABEL description="Fast and accurate de novo assembler for single molecule sequencing reads" +LABEL website="https://github.com/fenderglass/Flye" +LABEL license="https://github.com/fenderglass/Flye/blob/flye/LICENSE" +LABEL maintainer="Erin Young" +LABEL maintainer.email="eriny@utah.gov" +LABEL maintainer2="Curtis Kapsak" +LABEL maintainer2.email="kapsakcj@gmail.com" + +RUN apt-get update && apt-get install --no-install-recommends -y \ + make \ + gcc \ + g++ \ + python3 \ + python3-pip \ + python3-setuptools \ + zlib1g-dev \ + wget \ + ca-certificates \ + procps && \ + rm -rf /var/lib/apt/lists/* && apt-get autoclean + +# install flye +RUN wget -q https://github.com/fenderglass/Flye/archive/${FLYE_VER}.tar.gz && \ + tar -xf ${FLYE_VER}.tar.gz && \ + rm -v ${FLYE_VER}.tar.gz && \ + cd Flye-${FLYE_VER} && \ + python3 setup.py build && \ + python3 setup.py install && \ + mkdir /data + +# set final working directory +WORKDIR /data + +# for singularity compatibility +ENV LC_ALL=C + +#### begin the test stage #### +FROM app as test + +# have to re-instantiate variable within app stage +ARG FLYE_VER + +# run flye toy dataset test +RUN python3 /Flye-${FLYE_VER}/flye/tests/test_toy.py + +# download test data (ONT and ILMN FASTQs) and run through flye +RUN echo "downloading ONT test data from bactopia/bactopia-tests on GitHub..." && \ + wget -q https://raw.githubusercontent.com/bactopia/bactopia-tests/main/data/species/portiera/nanopore/ERR3772599.fastq.gz && \ + flye --nano-raw ERR3772599.fastq.gz -o flye-test-portiera -t 2 && \ + flye --version + +# the following takes too long, but this would be the test I would recommend if testing this locally. +# from https://github.com/fenderglass/Flye/blob/flye/docs/USAGE.md +# RUN wget https://zenodo.org/record/1172816/files/E.coli_PacBio_40x.fasta && \ +# flye --pacbio-raw E.coli_PacBio_40x.fasta --out-dir out_pacbio --threads 4 && \ +# wget https://zenodo.org/record/1172816/files/Loman_E.coli_MAP006-1_2D_50x.fasta && \ +# flye --nano-raw Loman_E.coli_MAP006-1_2D_50x.fasta --out-dir out_nano --threads 4 diff --git a/flye/2.9.5/README.md b/flye/2.9.5/README.md new file mode 100644 index 000000000..daefd49eb --- /dev/null +++ b/flye/2.9.5/README.md @@ -0,0 +1,14 @@ +# Flye container + +Main tool : [flye](https://github.com/fenderglass/Flye) + +Full documentation: [https://github.com/fenderglass/Flye/blob/flye/docs/USAGE.md](https://github.com/fenderglass/Flye/blob/flye/docs/USAGE.md) + +> Flye is a de novo assembler for single-molecule sequencing reads, such as those produced by PacBio and Oxford Nanopore Technologies. + +## Example Usage + +```bash +# sample.fastq.gz is compressed with bgzip +flye --nano-raw sample.fastq.gz --threads 12 --out-dir flye/sample +``` From eb9137c69bd88a5c298f1484b0679cbee1a35cd7 Mon Sep 17 00:00:00 2001 From: Erin Young Date: Tue, 29 Oct 2024 18:57:07 +0000 Subject: [PATCH 2/2] added builder stage --- flye/2.9.5/Dockerfile | 73 ++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/flye/2.9.5/Dockerfile b/flye/2.9.5/Dockerfile index b2554e5fe..cdba1cd6b 100644 --- a/flye/2.9.5/Dockerfile +++ b/flye/2.9.5/Dockerfile @@ -1,9 +1,29 @@ -# for easy upgrade later ARG FLYE_VER="2.9.5" +FROM ubuntu:jammy as builder + +ARG FLYE_VER + +RUN apt-get update && apt-get install --no-install-recommends -y \ + make \ + gcc \ + g++ \ + python3 \ + python3-pip \ + python3-setuptools \ + zlib1g-dev \ + wget \ + ca-certificates \ + procps && \ + rm -rf /var/lib/apt/lists/* && apt-get autoclean + +RUN wget -q https://github.com/fenderglass/Flye/archive/${FLYE_VER}.tar.gz && \ + tar -xf ${FLYE_VER}.tar.gz && \ + cd Flye-${FLYE_VER} && \ + python3 setup.py install + FROM ubuntu:jammy as app -# have to re-instantiate variable within app stage ARG FLYE_VER LABEL base.image="ubuntu:jammy" @@ -18,52 +38,35 @@ LABEL maintainer.email="eriny@utah.gov" LABEL maintainer2="Curtis Kapsak" LABEL maintainer2.email="kapsakcj@gmail.com" +# Minimal requirements to run Flye in final image +# python3-distutils is required for test_toy.py , but might not be needed at runtime RUN apt-get update && apt-get install --no-install-recommends -y \ - make \ - gcc \ - g++ \ python3 \ - python3-pip \ - python3-setuptools \ - zlib1g-dev \ - wget \ - ca-certificates \ + python3-distutils \ procps && \ rm -rf /var/lib/apt/lists/* && apt-get autoclean -# install flye -RUN wget -q https://github.com/fenderglass/Flye/archive/${FLYE_VER}.tar.gz && \ - tar -xf ${FLYE_VER}.tar.gz && \ - rm -v ${FLYE_VER}.tar.gz && \ - cd Flye-${FLYE_VER} && \ - python3 setup.py build && \ - python3 setup.py install && \ - mkdir /data +COPY --from=builder /usr/local/lib/python3.10/dist-packages /usr/local/lib/python3.10/dist-packages +COPY --from=builder /usr/local/bin /usr/local/bin -# set final working directory WORKDIR /data +CMD ["flye", "--help"] -# for singularity compatibility +# For Singularity compatibility ENV LC_ALL=C -#### begin the test stage #### FROM app as test -# have to re-instantiate variable within app stage -ARG FLYE_VER +# Run Flye version and help for quick validation +RUN flye --version && flye --help + +# Copy Flye source files from builder for running tests +COPY --from=builder /Flye-${FLYE_VER} /Flye-${FLYE_VER} -# run flye toy dataset test +# Run Flye's built-in toy dataset test RUN python3 /Flye-${FLYE_VER}/flye/tests/test_toy.py -# download test data (ONT and ILMN FASTQs) and run through flye -RUN echo "downloading ONT test data from bactopia/bactopia-tests on GitHub..." && \ +# Download test data and perform an assembly +RUN apt-get update && apt-get install --no-install-recommends -y wget ca-certificates && \ wget -q https://raw.githubusercontent.com/bactopia/bactopia-tests/main/data/species/portiera/nanopore/ERR3772599.fastq.gz && \ - flye --nano-raw ERR3772599.fastq.gz -o flye-test-portiera -t 2 && \ - flye --version - -# the following takes too long, but this would be the test I would recommend if testing this locally. -# from https://github.com/fenderglass/Flye/blob/flye/docs/USAGE.md -# RUN wget https://zenodo.org/record/1172816/files/E.coli_PacBio_40x.fasta && \ -# flye --pacbio-raw E.coli_PacBio_40x.fasta --out-dir out_pacbio --threads 4 && \ -# wget https://zenodo.org/record/1172816/files/Loman_E.coli_MAP006-1_2D_50x.fasta && \ -# flye --nano-raw Loman_E.coli_MAP006-1_2D_50x.fasta --out-dir out_nano --threads 4 + flye --nano-raw ERR3772599.fastq.gz -o flye-test-portiera -t 2