Skip to content

Commit

Permalink
adding trycycler 0.5.4 (StaPH-B#638)
Browse files Browse the repository at this point in the history
* adding trycycler 0.5.4

* added env variable TERM so that warnings are silenced and test output looks pretty. Docker image builds and runs tests successfully

---------

Co-authored-by: kapsakcj <[email protected]>
  • Loading branch information
erinyoung and kapsakcj authored Mar 20, 2023
1 parent 4cae59d commit 9170acb
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [Tostadas](https://hub.docker.com/r/staphb/tostadas/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/tostadas)](https://hub.docker.com/r/staphb/tostadas) | <ul><li>0.2.0-beta</li></ul> | https://github.com/CDCgov/tostadas |
| [Treemmer](https://hub.docker.com/r/staphb/treemmer/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/treemmer)](https://hub.docker.com/r/staphb/treemmer) | <ul><li>0.3</li></ul> | https://git.scicore.unibas.ch/TBRU/Treemmer (archived, moved to GitHub) </br> https://github.com/fmenardo/Treemmer |
| [Trimmomatic](https://hub.docker.com/r/staphb/trimmomatic/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/trimmomatic)](https://hub.docker.com/r/staphb/trimmomatic) | <ul><li>0.38</li><li>0.39</li></ul> | http://www.usadellab.org/cms/?page=trimmomatic </br>https://github.com/usadellab/Trimmomatic |
| [Trycycler](https://hub.docker.com/r/staphb/trycycler/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/trycycler)](https://hub.docker.com/r/staphb/trycycler) | <ul><li>0.3.1</li><li>0.3.2</li><li>0.3.3</li><li>0.5.0</li><li>0.5.3</li></ul> | https://github.com/rrwick/Trycycler |
| [Trycycler](https://hub.docker.com/r/staphb/trycycler/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/trycycler)](https://hub.docker.com/r/staphb/trycycler) | <ul><li>0.3.1</li><li>0.3.2</li><li>0.3.3</li><li>0.5.0</li><li>0.5.3</li><li>0.5.4</li></ul> | https://github.com/rrwick/Trycycler |
| [Unicycler](https://hub.docker.com/r/staphb/unicycler/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/unicycler)](https://hub.docker.com/r/staphb/unicycler) | <ul><li>0.4.7</li><li>0.4.8</li><li>0.4.9</li><li>0.5.0</li></ul> | https://github.com/rrwick/Unicycler |
| [VADR](https://hub.docker.com/r/staphb/vadr/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/vadr)](https://hub.docker.com/r/staphb/vadr) | <ul><li>1.1</li><li>1.1.2</li><li>1.1.3</li><li>1.2</li><li>1.2.1</li><li>1.3 & SARS-CoV-2 models 1.3-1</li><li>1.3 & SARS-CoV-2 models 1.3-2</li><li>1.4 & SARS-CoV-2 models 1.3-2</li><li>1.4.1 & SARS-CoV-2 models 1.3-2</li><li>1.4.2 & SARS-CoV-2 models 1.3-2, MPXV models 1.4.2-1</li><li>1.5 & SARS-CoV-2 models 1.3-2, MPXV models 1.4.2-1</li><li>1.5.1 & SARS-CoV-2 models 1.3-2, MPXV models 1.4.2-1, RSV models 1.5-2</li></ul> | https://github.com/nawrockie/vadr (archived, now redirects to ncbi/vadr) </br>https://github.com/ncbi/vadr |
| [VIBRANT](https://hub.docker.com/r/staphb/vibrant/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/vibrant)](https://hub.docker.com/r/staphb/vibrant) | <ul><li>1.2.1</li></ul> | https://github.com/AnantharamanLab/VIBRANT |
Expand Down
89 changes: 89 additions & 0 deletions trycycler/0.5.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
ARG TRYCYCLER_VER=0.5.4

FROM ubuntu:jammy as app

ARG TRYCYCLER_VER
ARG MASH_VER=2.3
ARG MINIASM_VER=0.3
ARG MINIMAP2_VER=2.24

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="Trycycler"
LABEL software.version="${TRYCYCLER_VER}"
LABEL description="A tool for generating consensus long-read assemblies for bacterial genomes"
LABEL website="https://github.com/rrwick/Trycycler"
LABEL license="https://github.com/rrwick/Trycycler/blob/master/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"

# install prerequisites, cleanup apt garbage
# muscle version: 3.8.31
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
gcc \
wget \
curl \
bzip2 \
build-essential \
procps \
ca-certificates \
libz-dev \
muscle \
r-base \
gfortran \
libblas-dev \
liblapack-dev && \
apt-get clean && apt-get autoclean && rm -rf /var/lib/apt/lists/*

# minimap2
# apt deps: curl bzip2
RUN curl -L https://github.com/lh3/minimap2/releases/download/v${MINIMAP2_VER}/minimap2-${MINIMAP2_VER}_x64-linux.tar.bz2 | tar -jxvf -

# mash
RUN wget https://github.com/marbl/Mash/releases/download/v${MASH_VER}/mash-Linux64-v${MASH_VER}.tar && \
tar -xvf mash-Linux64-v${MASH_VER}.tar && \
rm -rf mash-Linux64-v${MASH_VER}.tar

# miniasm
RUN wget https://github.com/lh3/miniasm/archive/v${MINIASM_VER}.tar.gz && \
mkdir miniasm && \
tar -xzvf v${MINIASM_VER}.tar.gz -C miniasm --strip-components 1 && \
rm v${MINIASM_VER}.tar.gz && \
cd miniasm && \
make

# install R packages
RUN R -e "install.packages(c('ape',\
'phangorn'),\
repos = 'http://cran.us.r-project.org')"

# Trycycler
# apt deps: muscle gcc
RUN wget https://github.com/rrwick/Trycycler/archive/v${TRYCYCLER_VER}.tar.gz && \
tar -xzf v${TRYCYCLER_VER}.tar.gz && \
rm v${TRYCYCLER_VER}.tar.gz && \
pip3 install ./Trycycler-${TRYCYCLER_VER} Pillow && \
mkdir /data

# set /data as working directory
WORKDIR /data

# set env PATH variable for installed programs
# LC_ALL for singularity compatibility
# TERM set so that output is pretty during tests and so warnings about TERM not being set are silenced
ENV PATH="/mash-Linux64-v${MASH_VER}:/minimap2-${MINIMAP2_VER}_x64-linux:/miniasm:${PATH}"\
LC_ALL=C \
TERM=xterm-256color

FROM app as test

ARG TRYCYCLER_VER

WORKDIR /Trycycler-${TRYCYCLER_VER}

RUN trycycler --help && trycycler --version

RUN pytest
34 changes: 34 additions & 0 deletions trycycler/0.5.4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# trycycler container

Main tool: [trycycler](https://github.com/rrwick/Trycycler)

Additional tools:

- [miniasm](https://github.com/lh3/miniasm) 0.3-r179
- [minimap2](https://github.com/lh3/minimap2) 2.24-r1122
- [muscle](https://www.ebi.ac.uk/Tools/msa/muscle/) 3.8.1551 (recommended version)
- [mash](https://github.com/marbl/Mash) 2.3
- R package ['ape'](https://cran.r-project.org/web/packages/ape/index.html) 5.7
- R package ['phangorn'](https://cran.r-project.org/web/packages/phangorn/index.html) 2.11.1

Trycycler "tries" different assemblies to find the one most supported by long reads.

## Example Usage

```bash
trycycler subsample --reads reads.fastq --out_dir read_subsets
```

```bash
trycycler cluster --assemblies assemblies/*.fasta --reads reads.fastq --out_dir trycycler
```

```bash
trycycler reconcile --reads reads.fastq --cluster_dir trycycler/cluster_001
```

```bash
trycycler consensus --cluster_dir trycycler/cluster_001
```

It is highly recommended to read Trycycler's [wiki](https://github.com/rrwick/Trycycler/wiki) for full usability and reasoning.

0 comments on commit 9170acb

Please sign in to comment.