Skip to content

Commit

Permalink
Added latest version of dragonflye and updated main README (#683)
Browse files Browse the repository at this point in the history
* Added version of dragonflye and updated README

* removed git, adjusted labels, added CMD

---------

Co-authored-by: Curtis Kapsak <[email protected]>
Co-authored-by: Young <[email protected]>
  • Loading branch information
3 people committed Aug 4, 2023
1 parent 9b7a705 commit 1a5f9eb
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [cutshaw-report-env](https://hub.docker.com/r/staphb/cutshaw-report-env) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/cutshaw-report-env)](https://hub.docker.com/r/staphb/cutshaw-report-env) | <ul><li>1.0.0</li></ul> | https://github.com/VADGS/CutShaw |
| [datasets-sars-cov-2](https://github.com/CDCgov/datasets-sars-cov-2) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/datasets-sars-cov-2)](https://hub.docker.com/r/staphb/datasets-sars-cov-2) | <ul><li>0.6.2</li><li>0.6.3</li><li>0.7.2</li></ul> | https://github.com/CDCgov/datasets-sars-cov-2 |
| [dnaapler](https://hub.docker.com/r/staphb/dnaapler) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dnaapler)](https://hub.docker.com/r/staphb/dnaapler) | <ul><li>[0.1.0](dnaapler/0.1.0/)</li></ul> | https://github.com/gbouras13/dnaapler |
| [dragonflye](https://hub.docker.com/r/staphb/dragonflye) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dragonflye)](https://hub.docker.com/r/staphb/dragonflye) | <ul><li>1.0.14</li></ul> | https://github.com/rpetit3/dragonflye |
| [dragonflye](https://hub.docker.com/r/staphb/dragonflye) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dragonflye)](https://hub.docker.com/r/staphb/dragonflye) | <ul><li>1.0.14</li><li>[1.1.1](dragonflye/1.1.1/)</li></ul> | https://github.com/rpetit3/dragonflye |
| [DSK](https://hub.docker.com/r/staphb/dsk) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dsk)](https://hub.docker.com/r/staphb/dsk) | <ul><li>0.0.100</li></ul> | https://gatb.inria.fr/software/dsk/ |
| [emboss](https://hub.docker.com/r/staphb/emboss) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/emboss)](https://hub.docker.com/r/staphb/emboss) | <ul><li>6.6.0 (no version)</li></ul> | http://emboss.sourceforge.net |
| [emmtyper](https://hub.docker.com/r/staphb/emmtyper) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/emmtyper)](https://hub.docker.com/r/staphb/emmtyper) | <ul><li>0.2.0</li></ul> | https://github.com/MDU-PHL/emmtyper |
Expand Down
97 changes: 97 additions & 0 deletions dragonflye/1.1.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
FROM mambaorg/micromamba:1.4.4 as app

# build and run as root users since micromamba image has 'mambauser' set as the $USER
USER root
# set workdir to default for building; set to /data at the end of app layer
WORKDIR /

# ARG variables only persist during build time
ARG DRAGONFLYE_VER="1.1.1"

# metadata labels
LABEL base.image="mambaorg/micromamba:1.4.4"
LABEL dockerfile.version="1"
LABEL software="dragonflye"
LABEL software.version=${DRAGONFLYE_VER}
LABEL description="Conda environment for dragonflye. Dragonflye: Assemble bacterial isolate genomes from Nanopore reads."
LABEL website="https://github.com/rpetit3/dragonflye"
LABEL license="GNU General Public License v3.0"
LABEL license.url="https://github.com/rpetit3/dragonflye/blob/main/LICENSE"
LABEL maintainer="Curtis Kapsak"
LABEL maintainer.email="[email protected]"
LABEL maintainer1="Erin Young"
LABEL maintainer1.email="[email protected]"

# install dependencies; cleanup apt garbage
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
procps \
bsdmainutils && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

# create the conda environment; install dragonflye and dependencies based on bioconda package; cleanup conda garbage
RUN micromamba install -n base -c conda-forge -c bioconda -c defaults -y dragonflye=${DRAGONFLYE_VER} && \
micromamba clean -a -y && \
mkdir /data

WORKDIR /data

# hardcode base conda environment into the PATH variable; LC_ALL for singularity compatibility
ENV PATH="$PATH:/opt/conda/bin/" \
LC_ALL=C.UTF-8

CMD dragonflye --help

# new base for testing
FROM app as test

# so that mamba/conda env is active when running below commands
ENV ENV_NAME="base"
ARG MAMBA_DOCKERFILE_ACTIVATE=1

# show help options and check dependencies
RUN dragonflye --help && \
dragonflye --check

# so that testing outputs are inside /test
WORKDIR /test

# download test data (ONT and ILMN FASTQs)
RUN echo "downloading ILMN and ONT test data from bactopia/bactopia-tests on GitHub..." && \
wget https://raw.githubusercontent.com/bactopia/bactopia-tests/main/data/species/portiera/nanopore/ERR3772599.fastq.gz && \
wget https://raw.githubusercontent.com/bactopia/bactopia-tests/main/data/species/portiera/illumina/SRR2838702_R1.fastq.gz && \
wget https://raw.githubusercontent.com/bactopia/bactopia-tests/main/data/species/portiera/illumina/SRR2838702_R2.fastq.gz

# test assembly and polishing algorithms with test data
# modified code from here: https://github.com/rpetit3/dragonflye/blob/main/.github/workflows/test-dragonflye.yml
RUN echo "Testing Raven Assembler (quality filtered)..." && \
dragonflye --reads /test/ERR3772599.fastq.gz --prefix ERR3772599 --cpus 0 --nopolish --outdir raven-minquality --gsize 300000 --assembler raven --minquality 8 && \
echo "Test Raven Assembler (quality filtered, no length filter)..." && \
dragonflye --reads /test/ERR3772599.fastq.gz --cpus 0 --nopolish --outdir raven-minquality-nominreadlen --gsize 300000 --assembler raven --minquality 6 --minreadlen 0 && \
echo "Test Raven Assembler (quality filtered, no length filter, trimming)" && \
dragonflye --reads /test/ERR3772599.fastq.gz --cpus 0 --nopolish --outdir raven-minquality-nominreadlen-trim --gsize 300000 --assembler raven --minquality 6 --minreadlen 0 --trim && \
echo "Test Raven Assembler (quality filtered, no length filter, trim opts)" && \
dragonflye --reads /test/ERR3772599.fastq.gz --cpus 0 --nopolish --outdir raven-minquality-nominreadlen-trimopts --gsize 300000 --assembler raven --minquality 6 --minreadlen 0 --trim --trimopts '--adapter_threshold 95' && \
echo "Testing Raven Assembler" && \
dragonflye --reads /test/ERR3772599.fastq.gz --prefix ERR3772599-raven --cpus 0 --nopolish --depth 5 --outdir raven --gsize 300000 --assembler raven && \
echo "Testing Raven Assembler + Racon Polish" && \
dragonflye --reads /test/ERR3772599.fastq.gz --cpus 0 --outdir raven-racon --gsize 300000 --assembler raven && \
echo "Testing Flye Assembler + Medaka Polish" && \
dragonflye --reads /test/ERR3772599.fastq.gz --cpus 0 --outdir raven-medaka --gsize 300000 --assembler raven --racon 0 --model r103_min_high_g345 && \
echo "Testing Flye Assembler + Medaka Polish + --medaka_opts" && \
dragonflye --reads /test/ERR3772599.fastq.gz --cpus 0 --outdir raven-medaka-opts --gsize 300000 --assembler raven --racon 0 --model r103_min_high_g345 --medaka_opts '-b 200' && \
echo "Testing Flye Assembler + Racon & Medaka Polish" && \
dragonflye --reads /test/ERR3772599.fastq.gz --cpus 0 --outdir raven-both --gsize 300000 --assembler raven && \
echo "Testing Flye Assembler + Racon & Pilon Polish" && \
dragonflye --reads /test/ERR3772599.fastq.gz --R1 /test/SRR2838702_R1.fastq.gz --R2 /test/SRR2838702_R2.fastq.gz --cpus 0 --outdir raven-polypolish --gsize 300000 --assembler raven && \
echo "Testing Flye Assembler + Racon & Polypolish Polish" && \
dragonflye --reads /test/ERR3772599.fastq.gz --R1 /test/SRR2838702_R1.fastq.gz --R2 /test/SRR2838702_R2.fastq.gz --cpus 0 --outdir raven-pilon --gsize 300000 --assembler raven --polypolish 0 --pilon 1 && \
echo "Testing Miniasm Assembler" && \
dragonflye --reads /test/ERR3772599.fastq.gz --prefix ERR3772599_mini.asm --cpus 1 --nopolish --outdir miniasm --gsize 300000 --assembler miniasm && \
echo "Testing Flye Assembler" && \
dragonflye --reads /test/ERR3772599.fastq.gz --cpus 0 --nopolish --outdir flye --gsize 300000 --assembler flye && \
echo "Testing Flye Assembler (with --nano-hq)" && \
dragonflye --reads /test/ERR3772599.fastq.gz --prefix ERR3772599-nano.hq --cpus 0 --nopolish --outdir flyehq --gsize 300000 --assembler flye --nanohq && \
echo "Testing --list_models" && \
dragonflye --list_models 2>&1 | grep r941_min_sup_g507
43 changes: 43 additions & 0 deletions dragonflye/1.1.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# dragonflye docker image

Main tool : [dragonflye v1.1.1](https://github.com/rpetit3/dragonflye)

> dragonflye: Assemble bacterial isolate genomes from Nanopore reads
## Additional tools

Protip: run command `docker run staphb/dragonflye:latest micromamba list` to see full micromamba environment:

- [any2fasta 0.4.2](https://github.com/tseemann/any2fasta)
- [assembly-scan 0.4.1](https://github.com/rpetit3/assembly-scan)
- [bwa 0.7.17-r1188](https://github.com/lh3/bwa)
- [bcftools 1.15.1](https://github.com/samtools/bcftools)
- biopython 1.80
- [fastp 0.23.2](https://github.com/OpenGene/fastp)
- [flye 2.9.1](https://github.com/fenderglass/Flye)
- [kmc 3.2.1](https://github.com/refresh-bio/KMC)
- [medaka 1.6.1](https://github.com/nanoporetech/medaka)
- [miniasm 0.3](https://github.com/lh3/miniasm)
- [minimap2 2.24-r1122](https://github.com/lh3/minimap2)
- [nanoq 0.9.0](https://github.com/esteinig/nanoq)
- perl 5.32.1
- [pigz 2.6](https://zlib.net/pigz/)
- [polypolish 0.5.0](https://github.com/rrwick/Polypolish)
- [porechop 0.2.4](https://github.com/rrwick/Porechop)
- python 3.8.15
- [racon 1.5.0](https://github.com/lbcb-sci/racon)
- [rasusa 0.7.0](https://github.com/mbhall88/rasusa)
- [raven 1.8.1](https://github.com/lbcb-sci/raven)
- [samclip 0.4.0](https://github.com/tseemann/samclip)
- [samtools 1.15.1](https://github.com/samtools/samtools)
- [seqtk 1.3-r106](https://github.com/lh3/seqtk)

## Example Usage

```bash
# download ONT FASTQs for testing
wget https://raw.githubusercontent.com/bactopia/bactopia-tests/main/data/species/portiera/nanopore/ERR3772599.fastq.gz

# run dragonflye using flye as the assembly algorithm
dragonflye --reads /test/ERR3772599.fastq.gz --prefix ERR3772599-nano.hq --cpus 0 --nopolish --outdir flyehq --gsize 300000 --assembler flye --nanohq
```

0 comments on commit 1a5f9eb

Please sign in to comment.