-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding minimap2 2.27 * added in test files
- Loading branch information
Showing
3 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |