Skip to content

Commit

Permalink
Merge pull request #1115 from fraser-combe/racon-minimap2
Browse files Browse the repository at this point in the history
Update Racon 1.5.0 to include minimap2
  • Loading branch information
erinyoung authored Dec 9, 2024
2 parents 7e40140 + 91fe523 commit 8d47afe
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [pypolca](https://hub.docker.com/r/staphb/pypolca/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pypolca)](https://hub.docker.com/r/staphb/pypolca) | <ul><li>[0.3.1](./pypolca/0.3.1/)</li></ul> | https://github.com/gbouras13/pypolca |
| [QUAST](https://hub.docker.com/r/staphb/quast/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/quast)](https://hub.docker.com/r/staphb/quast) | <ul><li>5.0.0</li><li>5.0.2</li><li>[5.2.0](./quast/5.2.0)</li><li>[5.2.0-slim](./quast/5.2.0-slim)</li><li>[5.3.0](./quast/5.3.0)</li><li>[5.3.0-slim](./quast/5.3.0-slim)</li></ul> | https://github.com/ablab/quast |
| [QuickSNP](https://hub.docker.com/r/staphb/quicksnp/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/quicksnp)](https://hub.docker.com/r/staphb/quicksnp) | <ul><li>1.0.1</li></ul> | https://github.com/k-florek/QuickSNP |
| [racon](https://hub.docker.com/r/staphb/racon) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/racon)](https://hub.docker.com/r/staphb/racon)| <ul><li>[1.4.3](./racon/1.4.3/)</li><li>[1.4.20](./racon/1.4.20/)</li><li>[1.5.0](./racon/1.5.0/)</li></ul> | <li> https://github.com/lbcb-sci/racon </li><li> https://github.com/isovic/racon (ARCHIVED)</li> |
| [racon](https://hub.docker.com/r/staphb/racon) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/racon)](https://hub.docker.com/r/staphb/racon)| <ul><li>[1.4.3](./racon/1.4.3/)</li><li>[1.4.20](./racon/1.4.20/)</li><li>[1.5.0](./racon/1.5.0/)</li><li>[1.5.0-minimap2](./racon/1.5.0-minimap2/)</li></ul> | <li> https://github.com/lbcb-sci/racon </li><li> https://github.com/isovic/racon (ARCHIVED)</li> |
| [rasusa](https://hub.docker.com/r/staphb/rasusa/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/rasusa)](https://hub.docker.com/r/staphb/rasusa) | <ul><li>[0.1.0](./rasusa/0.1.0/)</li><li>[0.2.0](./rasusa/0.2.0/)</li><li>[0.3.0](./rasusa/0.3.0/)</li><li>[0.6.0](./rasusa/0.6.0/)</li><li>[0.7.0](./rasusa/0.7.0/)</li><li>[0.8.0](./rasusa/0.8.0/)</li><li>[2.0.0](./rasusa/2.0.0/)</li><li>[2.1.0](./rasusa/2.1.0/)</li></ul> | https://github.com/mbhall88/rasusa |
| [raven](https://hub.docker.com/r/staphb/raven/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/raven)](https://hub.docker.com/r/staphb/raven) | <ul><li>1.5.1</li><li>1.8.1</li><li>[1.8.3](./raven/1.8.3)</li></ul> | https://github.com/lbcb-sci/raven |
| [RAxML](https://hub.docker.com/r/staphb/raxml/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/raxml)](https://hub.docker.com/r/staphb/raxml) | <ul><li>8.2.12</li><li>[8.2.13](./raxml/8.2.13/)</li></ul> | https://github.com/stamatak/standard-RAxML |
Expand Down
112 changes: 112 additions & 0 deletions racon/1.5.0-minimap2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
ARG RACON_VER="1.5.0"
ARG MINIMAP2_VER="2.28"

# Use ubuntu as base image
FROM ubuntu:jammy AS builder

ARG RACON_VER
ARG MINIMAP2_VER

# Install dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
perl \
default-jre \
gnuplot \
libgomp1 \
maven \
git \
wget \
python3 \
build-essential \
cmake \
zlib1g-dev \
curl \
bzip2 && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

# Install Racon
RUN wget https://github.com/lbcb-sci/racon/archive/refs/tags/${RACON_VER}.tar.gz && \
tar -xvf ${RACON_VER}.tar.gz && \
cd racon-${RACON_VER} && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
make

# Add Racon to PATH
ENV PATH="/racon-${RACON_VER}/build/bin:${PATH}"

# Test Racon
RUN racon_test

# Install Minimap2
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 && \
mv minimap2-${MINIMAP2_VER}_x64-linux /usr/local/minimap2

# Add Minimap2 to PATH
ENV PATH="/usr/local/minimap2:${PATH}"

# Test Minimap2
RUN minimap2 --version

FROM ubuntu:jammy AS app

ARG RACON_VER
ARG MINIMAP2_VER

# Metadata
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="Racon + Minimap2"
LABEL racon.version="${RACON_VER}"
LABEL software.version="Racon-${RACON_VER}, Minimap2-${MINIMAP2_VER}"
LABEL racon.version="${RACON_VER}"
LABEL minimap2.version="${MINIMAP2_VER}"
LABEL description="Racon for assembly polishing and Minimap2 for alignment"
LABEL website="https://github.com/lbcb-sci/racon, https://github.com/lh3/minimap2"
LABEL license="https://github.com/lbcb-sci/racon/blob/master/LICENSE, https://github.com/lh3/minimap2/blob/master/LICENSE.txt"
LABEL maintainer="Fraser Combe"
LABEL maintainer.email="[email protected]"

# Install Python and essential tools
RUN apt-get update && apt-get install -y \
procps \
wget \
python3 && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

# Copy Racon and Minimap2 binaries
COPY --from=builder /racon-${RACON_VER}/build/bin/* /usr/local/bin/
COPY --from=builder /usr/local/minimap2/* /usr/local/bin/

RUN mkdir /data

WORKDIR /data

# Set locale settings
ENV PATH=${PATH} LC_ALL=C

CMD racon --help

FROM app AS test

# Test Racon and Minimap2
RUN racon --help && racon --version && minimap2 --version

COPY --from=builder /racon-${RACON_VER}/test/data/* /test/

WORKDIR /test

# Minimap2 alignment test
RUN wget -q https://raw.githubusercontent.com/lh3/minimap2/master/test/MT-human.fa && \
wget -q https://raw.githubusercontent.com/lh3/minimap2/master/test/MT-orang.fa && \
minimap2 -a MT-human.fa MT-orang.fa > test.sam && \
head test.sam

# Example polishing workflow
RUN wget -q https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/prokaryotes/bacteroides_fragilis/genome/genome.paf && \
wget -q https://github.com/nf-core/test-datasets/raw/modules/data/genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz && \
wget -q https://github.com/nf-core/test-datasets/raw/modules/data/genomics/prokaryotes/bacteroides_fragilis/nanopore/fastq/test.fastq.gz && \
minimap2 -x map-ont genome.fna.gz test.fastq.gz > test.paf && \
racon -t 2 test.fastq.gz test.paf genome.fna.gz > test_polished.fasta && \
head test_polished.fasta
46 changes: 46 additions & 0 deletions racon/1.5.0-minimap2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Racon + Minimap2 Container

This container combines [Racon](https://github.com/lbcb-sci/racon) and [Minimap2](https://github.com/lh3/minimap2) for efficient polishing and alignment in long-read assembly workflows.

## Tools Included
- **Racon**: Polishes long-read assemblies.
- **Minimap2**: Generates alignments for use with Racon and other polishing tools.

### Code Repositories
- Racon: [GitHub Repository](https://github.com/lbcb-sci/racon)
- Minimap2: [GitHub Repository](https://github.com/lh3/minimap2)

## Basic Information

### Racon
- **Executable**: `racon`
- **Help**: `racon -h`
- **Version**: `racon -v`
- **Description**:
> Racon is intended as a standalone consensus module to correct raw contigs generated by rapid assembly methods that do not include a consensus step.
### Minimap2
- **Executable**: `minimap2`
- **Help**: `minimap2 -h`
- **Version**: `minimap2 --version`
- **Description**:
> Minimap2 is a versatile sequence alignment program that aligns DNA or mRNA sequences against a large reference database.
## Example Usage

```bash
# Racon general
racon <sequences> <overlaps> <target sequences>

# more specific
racon --match 8 --mismatch -6 --gap -8 --window-length 500 --threads {threads} {input.reads} {input.alignment} {input.assembly}

#Combined Racon and Minimap2 Workflow

#Align Reads to Assembly Using Minimap2:
minimap2 -x map-ont <assembly.fasta> <reads.fastq> > overlaps.paf

#polish assembly using Racon
racon --threads {threads} <reads.fastq> overlaps.paf <assembly.fasta> > polished_assembly.fasta
```

2 changes: 1 addition & 1 deletion racon/1.5.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ racon <sequences> <overlaps> <target sequences>

# more specific
racon --match 8 --mismatch -6 --gap -8 --window-length 500 --threads {threads} {input.reads} {input.alignment} {input.assembly}
```
```

0 comments on commit 8d47afe

Please sign in to comment.