From 6dae6580482debc8eb15dac44ec8e8db3f216fe8 Mon Sep 17 00:00:00 2001 From: Fraser Combe Date: Tue, 3 Dec 2024 17:19:12 +0000 Subject: [PATCH 1/2] Update Racon 1.5.0-minimap2 details --- README.md | 2 +- racon/1.5.0-minimap2/Dockerfile | 104 ++++++++++++++++++++++++++++++++ racon/1.5.0/README.md | 45 ++++++++++---- 3 files changed, 139 insertions(+), 12 deletions(-) create mode 100644 racon/1.5.0-minimap2/Dockerfile diff --git a/README.md b/README.md index 4e9c58238..b599d1de7 100644 --- a/README.md +++ b/README.md @@ -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/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pypolca)](https://hub.docker.com/r/staphb/pypolca) | | https://github.com/gbouras13/pypolca | | [QUAST](https://hub.docker.com/r/staphb/quast/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/quast)](https://hub.docker.com/r/staphb/quast) | | https://github.com/ablab/quast | | [QuickSNP](https://hub.docker.com/r/staphb/quicksnp/)
[![docker pulls](https://badgen.net/docker/pulls/staphb/quicksnp)](https://hub.docker.com/r/staphb/quicksnp) | | https://github.com/k-florek/QuickSNP | -| [racon](https://hub.docker.com/r/staphb/racon)
[![docker pulls](https://badgen.net/docker/pulls/staphb/racon)](https://hub.docker.com/r/staphb/racon)| |
  • https://github.com/lbcb-sci/racon
  • https://github.com/isovic/racon (ARCHIVED)
  • | +| [racon](https://hub.docker.com/r/staphb/racon)
    [![docker pulls](https://badgen.net/docker/pulls/staphb/racon)](https://hub.docker.com/r/staphb/racon)| |
  • https://github.com/lbcb-sci/racon
  • https://github.com/isovic/racon (ARCHIVED)
  • | | [rasusa](https://hub.docker.com/r/staphb/rasusa/)
    [![docker pulls](https://badgen.net/docker/pulls/staphb/rasusa)](https://hub.docker.com/r/staphb/rasusa) | | https://github.com/mbhall88/rasusa | | [raven](https://hub.docker.com/r/staphb/raven/)
    [![docker pulls](https://badgen.net/docker/pulls/staphb/raven)](https://hub.docker.com/r/staphb/raven) | | https://github.com/lbcb-sci/raven | | [RAxML](https://hub.docker.com/r/staphb/raxml/)
    [![docker pulls](https://badgen.net/docker/pulls/staphb/raxml)](https://hub.docker.com/r/staphb/raxml) | | https://github.com/stamatak/standard-RAxML | diff --git a/racon/1.5.0-minimap2/Dockerfile b/racon/1.5.0-minimap2/Dockerfile new file mode 100644 index 000000000..8bf0b6713 --- /dev/null +++ b/racon/1.5.0-minimap2/Dockerfile @@ -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="fraser.combe@theiagen.com" + +# 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 diff --git a/racon/1.5.0/README.md b/racon/1.5.0/README.md index d6b112207..64c9263a7 100644 --- a/racon/1.5.0/README.md +++ b/racon/1.5.0/README.md @@ -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) -> 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 # 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 > overlaps.paf + +#polish assembly using Racon +racon --threads {threads} overlaps.paf > polished_assembly.fasta ``` + From 91fe523a3e0ebfe7d8217509678ed16580aa3c28 Mon Sep 17 00:00:00 2001 From: Fraser Combe Date: Wed, 4 Dec 2024 01:04:57 +0000 Subject: [PATCH 2/2] update README and Dockerfile Racon-minimap2 --- racon/1.5.0-minimap2/Dockerfile | 8 ++++++ racon/1.5.0-minimap2/README.md | 46 ++++++++++++++++++++++++++++++++ racon/1.5.0/README.md | 47 +++++++++------------------------ 3 files changed, 66 insertions(+), 35 deletions(-) create mode 100644 racon/1.5.0-minimap2/README.md diff --git a/racon/1.5.0-minimap2/Dockerfile b/racon/1.5.0-minimap2/Dockerfile index 8bf0b6713..06446751b 100644 --- a/racon/1.5.0-minimap2/Dockerfile +++ b/racon/1.5.0-minimap2/Dockerfile @@ -59,6 +59,8 @@ 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" @@ -95,6 +97,12 @@ 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 && \ diff --git a/racon/1.5.0-minimap2/README.md b/racon/1.5.0-minimap2/README.md new file mode 100644 index 000000000..64c9263a7 --- /dev/null +++ b/racon/1.5.0-minimap2/README.md @@ -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 + +# 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 > overlaps.paf + +#polish assembly using Racon +racon --threads {threads} overlaps.paf > polished_assembly.fasta +``` + diff --git a/racon/1.5.0/README.md b/racon/1.5.0/README.md index 64c9263a7..8709d943d 100644 --- a/racon/1.5.0/README.md +++ b/racon/1.5.0/README.md @@ -1,46 +1,23 @@ -# Racon + Minimap2 Container +# racon 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. +Main tool : [racon](https://github.com/lbcb-sci/racon) -## Tools Included -- **Racon**: Polishes long-read assemblies. -- **Minimap2**: Generates alignments for use with Racon and other polishing tools. +Code repository: https://github.com/lbcb-sci/racon -### Code Repositories -- Racon: [GitHub Repository](https://github.com/lbcb-sci/racon) -- Minimap2: [GitHub Repository](https://github.com/lh3/minimap2) +Basic information on how to use this tool: +- executable: racon +- help: -h +- version: -v +- description: Polishes long read assemblies -## Basic Information +> Racon is intended as a standalone consensus module to correct raw contigs generated by rapid assembly methods which do not include a consensus step. -### 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 +# Example Usage ```bash -# Racon general +# general racon # 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 > overlaps.paf - -#polish assembly using Racon -racon --threads {threads} overlaps.paf > polished_assembly.fasta -``` - +``` \ No newline at end of file