Skip to content

Commit

Permalink
adding minimap2 2.27 (#911)
Browse files Browse the repository at this point in the history
* adding minimap2 2.27

* added in test files
  • Loading branch information
erinyoung authored Mar 27, 2024
1 parent 09aafb6 commit 767e293
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [medaka](https://hub.docker.com/r/staphb/medaka) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/medaka)](https://hub.docker.com/r/staphb/medaka) | <ul><li>0.8.1</li><li>1.0.1</li><li>1.2.0</li></ul> | https://github.com/nanoporetech/medaka |
| [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) | <ul><li>3.0.3-no-db (no database)</li><li> 3.0.3 (~3GB db)</li><li>[4.1.0](./metaphlan/4.1.0/) (no database)</li></ul> | https://github.com/biobakery/MetaPhlAn |
| [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) | <ul><li>1.3.2 (no database)</li> | https://github.com/snayfach/MIDAS |
| [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) | <ul><li>2.17</li><li>2.18</li><li>2.21</li><li>2.22</li><li>2.23</li><li>2.24</li><li>2.25</li><li>[2.26](./minimap2/2.26)</li></ul> | https://github.com/lh3/minimap2 |
| [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) | <ul><li>2.17</li><li>2.18</li><li>2.21</li><li>2.22</li><li>2.23</li><li>2.24</li><li>2.25</li><li>[2.26](./minimap2/2.26)</li><li>[2.27](./minimap2/2.27/)</li></ul> | https://github.com/lh3/minimap2 |
| [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) | <ul><li>0.1.3</li></ul> | https://github.com/rrwick/Minipolish |
| [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) | <ul><li>2.16.2</li><li>2.17.6</li><li>2.19.0</li><li>2.22.0</li><li>2.22.1</li><li>2.23.0</li><li>[2.23.0-2023-07 (databases updated July 2023)](mlst/2.23.0-2023-07/)</li><li>[2.23.0-2023-08 (databases updated Aug 2023)](mlst/2.23.0-2023-08/)</li><li>[2.23.0-2024-01 (databases updated Jan 2024)](mlst/2.23.0-2024-01/)</li><li>[2.23.0-2024-03 (databases updated March 2024)](mlst/2.23.0-2024-03/)</li></ul> | https://github.com/tseemann/mlst |
| [Mugsy](https://hub.docker.com/r/staphb/mugsy) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/mugsy)](https://hub.docker.com/r/staphb/mugsy) | <ul><li>1r2.3</li></ul> | http://mugsy.sourceforge.net/ |
Expand Down
68 changes: 68 additions & 0 deletions minimap2/2.27/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM ubuntu:jammy as app

# for easy upgrade later. ARG variables only persist during image build time
ARG MINIMAP2_VER="2.27"

# metadata
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="Minimap2"
LABEL software.version="${MINIMAP2_VER}"
LABEL description="versatile sequence alignment program that aligns DNA or mRNA sequences against a large reference database"
LABEL website="https://github.com/lh3/minimap2"
LABEL license="https://github.com/lh3/minimap2/blob/master/LICENSE.txt"
LABEL maintainer="Kelsey Florek"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Curtis Kapsak"
LABEL maintainer2.email="[email protected]"

# install deps and cleanup apt garbage
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
bzip2 \
procps && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

# install minimap2 binary; make /data
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 && \
mkdir /data

# set final PATH and LC_ALL for singularity compatibility
ENV PATH="${PATH}:/minimap2-${MINIMAP2_VER}_x64-linux" \
LC_ALL=C

# set final working directory as /data
WORKDIR /data

CMD minimap2 -h

# test layer
FROM app as test

RUN minimap2 -h

# use /test as working directory for tests
WORKDIR /test

# git clone minimap2 github repo solely for the purpose of getting test data files
# the minimap2 command used below is that installed in the 'app' layer, proven by the output of "command -v minimap2"
# lastly, I'm using the test commands listed here: https://github.com/lh3/minimap2#getting-started
RUN apt-get update && apt-get install -y --no-install-recommends git wget && \
git clone https://github.com/lh3/minimap2 && \
cd minimap2 && \
echo && \
echo "double checking that the 'minimap2' command used below is the executable installed in the app stage of the docker image. Here is the path:" && \
command -v minimap2 && \
echo && \
minimap2 -a test/MT-human.fa test/MT-orang.fa > test.sam && \
minimap2 -x map-ont -d MT-human-ont.mmi test/MT-human.fa && \
minimap2 -a MT-human-ont.mmi test/MT-orang.fa > test.sam && \
minimap2 --version

# downloading some actual data
RUN wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/943/119/195/GCA_943119195.1_2015LSAL00020/GCA_943119195.1_2015LSAL00020_genomic.fna.gz && \
gzip -d GCA_943119195.1_2015LSAL00020_genomic.fna.gz && \
wget https://zenodo.org/records/10733190/files/df_test_files.tar.gz && \
tar -xvf df_test_files.tar.gz && \
minimap2 -x lr:hq -a GCA_943119195.1_2015LSAL00020_genomic.fna test_files/test.fastq.gz > lrhq_test.sam
31 changes: 31 additions & 0 deletions minimap2/2.27/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# minimap2 container

Main tool : [minimap2](https://github.com/lh3/minimap2)

Additional tools:

- none (apart from basic linux utilties included in `ubuntu:jammy` base docker image, like `ls`, `mkdir`, etc.)

Publication: [https://academic.oup.com/bioinformatics/article/34/18/3094/4994778?login=false](https://academic.oup.com/bioinformatics/article/34/18/3094/4994778?login=false)

Minimap2 is a versatile sequence alignment program that aligns DNA or mRNA sequences against a large reference database.

## Example Usage

These example commands were copy/pasted directly from: [https://github.com/lh3/minimap2#getting-started](https://github.com/lh3/minimap2#getting-started)

```bash
# use presets (no test data)
minimap2 -ax map-pb ref.fa pacbio.fq.gz > aln.sam # PacBio CLR genomic reads
minimap2 -ax map-ont ref.fa ont.fq.gz > aln.sam # Oxford Nanopore genomic reads
minimap2 -ax map-hifi ref.fa pacbio-ccs.fq.gz > aln.sam # PacBio HiFi/CCS genomic reads (v2.19 or later)
minimap2 -ax lr:hq ref.fa ont-Q20.fq.gz > aln.sam # Nanopore Q20 genomic reads (v2.27 or later)
minimap2 -ax sr ref.fa read1.fa read2.fa > aln.sam # short genomic paired-end reads
minimap2 -ax splice ref.fa rna-reads.fa > aln.sam # spliced long reads (strand unknown)
minimap2 -ax splice -uf -k14 ref.fa reads.fa > aln.sam # noisy Nanopore Direct RNA-seq
minimap2 -ax splice:hq -uf ref.fa query.fa > aln.sam # Final PacBio Iso-seq or traditional cDNA
minimap2 -ax splice --junc-bed anno.bed12 ref.fa query.fa > aln.sam # prioritize on annotated junctions
minimap2 -cx asm5 asm1.fa asm2.fa > aln.paf # intra-species asm-to-asm alignment
minimap2 -x ava-pb reads.fa reads.fa > overlaps.paf # PacBio read overlap
minimap2 -x ava-ont reads.fa reads.fa > overlaps.paf # Nanopore read overlap
```

0 comments on commit 767e293

Please sign in to comment.