Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Racon 1.5.0 to include minimap2 #1115

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,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
104 changes: 104 additions & 0 deletions racon/1.5.0-minimap2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
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 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

# 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
fraser-combe marked this conversation as resolved.
Show resolved Hide resolved
45 changes: 34 additions & 11 deletions racon/1.5.0/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
# racon container
# Racon + Minimap2 Container

Main tool : [racon](https://github.com/lbcb-sci/racon)
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.

Code repository: https://github.com/lbcb-sci/racon
## Tools Included
- **Racon**: Polishes long-read assemblies.
- **Minimap2**: Generates alignments for use with Racon and other polishing tools.

Basic information on how to use this tool:
- executable: racon
- help: -h
- version: -v
- description: Polishes long read assemblies
### Code Repositories
- Racon: [GitHub Repository](https://github.com/lbcb-sci/racon)
- Minimap2: [GitHub Repository](https://github.com/lh3/minimap2)
fraser-combe marked this conversation as resolved.
Show resolved Hide resolved

> Racon is intended as a standalone consensus module to correct raw contigs generated by rapid assembly methods which do not include a consensus step.
## Basic Information

# Example Usage
### 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
# general
# 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
```

Loading