diff --git a/NEWS.md b/NEWS.md index d72e8ba1..afb457cd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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) ---------------------------------- diff --git a/README.md b/README.md index 056dd5d7..c94ba855 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cookbook.md b/cookbook.md index c337d050..945d923a 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.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 - diff --git a/minimap.h b/minimap.h index c795d123..015f4a88 100644 --- a/minimap.h +++ b/minimap.h @@ -5,7 +5,7 @@ #include #include -#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 diff --git a/minimap2.1 b/minimap2.1 index 4ceee1ee..9e15ccdd 100644 --- a/minimap2.1 +++ b/minimap2.1 @@ -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 @@ -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 diff --git a/misc/paftools.js b/misc/paftools.js index ffd65976..24405e38 100755 --- a/misc/paftools.js +++ b/misc/paftools.js @@ -1,6 +1,6 @@ #!/usr/bin/env k8 -var paftools_version = '2.27-r1197-dirty'; +var paftools_version = '2.28-r1209'; /***************************** ***** Library functions ***** diff --git a/python/mappy.pyx b/python/mappy.pyx index c51f0646..0a6b93cd 100644 --- a/python/mappy.pyx +++ b/python/mappy.pyx @@ -3,7 +3,7 @@ from libc.stdlib cimport free cimport cmappy import sys -__version__ = '2.27' +__version__ = '2.28' cmappy.mm_reset_timer() @@ -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: diff --git a/python/minimap2.py b/python/minimap2.py index ce396e2d..db6125da 100755 --- a/python/minimap2.py +++ b/python/minimap2.py @@ -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] | ") print("Options:") @@ -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) @@ -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__": diff --git a/setup.py b/setup.py index 04db5b18..775168a6 100644 --- a/setup.py +++ b/setup.py @@ -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(),