Skip to content

Commit 8170693

Browse files
committed
Release minimap2-2.28 (r1209)
1 parent e3d8c70 commit 8170693

File tree

9 files changed

+45
-13
lines changed

9 files changed

+45
-13
lines changed

NEWS.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
Release 2.28-r1209 (27 March 2024)
2+
----------------------------------
3+
4+
Notable changes to minimap2:
5+
6+
* Bugfix: `--MD` was not working properly due to the addition of `--ds` in the
7+
last release (#1181 and #1182).
8+
9+
* New feature: added an experimental preset `lq:hqae` for aligning accurate
10+
long reads back to their assembly. It has been observed that `map-hifi` and
11+
`lr:hq` may produce many wrong alignments around centromeres when accurate
12+
long reads (PacBio HiFi or Nanopore duplex/Q20+) are mapped to a diploid
13+
assembly constructed from them. This new preset produces much more accurate
14+
alignment. It is still experimental and may be subjective to changes in
15+
future.
16+
17+
* Change: reduced the default `--cap-kalloc` to 500m to lower the peak
18+
memory consumption (#855).
19+
20+
Notable changes to mappy:
21+
22+
* Bugfix: mappy option struct was out of sync with minimap2 (#1177).
23+
24+
Minimap2 should output identical alignments to v2.27.
25+
26+
(2.28: 27 March 2024, r1209)
27+
28+
29+
130
Release 2.27-r1193 (12 March 2024)
231
----------------------------------
332

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ Detailed evaluations are available from the [minimap2 paper][doi] or the
7474
Minimap2 is optimized for x86-64 CPUs. You can acquire precompiled binaries from
7575
the [release page][release] with:
7676
```sh
77-
curl -L https://github.com/lh3/minimap2/releases/download/v2.27/minimap2-2.27_x64-linux.tar.bz2 | tar -jxvf -
78-
./minimap2-2.27_x64-linux/minimap2
77+
curl -L https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 | tar -jxvf -
78+
./minimap2-2.28_x64-linux/minimap2
7979
```
8080
If you want to compile from the source, you need to have a C compiler, GNU make
8181
and zlib development files installed. Then type `make` in the source code

cookbook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ To acquire the data used in this cookbook and to install minimap2 and paftools,
3131
please follow the command lines below:
3232
```sh
3333
# install minimap2 executables
34-
curl -L https://github.com/lh3/minimap2/releases/download/v2.27/minimap2-2.27_x64-linux.tar.bz2 | tar jxf -
35-
cp minimap2-2.27_x64-linux/{minimap2,k8,paftools.js} . # copy executables
34+
curl -L https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 | tar jxf -
35+
cp minimap2-2.28_x64-linux/{minimap2,k8,paftools.js} . # copy executables
3636
export PATH="$PATH:"`pwd` # put the current directory on PATH
3737
# download example datasets
3838
curl -L https://github.com/lh3/minimap2/releases/download/v2.10/cookbook-data.tgz | tar zxf -

minimap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <stdio.h>
66
#include <sys/types.h>
77

8-
#define MM_VERSION "2.27-r1208-dirty"
8+
#define MM_VERSION "2.28-r1209"
99

1010
#define MM_F_NO_DIAG (0x001LL) // no exact diagonal hit
1111
#define MM_F_NO_DUAL (0x002LL) // skip pairs where query name is lexicographically larger than target name

minimap2.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH minimap2 1 "12 March 2024" "minimap2-2.27 (r1193)" "Bioinformatics tools"
1+
.TH minimap2 1 "12 March 2024" "minimap2-2.28 (r1209)" "Bioinformatics tools"
22
.SH NAME
33
.PP
44
minimap2 - mapping and alignment between collections of DNA sequences
@@ -468,7 +468,7 @@ Set 0 to disable [100m].
468468
.BI --cap-kalloc \ NUM
469469
Free thread-local kalloc memory reservoir if after the alignment the size of the reservoir above
470470
.IR NUM .
471-
Set 0 to disable [0].
471+
Set 0 to disable [500m].
472472
.SS Input/output options
473473
.TP 10
474474
.B -a

misc/paftools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env k8
22

3-
var paftools_version = '2.27-r1197-dirty';
3+
var paftools_version = '2.28-r1209';
44

55
/*****************************
66
***** Library functions *****

python/mappy.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ from libc.stdlib cimport free
33
cimport cmappy
44
import sys
55

6-
__version__ = '2.27'
6+
__version__ = '2.28'
77

88
cmappy.mm_reset_timer()
99

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

101102
cdef class ThreadBuffer:

python/minimap2.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import mappy as mp
66

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

2122
preset = min_cnt = min_sc = k = w = bw = None
22-
out_cs = False
23+
out_cs = out_MD = False
2324
for opt, arg in opts:
2425
if opt == '-x': preset = arg
2526
elif opt == '-n': min_cnt = int(arg)
@@ -28,11 +29,12 @@ def main(argv):
2829
elif opt == '-k': k = int(arg)
2930
elif opt == '-w': w = int(arg)
3031
elif opt == '-c': out_cs = True
32+
elif opt == '-M': out_MD = True
3133

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

3840
if __name__ == "__main__":

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def readme():
2323

2424
setup(
2525
name = 'mappy',
26-
version = '2.27',
26+
version = '2.28',
2727
url = 'https://github.com/lh3/minimap2',
2828
description = 'Minimap2 python binding',
2929
long_description = readme(),

0 commit comments

Comments
 (0)