Skip to content

Commit

Permalink
Release minimap2-2.28 (r1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
lh3 committed Mar 27, 2024
1 parent e3d8c70 commit 8170693
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 13 deletions.
29 changes: 29 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
Release 2.28-r1209 (27 March 2024)
----------------------------------

Notable changes to minimap2:

* Bugfix: `--MD` was not working properly due to the addition of `--ds` in the
last release (#1181 and #1182).

* New feature: added an experimental preset `lq:hqae` for aligning accurate
long reads back to their assembly. It has been observed that `map-hifi` and
`lr:hq` may produce many wrong alignments around centromeres when accurate
long reads (PacBio HiFi or Nanopore duplex/Q20+) are mapped to a diploid
assembly constructed from them. This new preset produces much more accurate
alignment. It is still experimental and may be subjective to changes in
future.

* Change: reduced the default `--cap-kalloc` to 500m to lower the peak
memory consumption (#855).

Notable changes to mappy:

* Bugfix: mappy option struct was out of sync with minimap2 (#1177).

Minimap2 should output identical alignments to v2.27.

(2.28: 27 March 2024, r1209)



Release 2.27-r1193 (12 March 2024)
----------------------------------

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,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.27/minimap2-2.27_x64-linux.tar.bz2 | tar -jxvf -
./minimap2-2.27_x64-linux/minimap2
curl -L https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 | tar -jxvf -
./minimap2-2.28_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
Expand Down
4 changes: 2 additions & 2 deletions cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.27/minimap2-2.27_x64-linux.tar.bz2 | tar jxf -
cp minimap2-2.27_x64-linux/{minimap2,k8,paftools.js} . # copy executables
curl -L https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 | tar jxf -
cp minimap2-2.28_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 -
Expand Down
2 changes: 1 addition & 1 deletion minimap.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdio.h>
#include <sys/types.h>

#define MM_VERSION "2.27-r1208-dirty"
#define MM_VERSION "2.28-r1209"

#define MM_F_NO_DIAG (0x001LL) // no exact diagonal hit
#define MM_F_NO_DUAL (0x002LL) // skip pairs where query name is lexicographically larger than target name
Expand Down
4 changes: 2 additions & 2 deletions minimap2.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH minimap2 1 "12 March 2024" "minimap2-2.27 (r1193)" "Bioinformatics tools"
.TH minimap2 1 "12 March 2024" "minimap2-2.28 (r1209)" "Bioinformatics tools"
.SH NAME
.PP
minimap2 - mapping and alignment between collections of DNA sequences
Expand Down Expand Up @@ -468,7 +468,7 @@ Set 0 to disable [100m].
.BI --cap-kalloc \ NUM
Free thread-local kalloc memory reservoir if after the alignment the size of the reservoir above
.IR NUM .
Set 0 to disable [0].
Set 0 to disable [500m].
.SS Input/output options
.TP 10
.B -a
Expand Down
2 changes: 1 addition & 1 deletion misc/paftools.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env k8

var paftools_version = '2.27-r1197-dirty';
var paftools_version = '2.28-r1209';

/*****************************
***** Library functions *****
Expand Down
3 changes: 2 additions & 1 deletion python/mappy.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from libc.stdlib cimport free
cimport cmappy
import sys

__version__ = '2.27'
__version__ = '2.28'

cmappy.mm_reset_timer()

Expand Down Expand Up @@ -96,6 +96,7 @@ cdef class Alignment:
a = [str(self._q_st), str(self._q_en), strand, self._ctg, str(self._ctg_len), str(self._r_st), str(self._r_en),
str(self._mlen), str(self._blen), str(self._mapq), tp, ts, "cg:Z:" + self.cigar_str]
if self._cs != "": a.append("cs:Z:" + self._cs)
if self._MD != "": a.append("MD:Z:" + self._MD)
return "\t".join(a)

cdef class ThreadBuffer:
Expand Down
8 changes: 5 additions & 3 deletions python/minimap2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import mappy as mp

def main(argv):
opts, args = getopt.getopt(argv[1:], "x:n:m:k:w:r:c")
opts, args = getopt.getopt(argv[1:], "x:n:m:k:w:r:cM")
if len(args) < 2:
print("Usage: minimap2.py [options] <ref.fa>|<ref.mmi> <query.fq>")
print("Options:")
Expand All @@ -16,10 +16,11 @@ def main(argv):
print(" -w INT minimizer window length")
print(" -r INT band width")
print(" -c output the cs tag")
print(" -M output the MD tag")
sys.exit(1)

preset = min_cnt = min_sc = k = w = bw = None
out_cs = False
out_cs = out_MD = False
for opt, arg in opts:
if opt == '-x': preset = arg
elif opt == '-n': min_cnt = int(arg)
Expand All @@ -28,11 +29,12 @@ def main(argv):
elif opt == '-k': k = int(arg)
elif opt == '-w': w = int(arg)
elif opt == '-c': out_cs = True
elif opt == '-M': out_MD = True

a = mp.Aligner(args[0], preset=preset, min_cnt=min_cnt, min_chain_score=min_sc, k=k, w=w, bw=bw)
if not a: raise Exception("ERROR: failed to load/build index file '{}'".format(args[0]))
for name, seq, qual in mp.fastx_read(args[1]): # read one sequence
for h in a.map(seq, cs=out_cs): # traverse hits
for h in a.map(seq, cs=out_cs, MD=out_MD): # traverse hits
print('{}\t{}\t{}'.format(name, len(seq), h))

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def readme():

setup(
name = 'mappy',
version = '2.27',
version = '2.28',
url = 'https://github.com/lh3/minimap2',
description = 'Minimap2 python binding',
long_description = readme(),
Expand Down

0 comments on commit 8170693

Please sign in to comment.