From 49a68ac9f2b227d1b74d4d0d1f6053b6194f3c74 Mon Sep 17 00:00:00 2001 From: Erin Young Date: Thu, 8 Feb 2024 19:12:24 +0000 Subject: [PATCH 1/4] add polypolish version 0.6.0 --- README.md | 2 +- polypolish/0.6.0/Dockerfile | 50 +++++++++++++++++++++++++++++++++++++ polypolish/0.6.0/README.md | 33 ++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 polypolish/0.6.0/Dockerfile create mode 100644 polypolish/0.6.0/README.md diff --git a/README.md b/README.md index b75911fce..b419e597f 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ To learn more about the docker pull rate limits and the open source software pro | [PlasmidFinder](https://hub.docker.com/r/staphb/plasmidfinder)
[![docker pulls](https://badgen.net/docker/pulls/staphb/plasmidfinder)](https://hub.docker.com/r/staphb/plasmidfinder) | | https://bitbucket.org/genomicepidemiology/plasmidfinder/src/master/ | | [PlasmidSeeker](https://hub.docker.com/r/staphb/plasmidseeker)
[![docker pulls](https://badgen.net/docker/pulls/staphb/plasmidseeker)](https://hub.docker.com/r/staphb/plasmidseeker) | | https://github.com/bioinfo-ut/PlasmidSeeker | | [pmga](https://hub.docker.com/r/staphb/pmga/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pmga)](https://hub.docker.com/r/staphb/pmga) | | https://github.com/rpetit3/pmga | -| [polypolish](https://hub.docker.com/r/staphb/polypolish/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/polypolish)](https://hub.docker.com/r/staphb/polypolish) | | https://github.com/rrwick/Polypolish | +| [polypolish](https://hub.docker.com/r/staphb/polypolish/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/polypolish)](https://hub.docker.com/r/staphb/polypolish) | | https://github.com/rrwick/Polypolish | | [PopPUNK](https://hub.docker.com/r/staphb/poppunk/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/poppunk)](https://hub.docker.com/r/staphb/poppunk) | | https://github.com/bacpop/PopPUNK | | [Porechop](https://hub.docker.com/r/staphb/porechop/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/porechop)](https://hub.docker.com/r/staphb/porechop) | | https://github.com/rrwick/Porechop | | [PPanGGOLiN](https://hub.docker.com/r/staphb/ppanggolin/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/ppanggolin)](https://hub.docker.com/r/staphb/ppanggolin) | | https://github.com/labgem/PPanGGOLiN | diff --git a/polypolish/0.6.0/Dockerfile b/polypolish/0.6.0/Dockerfile new file mode 100644 index 000000000..adf0ba350 --- /dev/null +++ b/polypolish/0.6.0/Dockerfile @@ -0,0 +1,50 @@ +FROM ubuntu:jammy as app + +ARG POLYPOLISH_VER="0.6.0" + +LABEL base.image="ubuntu:jammy" +LABEL dockerfile.version="1" +LABEL software="polypolish" +LABEL software.version="${POLYPOLISH_VER}" +LABEL description="Polypolish is a tool for polishing genome assemblies with short reads." +LABEL website="https://github.com/rrwick/Polypolish" +LABEL license="https://github.com/rrwick/Polypolish/blob/main/LICENSE" +LABEL maintainer="Erin Young" +LABEL maintainer.email="eriny@utah.gov" + +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget \ + ca-certificates \ + procps \ + unzip \ + python3 && \ + apt-get autoclean && rm -rf /var/lib/apt/lists/* + +WORKDIR /usr/local/bin + +# install polypolish without rust et al. +RUN wget -q https://github.com/rrwick/Polypolish/releases/download/v${POLYPOLISH_VER}/polypolish-linux-x86_64-musl-v${POLYPOLISH_VER}.tar.gz && \ + tar -xf polypolish-linux-x86_64-musl-v${POLYPOLISH_VER}.tar.gz && \ + rm polypolish-linux-x86_64-musl-v${POLYPOLISH_VER}.tar.gz + +# getting polypolish_insert_filter.py +RUN wget -q https://github.com/rrwick/Polypolish/archive/refs/tags/v${POLYPOLISH_VER}.tar.gz && \ + tar -xf v${POLYPOLISH_VER}.tar.gz && \ + cp Polypolish-0.5.0/scripts/polypolish_insert_filter.py . && \ + rm v${POLYPOLISH_VER}.tar.gz && \ + rm -rf Polypolish-0.5.0 + +ENV LC_ALL=C + +CMD polypolish --help + +WORKDIR /data + +FROM app as test + +RUN polypolish --help && polypolish --version && polypolish_insert_filter.py --help && polypolish_insert_filter.py --version + +# using "toy" data +RUN wget -q https://raw.githubusercontent.com/wiki/rrwick/Polypolish/files/toy_example/assembly.fasta && \ + wget -q https://raw.githubusercontent.com/wiki/rrwick/Polypolish/files/toy_example/alignments.sam && \ + polypolish assembly.fasta alignments.sam > polished.fasta \ No newline at end of file diff --git a/polypolish/0.6.0/README.md b/polypolish/0.6.0/README.md new file mode 100644 index 000000000..f1da2ee59 --- /dev/null +++ b/polypolish/0.6.0/README.md @@ -0,0 +1,33 @@ +# polypolish container + +Main tool : [polypolish](https://github.com/rrwick/Polypolish/wiki/How-to-run-Polypolish) + +Additional tools: + +- python3 3.10.6 +- polypolish_insert_filter.py + +Full documentation: [https://github.com/rrwick/Polypolish/wiki](https://github.com/rrwick/Polypolish/wiki) + +Polypolish "polishes" consensus files created during assembly of long reads with Illumina short reads. Polypolish is a little different than other polishing tools in that paired-end reads need to be aligned separatly to generate two sam files. + +## Example Usage + +Align reads to the draft sequence in a different container. The example shows bwa, as this is in the Polypolish wiki, but bbamp, minimap2 or any other similar software can perform a similar step that may be better suited for your use-case. + +```bash +bwa index draft.fasta +bwa mem -t 16 -a draft.fasta reads_1.fastq.gz > alignments_1.sam +bwa mem -t 16 -a draft.fasta reads_2.fastq.gz > alignments_2.sam +``` + +Once the sam files are generated, they can be used with polypolish in this container. + +```bash +# paired end +polypolish_insert_filter.py --in1 alignments_1.sam --in2 alignments_2.sam --out1 filtered_1.sam --out2 filtered_2.sam +polypolish draft.fasta filtered_1.sam filtered_2.sam > polished.fasta + +# single end +polypolish draft.fasta input.sam > polished.fasta +``` From 61ec320ec54290394e3fbe0d237ed1ad467e8e9c Mon Sep 17 00:00:00 2001 From: Erin Young Date: Thu, 8 Feb 2024 19:37:03 +0000 Subject: [PATCH 2/4] fixed filter --- polypolish/0.6.0/Dockerfile | 31 ++++++++++++++++--------------- polypolish/0.6.0/README.md | 11 +++-------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/polypolish/0.6.0/Dockerfile b/polypolish/0.6.0/Dockerfile index adf0ba350..f0ba38c5b 100644 --- a/polypolish/0.6.0/Dockerfile +++ b/polypolish/0.6.0/Dockerfile @@ -1,6 +1,19 @@ +ARG POLYPOLISH_VER="0.6.0" + +FROM rust:1.75 as builder + +ARG POLYPOLISH_VER + +RUN wget -q https://github.com/rrwick/Polypolish/archive/refs/tags/v${POLYPOLISH_VER}.tar.gz && \ + tar -vxf v${POLYPOLISH_VER}.tar.gz && \ + cd /Polypolish-${POLYPOLISH_VER} && \ + cargo build --release + FROM ubuntu:jammy as app -ARG POLYPOLISH_VER="0.6.0" +ARG POLYPOLISH_VER + +COPY --from=builder /Polypolish-${POLYPOLISH_VER}/target/release/polypolish /usr/local/bin/polypolish LABEL base.image="ubuntu:jammy" LABEL dockerfile.version="1" @@ -22,18 +35,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /usr/local/bin -# install polypolish without rust et al. -RUN wget -q https://github.com/rrwick/Polypolish/releases/download/v${POLYPOLISH_VER}/polypolish-linux-x86_64-musl-v${POLYPOLISH_VER}.tar.gz && \ - tar -xf polypolish-linux-x86_64-musl-v${POLYPOLISH_VER}.tar.gz && \ - rm polypolish-linux-x86_64-musl-v${POLYPOLISH_VER}.tar.gz - -# getting polypolish_insert_filter.py -RUN wget -q https://github.com/rrwick/Polypolish/archive/refs/tags/v${POLYPOLISH_VER}.tar.gz && \ - tar -xf v${POLYPOLISH_VER}.tar.gz && \ - cp Polypolish-0.5.0/scripts/polypolish_insert_filter.py . && \ - rm v${POLYPOLISH_VER}.tar.gz && \ - rm -rf Polypolish-0.5.0 - ENV LC_ALL=C CMD polypolish --help @@ -42,9 +43,9 @@ WORKDIR /data FROM app as test -RUN polypolish --help && polypolish --version && polypolish_insert_filter.py --help && polypolish_insert_filter.py --version +RUN polypolish --help && polypolish --version # using "toy" data RUN wget -q https://raw.githubusercontent.com/wiki/rrwick/Polypolish/files/toy_example/assembly.fasta && \ wget -q https://raw.githubusercontent.com/wiki/rrwick/Polypolish/files/toy_example/alignments.sam && \ - polypolish assembly.fasta alignments.sam > polished.fasta \ No newline at end of file + polypolish polish assembly.fasta alignments.sam > polished.fasta \ No newline at end of file diff --git a/polypolish/0.6.0/README.md b/polypolish/0.6.0/README.md index f1da2ee59..f5e33dbb6 100644 --- a/polypolish/0.6.0/README.md +++ b/polypolish/0.6.0/README.md @@ -2,11 +2,6 @@ Main tool : [polypolish](https://github.com/rrwick/Polypolish/wiki/How-to-run-Polypolish) -Additional tools: - -- python3 3.10.6 -- polypolish_insert_filter.py - Full documentation: [https://github.com/rrwick/Polypolish/wiki](https://github.com/rrwick/Polypolish/wiki) Polypolish "polishes" consensus files created during assembly of long reads with Illumina short reads. Polypolish is a little different than other polishing tools in that paired-end reads need to be aligned separatly to generate two sam files. @@ -25,9 +20,9 @@ Once the sam files are generated, they can be used with polypolish in this conta ```bash # paired end -polypolish_insert_filter.py --in1 alignments_1.sam --in2 alignments_2.sam --out1 filtered_1.sam --out2 filtered_2.sam -polypolish draft.fasta filtered_1.sam filtered_2.sam > polished.fasta +polypolish filter --in1 alignments_1.sam --in2 alignments_2.sam --out1 filtered_1.sam --out2 filtered_2.sam +polypolish polish draft.fasta filtered_1.sam filtered_2.sam > polished.fasta # single end -polypolish draft.fasta input.sam > polished.fasta +polypolish polish draft.fasta input.sam > polished.fasta ``` From 1b249bf2255c024b13e7b9540052890a5f628de8 Mon Sep 17 00:00:00 2001 From: Young Date: Wed, 21 Feb 2024 09:36:35 -0700 Subject: [PATCH 3/4] Move COPY --- polypolish/0.6.0/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polypolish/0.6.0/Dockerfile b/polypolish/0.6.0/Dockerfile index f0ba38c5b..34b755e62 100644 --- a/polypolish/0.6.0/Dockerfile +++ b/polypolish/0.6.0/Dockerfile @@ -13,8 +13,6 @@ FROM ubuntu:jammy as app ARG POLYPOLISH_VER -COPY --from=builder /Polypolish-${POLYPOLISH_VER}/target/release/polypolish /usr/local/bin/polypolish - LABEL base.image="ubuntu:jammy" LABEL dockerfile.version="1" LABEL software="polypolish" @@ -33,6 +31,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 && \ apt-get autoclean && rm -rf /var/lib/apt/lists/* +COPY --from=builder /Polypolish-${POLYPOLISH_VER}/target/release/polypolish /usr/local/bin/polypolish + WORKDIR /usr/local/bin ENV LC_ALL=C @@ -48,4 +48,4 @@ RUN polypolish --help && polypolish --version # using "toy" data RUN wget -q https://raw.githubusercontent.com/wiki/rrwick/Polypolish/files/toy_example/assembly.fasta && \ wget -q https://raw.githubusercontent.com/wiki/rrwick/Polypolish/files/toy_example/alignments.sam && \ - polypolish polish assembly.fasta alignments.sam > polished.fasta \ No newline at end of file + polypolish polish assembly.fasta alignments.sam > polished.fasta From 541cdd574e1f92c3a4ab5e00a2408934d33561ee Mon Sep 17 00:00:00 2001 From: Young Date: Wed, 21 Feb 2024 09:38:09 -0700 Subject: [PATCH 4/4] Remove extra WORKDIR --- polypolish/0.6.0/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/polypolish/0.6.0/Dockerfile b/polypolish/0.6.0/Dockerfile index 34b755e62..88d67b63b 100644 --- a/polypolish/0.6.0/Dockerfile +++ b/polypolish/0.6.0/Dockerfile @@ -33,8 +33,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY --from=builder /Polypolish-${POLYPOLISH_VER}/target/release/polypolish /usr/local/bin/polypolish -WORKDIR /usr/local/bin - ENV LC_ALL=C CMD polypolish --help