diff --git a/NEWS.md b/NEWS.md index 7cb5401..5c0ab9c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,31 @@ +Release 2.17-r941 (4 May 2019) +------------------------------ + +Changes since the last release: + + * Fixed flawed CIGARs like `5I6D7I` (#392). + + * Bugfix: TLEN should be 0 when either end is unmapped (#373 and #365). + + * Bugfix: mappy is unable to write index (#372). + + * Added option `--junc-bed` to load known gene annotations in the BED12 + format. Minimap2 prefers annotated junctions over novel junctions (#197 and + #348). GTF can be converted to BED12 with `paftools.js gff2bed`. + + * Added option `--sam-hit-only` to suppress unmapped hits in SAM (#377). + + * Added preset `splice:hq` for high-quality CCS or mRNA sequences. It applies + better scoring and improves the sensitivity to small exons. This preset may + introduce false small introns, but the overall accuracy should be higher. + +This version produces nearly identical alignments to v2.16, except for CIGARs +affected by the bug mentioned above. + +(2.17: 5 May 2019, r941) + + + Release 2.16-r922 (28 February 2019) ------------------------------------ diff --git a/README.md b/README.md index 11088d9..5e39daf 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ cd minimap2 && make ./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 -uf -C5 ref.fa query.fa > aln.sam # Final PacBio Iso-seq or traditional cDNA +./minimap2 -ax splice:hq -uf ref.fa query.fa > aln.sam # Final PacBio Iso-seq or traditional cDNA ./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 @@ -71,8 +71,8 @@ Detailed evaluations are available from the [minimap2 paper][doi] or the Minimap2 is optimized for x86-64 CPUs. You can acquire precompiled binaries from the [release page][release] with: ```sh -curl -L https://github.com/lh3/minimap2/releases/download/v2.16/minimap2-2.16_x64-linux.tar.bz2 | tar -jxvf - -./minimap2-2.16_x64-linux/minimap2 +curl -L https://github.com/lh3/minimap2/releases/download/v2.17/minimap2-2.17_x64-linux.tar.bz2 | tar -jxvf - +./minimap2-2.17_x64-linux/minimap2 ``` If you want to compile from the source, you need to have a C compiler, GNU make and zlib development files installed. Then type `make` in the source code @@ -139,7 +139,7 @@ Nanopore reads. #### Map long mRNA/cDNA reads ```sh -minimap2 -ax splice -uf -C5 ref.fa iso-seq.fq > aln.sam # PacBio Iso-seq/traditional cDNA +minimap2 -ax splice:hq -uf ref.fa iso-seq.fq > aln.sam # PacBio Iso-seq/traditional cDNA minimap2 -ax splice ref.fa nanopore-cdna.fa > aln.sam # Nanopore 2D cDNA-seq minimap2 -ax splice -uf -k14 ref.fa direct-rna.fq > aln.sam # Nanopore Direct RNA-seq minimap2 -ax splice --splice-flank=no SIRV.fa SIRV-seq.fa # mapping against SIRV control diff --git a/cookbook.md b/cookbook.md index ce581bc..6cb4d5f 100644 --- a/cookbook.md +++ b/cookbook.md @@ -31,8 +31,8 @@ To acquire the data used in this cookbook and to install minimap2 and paftools, please follow the command lines below: ```sh # install minimap2 executables -curl -L https://github.com/lh3/minimap2/releases/download/v2.16/minimap2-2.16_x64-linux.tar.bz2 | tar jxf - -cp minimap2-2.16_x64-linux/{minimap2,k8,paftools.js} . # copy executables +curl -L https://github.com/lh3/minimap2/releases/download/v2.17/minimap2-2.17_x64-linux.tar.bz2 | tar jxf - +cp minimap2-2.17_x64-linux/{minimap2,k8,paftools.js} . # copy executables export PATH="$PATH:"`pwd` # put the current directory on PATH # download example datasets curl -L https://github.com/lh3/minimap2/releases/download/v2.10/cookbook-data.tgz | tar zxf - diff --git a/main.c b/main.c index 49b6ab1..29257e4 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ #include "mmpriv.h" #include "ketopt.h" -#define MM_VERSION "2.16-r937-dirty" +#define MM_VERSION "2.17-r943-dirty" #ifdef __linux__ #include diff --git a/minimap2.1 b/minimap2.1 index 73e1154..21b84bd 100644 --- a/minimap2.1 +++ b/minimap2.1 @@ -1,4 +1,4 @@ -.TH minimap2 1 "30 April 2019" "minimap2-2.16-dirty (r938)" "Bioinformatics tools" +.TH minimap2 1 "4 May 2019" "minimap2-2.17 (r941)" "Bioinformatics tools" .SH NAME .PP minimap2 - mapping and alignment between collections of DNA sequences @@ -568,6 +568,12 @@ costs are different during chaining; 4) the computation of the .RB ` ms ' tag ignores introns to demote hits to pseudogenes. .TP +.B splice:hq +Long-read splice alignment for PacBio CCS reads +.RB ( -xsplice +.B -C5 -O6,24 +.BR -B4 ). +.TP .B sr Short single-end reads without splicing .RB ( -k21 diff --git a/misc/paftools.js b/misc/paftools.js index 6e60bc4..a4a8c0e 100755 --- a/misc/paftools.js +++ b/misc/paftools.js @@ -1,6 +1,6 @@ #!/usr/bin/env k8 -var paftools_version = '2.16-r933-dirty'; +var paftools_version = '2.17-r941'; /***************************** ***** Library functions ***** diff --git a/options.c b/options.c index ac1e5e1..2e6a43a 100644 --- a/options.c +++ b/options.c @@ -120,7 +120,7 @@ int mm_set_opt(const char *preset, mm_idxopt_t *io, mm_mapopt_t *mo) mo->mid_occ = 1000; mo->max_occ = 5000; mo->mini_batch_size = 50000000; - } else if (strcmp(preset, "splice") == 0 || strcmp(preset, "cdna") == 0) { + } else if (strncmp(preset, "splice", 6) == 0 || strcmp(preset, "cdna") == 0) { io->flag = 0, io->k = 15, io->w = 5; mo->flag |= MM_F_SPLICE | MM_F_SPLICE_FOR | MM_F_SPLICE_REV | MM_F_SPLICE_FLANK; mo->max_gap = 2000, mo->max_gap_ref = mo->bw = 200000; @@ -128,6 +128,8 @@ int mm_set_opt(const char *preset, mm_idxopt_t *io, mm_mapopt_t *mo) mo->noncan = 9; mo->junc_bonus = 9; mo->zdrop = 200, mo->zdrop_inv = 100; // because mo->a is halved + if (strcmp(preset, "splice:hq") == 0) + mo->junc_bonus = 5, mo->b = 4, mo->q = 6, mo->q2 = 24; } else return -1; return 0; } diff --git a/python/mappy.pyx b/python/mappy.pyx index 8c68920..f036450 100644 --- a/python/mappy.pyx +++ b/python/mappy.pyx @@ -3,7 +3,7 @@ from libc.stdlib cimport free cimport cmappy import sys -__version__ = '2.16' +__version__ = '2.17' cmappy.mm_reset_timer() diff --git a/setup.py b/setup.py index b61a5e2..042911c 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def readme(): setup( name = 'mappy', - version = '2.16', + version = '2.17', url = 'https://github.com/lh3/minimap2', description = 'Minimap2 python binding', long_description = readme(), diff --git a/splitidx.c b/splitidx.c index 1054a64..69f4864 100644 --- a/splitidx.c +++ b/splitidx.c @@ -19,9 +19,9 @@ FILE *mm_split_init(const char *prefix, const mm_idx_t *mi) mm_err_fwrite(&k, 4, 1, fp); mm_err_fwrite(&mi->n_seq, 4, 1, fp); for (i = 0; i < mi->n_seq; ++i) { - uint8_t l; + uint32_t l; l = strlen(mi->seq[i].name); - mm_err_fwrite(&l, 1, 1, fp); + mm_err_fwrite(&l, 1, 4, fp); mm_err_fwrite(mi->seq[i].name, 1, l, fp); mm_err_fwrite(&mi->seq[i].len, 4, 1, fp); } @@ -60,8 +60,8 @@ mm_idx_t *mm_split_merge_prep(const char *prefix, int n_splits, FILE **fp, uint3 for (i = j = 0; i < n_splits; ++i) { uint32_t k; for (k = 0; k < n_seq_part[i]; ++k, ++j) { - uint8_t l; - mm_err_fread(&l, 1, 1, fp[i]); + uint32_t l; + mm_err_fread(&l, 1, 4, fp[i]); mi->seq[j].name = (char*)calloc(l + 1, 1); mm_err_fread(mi->seq[j].name, 1, l, fp[i]); mm_err_fread(&mi->seq[j].len, 4, 1, fp[i]);