Skip to content

Commit b35ed3b

Browse files
authored
Merge pull request #1592 from cwoodside1278/minipolish-0.2.1
Update Minipolish to 0.2.1
2 parents 4b0870b + 584862c commit b35ed3b

File tree

3 files changed

+139
-1
lines changed

3 files changed

+139
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ To learn more about the docker pull rate limits and the open source software pro
234234
| [metaphlan](https://hub.docker.com/r/staphb/metaphlan) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/metaphlan)](https://hub.docker.com/r/staphb/metaphlan) | <details><summary>Click to see all versions</summary> <ul><li>[3.0.3-no-db (no database)](./build-files/metaphlan/3.0.3-no-db/)</li><li>[3.0.3 (~3GB db)](./build-files/metaphlan/3.0.3/)</li><li>[4.1.0](./build-files/metaphlan/4.1.0/) (no database)</li><li>[4.1.1](./build-files/metaphlan/4.1.1/) (no database)</li><li>[4.2.2](./build-files/metaphlan/4.2.2/)</li><li>[4.2.4](./build-files/metaphlan/4.2.4/)</li></ul> </details> | https://github.com/biobakery/MetaPhlAn |
235235
| [MIDAS](https://hub.docker.com/r/staphb/midas) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/midas)](https://hub.docker.com/r/staphb/midas) | <details><summary>Click to see all versions</summary> <ul><li>[1.3.2 (no database)](./build-files/midas/1.3.2/)</li>| https://github.com/snayfach/MIDAS |
236236
| [minimap2](https://hub.docker.com/r/staphb/minimap2) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/minimap2)](https://hub.docker.com/r/staphb/minimap2) | <details><summary>Click to see all versions</summary> <ul><li>[2.17](./build-files/minimap2/2.17/)</li><li>[2.18](./build-files/minimap2/2.18/)</li><li>[2.21](./build-files/minimap2/2.21/)</li><li>[2.22](./build-files/minimap2/2.22/)</li><li>[2.23](./build-files/minimap2/2.23/)</li><li>[2.24](./build-files/minimap2/2.24/)</li><li>[2.25](./build-files/minimap2/2.25/)</li><li>[2.26](./build-files/minimap2/2.26)</li><li>[2.27](./build-files/minimap2/2.27/)</li><li>[2.28](./build-files/minimap2/2.28/)</li><li>[2.29](./build-files/minimap2/2.29/)</li><li>[2.30](./build-files/minimap2/2.30/)</li></ul></details> | https://github.com/lh3/minimap2 |
237-
| [minipolish](https://hub.docker.com/r/staphb/minipolish) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/minipolish)](https://hub.docker.com/r/staphb/minipolish) | <details><summary>Click to see all versions</summary> <ul><li>[0.1.3](./build-files/minipolish/0.1.3/)</li><li>[0.2.0](./build-files/minipolish/0.2.0/)</li></ul> </details> | https://github.com/rrwick/Minipolish |
237+
| [minipolish](https://hub.docker.com/r/staphb/minipolish) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/minipolish)](https://hub.docker.com/r/staphb/minipolish) | <details><summary>Click to see all versions</summary> <ul><li>[0.1.3](./build-files/minipolish/0.1.3/)</li><li>[0.2.0](./build-files/minipolish/0.2.0/)</li><li>[0.2.1](./build-files/minipolish/0.2.1/)</li></ul> </details> | https://github.com/rrwick/Minipolish |
238238
| [mlst](https://hub.docker.com/r/staphb/mlst) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/mlst)](https://hub.docker.com/r/staphb/mlst) | <details><summary>Click to see all versions</summary> <ul><li>[2.16.2](./build-files/mlst/2.16.2/)</li><li>[2.17.6](./build-files/mlst/2.17.6/)</li><li>[2.19.0](./build-files/mlst/2.19.0/)</li><li>[2.22.0](./build-files/mlst/2.22.0/)</li><li>[2.22.1](./build-files/mlst/2.22.1/)</li><li>[2.23.0](./build-files/mlst/2.23.0/)</li><li>[2.23.0-2023-07](./build-files/mlst/2.23.0-2023-07/)</li><li>[2.23.0-2023-08](./build-files/mlst/2.23.0-2023-08/)</li><li>[2.23.0-2024-01](./build-files/mlst/2.23.0-2024-01/)</li><li>[2.23.0-2024-03](./build-files/mlst/2.23.0-2024-12/)</li><li>[2.23.0-2024-12-31](./build-files/mlst/2.23.0-2024-12-31/)</li><li>[2.25.0](./build-files/mlst/2.25.0/)</li><li>[2.28.1](./build-files/mlst/2.28.1/)</li><li>[2.32.2](./build-files/mlst/2.32.2/)</li></ul> </details> | https://github.com/tseemann/mlst |
239239
| [MMseqs2](https://hub.docker.com/r/staphb/mmseqs2) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/mmseqs2)](https://hub.docker.com/r/staphb/mmseqs2) | <details><summary>Click to see all versions</summary> <ul><li>[17-b804f](./build-files/mmseqs2/17-b804f/)</li><li>[18-8cc5c](./build-files/mmseqs2/18-8cc5c/)</li></ul> </details> | https://github.com/soedinglab/MMseqs2 |
240240
| [mob-suite](https://github.com/phac-nml/mob-suite) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/mob-suite)](https://hub.docker.com/r/staphb/mob-suite) | <details><summary>Click to see all versions</summary> <ul><li>[3.1.9](./build-files/mob-suite/3.1.9/)</li></ul> </details> | https://github.com/phac-nml/mob-suite |
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
ARG MINIPOLISH_VER=0.2.1
2+
ARG MINIMAP2_VER=2.30
3+
ARG RACON_VER=1.5.0
4+
ARG MINIASM_VER=0.3
5+
6+
FROM ubuntu:noble AS builder
7+
ARG MINIPOLISH_VER
8+
ARG MINIMAP2_VER
9+
ARG RACON_VER
10+
ARG MINIASM_VER
11+
12+
# Install dependencies
13+
RUN apt-get update && apt-get install --no-install-recommends -y \
14+
perl \
15+
default-jre \
16+
gnuplot \
17+
libgomp1 \
18+
maven \
19+
git \
20+
wget \
21+
python3 \
22+
build-essential \
23+
cmake \
24+
zlib1g-dev \
25+
curl \
26+
bzip2 && \
27+
apt-get autoclean && rm -rf /var/lib/apt/lists/*
28+
29+
# Install Racon
30+
RUN wget https://github.com/lbcb-sci/racon/archive/refs/tags/${RACON_VER}.tar.gz && \
31+
tar -xvf ${RACON_VER}.tar.gz && \
32+
cd racon-${RACON_VER} && \
33+
mkdir build && \
34+
cd build && \
35+
cmake -DCMAKE_BUILD_TYPE=Release .. && \
36+
make
37+
38+
# Add Racon to PATH
39+
ENV PATH="/racon-${RACON_VER}/build/bin:${PATH}"
40+
41+
# Test Racon
42+
RUN racon_test
43+
44+
# Install Minimap2
45+
RUN curl -L https://github.com/lh3/minimap2/releases/download/v${MINIMAP2_VER}/minimap2-${MINIMAP2_VER}_x64-linux.tar.bz2 | tar -jxvf - --no-same-owner && \
46+
mv minimap2-${MINIMAP2_VER}_x64-linux /usr/local/bin/minimap2
47+
48+
# miniasm
49+
RUN wget https://github.com/lh3/miniasm/archive/v${MINIASM_VER}.tar.gz && \
50+
mkdir miniasm && \
51+
tar -xzvf v${MINIASM_VER}.tar.gz -C miniasm --strip-components 1 && \
52+
rm v${MINIASM_VER}.tar.gz && \
53+
cd miniasm && \
54+
make && \
55+
mv miniasm /usr/local/bin/.
56+
57+
FROM ubuntu:noble AS app
58+
ARG MINIPOLISH_VER
59+
ARG RACON_VER
60+
61+
# metadata
62+
LABEL base.image="ubuntu:noble"
63+
LABEL dockerfile.version="1"
64+
LABEL software="minipolish"
65+
LABEL software.version="${MINIPOLISH_VER}"
66+
LABEL description="Racon polishing for GFA graphs produced by miniasm"
67+
LABEL website="https://github.com/rrwick/Minipolish"
68+
LABEL license="https://github.com/rrwick/Minipolish/blob/main/LICENSE"
69+
LABEL maintainer="Erin Young"
70+
LABEL maintainer.email="eriny@utah.gov"
71+
72+
# install dependencies via apt-get or yum if using a centos or fedora base
73+
RUN apt-get update && apt-get install -y --no-install-recommends \
74+
wget \
75+
ca-certificates \
76+
python3-pip && \
77+
apt-get autoclean && rm -rf /var/lib/apt/lists/*
78+
79+
COPY --from=builder /racon-${RACON_VER}/build/bin/* /usr/local/bin/
80+
COPY --from=builder /usr/local/bin/* /usr/local/bin/
81+
82+
# install minipolish
83+
RUN wget https://github.com/rrwick/Minipolish/archive/refs/tags/v${MINIPOLISH_VER}.tar.gz && \
84+
tar -vxf v${MINIPOLISH_VER}.tar.gz && \
85+
pip install --break-system-packages v${MINIPOLISH_VER}.tar.gz && \
86+
rm v${MINIPOLISH_VER}.tar.gz
87+
# in theory, this can be tested with python3 -m pytest
88+
89+
# set environmental variables e.g. $PATH and locale settings for singularity compatibility
90+
ENV PATH="/Minipolish-${MINIPOLISH_VER}:${PATH}" \
91+
TERM=xterm-256color \
92+
LC_ALL=C
93+
94+
# set working directory
95+
WORKDIR /data
96+
97+
CMD ["minipolish", "--help"]
98+
99+
FROM app AS test
100+
101+
RUN minipolish --help
102+
103+
# checking dependencies
104+
RUN minimap2 --version && racon --help && miniasm -V
105+
106+
WORKDIR /test
107+
108+
RUN wget https://github.com/rrwick/Unicycler/raw/refs/heads/main/sample_data/long_reads_high_depth.fastq.gz
109+
110+
#RUN miniasm_and_minipolish.sh long_reads_high_depth.fastq.gz 4 > test.gfa && head test.gfa
111+
112+
# Testing the test data without using the wrapper script
113+
RUN minimap2 -x ava-ont -t 4 long_reads_high_depth.fastq.gz long_reads_high_depth.fastq.gz > overlaps.paf && \
114+
miniasm -f long_reads_high_depth.fastq.gz overlaps.paf -s 50 -e 1 > test.gfa && \
115+
minipolish --threads 4 long_reads_high_depth.fastq.gz test.gfa > polished.gfa && \
116+
head polished.gfa
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# minipolish and miniasm container
2+
3+
Main tool : [minipolish](https://github.com/rrwick/Minipolish) and [miniasm](https://github.com/lh3/miniasm)
4+
5+
Other tools :
6+
- [racon](https://github.com/isovic/racon) version 1.5.0
7+
- [minimap2](https://github.com/lh3/minimap2) version 2.30
8+
- [miniasm](https://github.com/lh3/miniasm) version 0.3
9+
10+
From minipolish's [readme](https://github.com/rrwick/Minipolish):
11+
12+
> Miniasm is a great long-read assembly tool: straight-forward, effective and very fast. However, it does not include a polishing step, so its assemblies have a high error rate – they are essentially made of stitched-together pieces of long reads.
13+
>
14+
> Racon is a great polishing tool that can be used to clean up assembly errors. It's also very fast and well suited for long-read data. However, it operates on FASTA files, not the GFA graphs that miniasm makes.
15+
>
16+
> That's where Minipolish comes in. With a single command, it will use Racon to polish up a miniasm assembly, while keeping the assembly in graph form.
17+
18+
# Example Usage
19+
20+
```
21+
miniasm_and_minipolish.sh input.fastq $threads > output.gfa
22+
```

0 commit comments

Comments
 (0)