minimap2 0.2.27.0 → 0.2.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f618028eabf476209264541d9037f68961548eb02dad4a22338bacdfe383fce7
4
- data.tar.gz: f97eb69e9b1e78357cd738ba2a63ce36034e0fbd7c253c5a89a14b23ade19b01
3
+ metadata.gz: f23caa7c5707d41b96b6df1748d257e11bed0554cbc2123d5dca31ef22b9bb05
4
+ data.tar.gz: 6ab72bef6ad874385871460d55503696969c8dc381896873d64c821538bbfd57
5
5
  SHA512:
6
- metadata.gz: 1ab742822a921c06f31671b0a555a0220cc9b2d0dc2e9d6ef7b72ff90fbc33de4d2f9285819b5064a28e3789065290e21f7e4dedb162c9927aefd8c860ceea35
7
- data.tar.gz: 8d0b005004a1ac625a61d8a68073b31c08b4d156308ebfa01e18508e2ed520d948fa5d2a2e4804978a0846abc90bdc142183ae2d7d2c466cb2b00f87afff4d71
6
+ metadata.gz: 4327be493c432ba562780e79aceff0f53d409a1ff2c5630cde48ad28b4c338fdc9bab2a333087f1e2aa8cd83e2374ce3a7feec9e5133aaeb4c01c3011b0414db
7
+ data.tar.gz: adc86c65a0dbeb775b89385790894cf3ad2fa1c24cdb0b0a9d94302134910ee651afc832dc0b8864c3a24b6b86577ccd694e46effb1a95ecf6bea5e968d189ad
data/ext/minimap2/NEWS.md CHANGED
@@ -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
+
1
30
  Release 2.27-r1193 (12 March 2024)
2
31
  ----------------------------------
3
32
 
@@ -74,8 +74,8 @@ Detailed evaluations are available from the [minimap2 paper][doi] or the
74
74
  Minimap2 is optimized for x86-64 CPUs. You can acquire precompiled binaries from
75
75
  the [release page][release] with:
76
76
  ```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
79
79
  ```
80
80
  If you want to compile from the source, you need to have a C compiler, GNU make
81
81
  and zlib development files installed. Then type `make` in the source code
data/ext/minimap2/align.c CHANGED
@@ -933,14 +933,14 @@ double mm_event_identity(const mm_reg1_t *r)
933
933
  static int32_t mm_recal_max_dp(const mm_reg1_t *r, double b2, int32_t match_sc)
934
934
  {
935
935
  uint32_t i;
936
- int32_t n_gap = 0, n_gapo = 0, n_mis;
936
+ int32_t n_gap = 0, n_mis;
937
937
  double gap_cost = 0.0;
938
938
  if (r->p == 0) return -1;
939
939
  for (i = 0; i < r->p->n_cigar; ++i) {
940
940
  int32_t op = r->p->cigar[i] & 0xf, len = r->p->cigar[i] >> 4;
941
941
  if (op == MM_CIGAR_INS || op == MM_CIGAR_DEL) {
942
942
  gap_cost += b2 + (double)mg_log2(1.0 + len);
943
- ++n_gapo, n_gap += len;
943
+ n_gap += len;
944
944
  }
945
945
  }
946
946
  n_mis = r->blen + r->p->n_ambi - r->mlen - n_gap;
@@ -31,8 +31,8 @@ To acquire the data used in this cookbook and to install minimap2 and paftools,
31
31
  please follow the command lines below:
32
32
  ```sh
33
33
  # 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
36
36
  export PATH="$PATH:"`pwd` # put the current directory on PATH
37
37
  # download example datasets
38
38
  curl -L https://github.com/lh3/minimap2/releases/download/v2.10/cookbook-data.tgz | tar zxf -
@@ -310,7 +310,7 @@ static void write_cs_ds_or_MD(void *km, kstring_t *s, const mm_idx_t *mi, const
310
310
  }
311
311
  }
312
312
  }
313
- if (is_MD == 1) write_MD_core(s, tseq, qseq, r, tmp, write_tag);
313
+ if (is_MD) write_MD_core(s, tseq, qseq, r, tmp, write_tag);
314
314
  else write_cs_ds_core(s, tseq, qseq, r, tmp, no_iden, is_ds, write_tag);
315
315
  kfree(km, qseq); kfree(km, tseq); kfree(km, tmp);
316
316
  }
@@ -393,7 +393,7 @@ void mm_write_paf3(kstring_t *s, const mm_idx_t *mi, const mm_bseq1_t *t, const
393
393
  mm_sprintf_lite(s, "%d%c", r->p->cigar[k]>>4, MM_CIGAR_STR[r->p->cigar[k]&0xf]);
394
394
  }
395
395
  if (r->p && (opt_flag & (MM_F_OUT_CS|MM_F_OUT_DS|MM_F_OUT_MD)))
396
- write_cs_ds_or_MD(km, s, mi, t, r, !(opt_flag&MM_F_OUT_CS_LONG), opt_flag&MM_F_OUT_MD, !!(opt_flag&MM_F_OUT_DS), 1, !!(opt_flag&MM_F_QSTRAND));
396
+ write_cs_ds_or_MD(km, s, mi, t, r, !(opt_flag&MM_F_OUT_CS_LONG), !!(opt_flag&MM_F_OUT_MD), !!(opt_flag&MM_F_OUT_DS), 1, !!(opt_flag&MM_F_QSTRAND));
397
397
  if ((opt_flag & MM_F_COPY_COMMENT) && t->comment)
398
398
  mm_sprintf_lite(s, "\t%s", t->comment);
399
399
  }
@@ -149,7 +149,7 @@ mm128_t *mg_lchain_dp(int max_dist_x, int max_dist_y, int bw, int max_skip, int
149
149
  int is_cdna, int n_seg, int64_t n, mm128_t *a, int *n_u_, uint64_t **_u, void *km)
150
150
  { // TODO: make sure this works when n has more than 32 bits
151
151
  int32_t *f, *t, *v, n_u, n_v, mmax_f = 0, max_drop = bw;
152
- int64_t *p, i, j, max_ii, st = 0, n_iter = 0;
152
+ int64_t *p, i, j, max_ii, st = 0;
153
153
  uint64_t *u;
154
154
 
155
155
  if (_u) *_u = 0, *n_u_ = 0;
@@ -174,7 +174,6 @@ mm128_t *mg_lchain_dp(int max_dist_x, int max_dist_y, int bw, int max_skip, int
174
174
  for (j = i - 1; j >= st; --j) {
175
175
  int32_t sc;
176
176
  sc = comput_sc(&a[i], &a[j], max_dist_x, max_dist_y, bw, chn_pen_gap, chn_pen_skip, is_cdna, n_seg);
177
- ++n_iter;
178
177
  if (sc == INT32_MIN) continue;
179
178
  sc += f[j];
180
179
  if (sc > max_f) {
@@ -204,6 +203,7 @@ mm128_t *mg_lchain_dp(int max_dist_x, int max_dist_y, int bw, int max_skip, int
204
203
  if (max_ii < 0 || (a[i].x - a[max_ii].x <= (int64_t)max_dist_x && f[max_ii] < f[i]))
205
204
  max_ii = i;
206
205
  if (mmax_f < max_f) mmax_f = max_f;
206
+ //fprintf(stderr, "X1\t%ld\t%ld:%d\t%ld\t%ld:%d\t%ld\t%ld\n", (long)i, (long)(a[i].x>>32), (int32_t)a[i].x, (long)max_j, max_j<0?-1L:(long)(a[max_j].x>>32), max_j<0?-1:(int32_t)a[max_j].x, (long)max_f, (long)v[i]);
207
207
  }
208
208
 
209
209
  u = mg_chain_backtrack(km, n, f, p, v, t, min_cnt, min_sc, max_drop, &n_u, &n_v);
@@ -263,7 +263,8 @@ mm128_t *mg_lchain_rmq(int max_dist, int max_dist_inner, int bw, int max_chn_ski
263
263
  return 0;
264
264
  }
265
265
  if (max_dist < bw) max_dist = bw;
266
- if (max_dist_inner <= 0 || max_dist_inner >= max_dist) max_dist_inner = 0;
266
+ if (max_dist_inner < 0) max_dist_inner = 0;
267
+ if (max_dist_inner > max_dist) max_dist_inner = max_dist;
267
268
  p = Kmalloc(km, int64_t, n);
268
269
  f = Kmalloc(km, int32_t, n);
269
270
  t = Kcalloc(km, int32_t, n);
@@ -325,12 +326,11 @@ mm128_t *mg_lchain_rmq(int max_dist, int max_dist_inner, int bw, int max_chn_ski
325
326
  krmq_interval(lc_elem, root_inner, &s, &lo, &hi);
326
327
  if (lo) {
327
328
  const lc_elem_t *q;
328
- int32_t width, n_rmq_iter = 0;
329
+ int32_t width;
329
330
  krmq_itr_t(lc_elem) itr;
330
331
  krmq_itr_find(lc_elem, root_inner, lo, &itr);
331
332
  while ((q = krmq_at(&itr)) != 0) {
332
333
  if (q->y < (int32_t)a[i].y - max_dist_inner) break;
333
- ++n_rmq_iter;
334
334
  j = q->i;
335
335
  sc = f[j] + comput_sc_simple(&a[i], &a[j], chn_pen_gap, chn_pen_skip, 0, &width);
336
336
  if (width <= bw) {
data/ext/minimap2/main.c CHANGED
@@ -78,6 +78,8 @@ static ko_longopt_t long_options[] = {
78
78
  { "no-hash-name", ko_no_argument, 353 },
79
79
  { "secondary-seq", ko_no_argument, 354 },
80
80
  { "ds", ko_no_argument, 355 },
81
+ { "rmq-inner", ko_required_argument, 356 },
82
+ { "dbg-seed-occ", ko_no_argument, 501 },
81
83
  { "help", ko_no_argument, 'h' },
82
84
  { "max-intron-len", ko_required_argument, 'G' },
83
85
  { "version", ko_no_argument, 'V' },
@@ -245,6 +247,8 @@ int main(int argc, char *argv[])
245
247
  else if (c == 353) opt.flag |= MM_F_NO_HASH_NAME; // --no-hash-name
246
248
  else if (c == 354) opt.flag |= MM_F_SECONDARY_SEQ; // --secondary-seq
247
249
  else if (c == 355) opt.flag |= MM_F_OUT_DS; // --ds
250
+ else if (c == 356) opt.rmq_inner_dist = mm_parse_num(o.arg); // --rmq-inner
251
+ else if (c == 501) mm_dbg_flag |= MM_DBG_SEED_FREQ; // --dbg-seed-occ
248
252
  else if (c == 330) {
249
253
  fprintf(stderr, "[WARNING] \033[1;31m --lj-min-ratio has been deprecated.\033[0m\n");
250
254
  } else if (c == 314) { // --frag
@@ -5,7 +5,7 @@
5
5
  #include <stdio.h>
6
6
  #include <sys/types.h>
7
7
 
8
- #define MM_VERSION "2.27-r1193"
8
+ #define MM_VERSION "2.28-r1209"
9
9
 
10
10
  #define MM_F_NO_DIAG (0x001LL) // no exact diagonal hit
11
11
  #define MM_F_NO_DUAL (0x002LL) // skip pairs where query name is lexicographically larger than target name
@@ -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"
2
2
  .SH NAME
3
3
  .PP
4
4
  minimap2 - mapping and alignment between collections of DNA sequences
@@ -268,6 +268,11 @@ or more of the shorter chain [0.5]
268
268
  Use the minigraph chaining algorithm [no]. The minigraph algorithm is better
269
269
  for aligning contigs through long INDELs.
270
270
  .TP
271
+ .BI --rmq-inner \ NUM
272
+ Apply full dynamic programming for anchors within distance
273
+ .I NUM
274
+ [1000].
275
+ .TP
271
276
  .B --hard-mask-level
272
277
  Honor option
273
278
  .B -M
@@ -463,7 +468,7 @@ Set 0 to disable [100m].
463
468
  .BI --cap-kalloc \ NUM
464
469
  Free thread-local kalloc memory reservoir if after the alignment the size of the reservoir above
465
470
  .IR NUM .
466
- Set 0 to disable [0].
471
+ Set 0 to disable [500m].
467
472
  .SS Input/output options
468
473
  .TP 10
469
474
  .B -a
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env k8
2
2
 
3
- var paftools_version = '2.27-r1193';
3
+ var paftools_version = '2.28-r1209';
4
4
 
5
5
  /*****************************
6
6
  ***** Library functions *****
@@ -1740,15 +1740,17 @@ function paf_gff2bed(args)
1740
1740
 
1741
1741
  function paf_sam2paf(args)
1742
1742
  {
1743
- var c, pri_only = false, long_cs = false;
1744
- while ((c = getopt(args, "pL")) != null) {
1743
+ var c, pri_only = false, long_cs = false, pri_pri_only = false;
1744
+ while ((c = getopt(args, "pPL")) != null) {
1745
1745
  if (c == 'p') pri_only = true;
1746
+ else if (c == 'P') pri_pri_only = pri_only = true;
1746
1747
  else if (c == 'L') long_cs = true;
1747
1748
  }
1748
1749
  if (args.length == getopt.ind) {
1749
1750
  print("Usage: paftools.js sam2paf [options] <in.sam>");
1750
1751
  print("Options:");
1751
1752
  print(" -p convert primary or supplementary alignments only");
1753
+ print(" -P convert primary alignments only");
1752
1754
  print(" -L output the cs tag in the long form");
1753
1755
  exit(1);
1754
1756
  }
@@ -1775,6 +1777,7 @@ function paf_sam2paf(args)
1775
1777
  throw Error("at line " + lineno + ": inconsistent SEQ and QUAL lengths - " + t[9].length + " != " + t[10].length);
1776
1778
  if (t[2] == '*' || (flag&4) || t[5] == '*') continue;
1777
1779
  if (pri_only && (flag&0x100)) continue;
1780
+ if (pri_pri_only && (flag&0x900)) continue;
1778
1781
  var tlen = ctg_len[t[2]];
1779
1782
  if (tlen == null) throw Error("at line " + lineno + ": can't find the length of contig " + t[2]);
1780
1783
  // find tags
@@ -1887,7 +1890,10 @@ function paf_sam2paf(args)
1887
1890
  // optional tags
1888
1891
  var type = flag&0x100? 'S' : 'P';
1889
1892
  var tags = ["tp:A:" + type];
1890
- if (NM != null) tags.push("mm:i:"+mm);
1893
+ if (NM != null) {
1894
+ tags.push("NM:i:"+NM);
1895
+ tags.push("mm:i:"+mm);
1896
+ }
1891
1897
  tags.push("gn:i:"+(I[1]+D[1]), "go:i:"+(I[0]+D[0]), "cg:Z:" + t[5].replace(/\d+[SH]/g, ''));
1892
1898
  if (cs_str != null) tags.push("cs:Z:" + cs_str);
1893
1899
  else if (cs.length > 0) tags.push("cs:Z:" + cs.join(""));
@@ -14,6 +14,7 @@
14
14
  #define MM_DBG_PRINT_SEED 0x4
15
15
  #define MM_DBG_PRINT_ALN_SEQ 0x8
16
16
  #define MM_DBG_PRINT_CHAIN 0x10
17
+ #define MM_DBG_SEED_FREQ 0x20
17
18
 
18
19
  #define MM_SEED_LONG_JOIN (1ULL<<40)
19
20
  #define MM_SEED_IGNORE (1ULL<<41)
@@ -79,8 +80,6 @@ int mm_idx_getseq2(const mm_idx_t *mi, int is_rev, uint32_t rid, uint32_t st, ui
79
80
  mm_reg1_t *mm_align_skeleton(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int qlen, const char *qstr, int *n_regs_, mm_reg1_t *regs, mm128_t *a);
80
81
  mm_reg1_t *mm_gen_regs(void *km, uint32_t hash, int qlen, int n_u, uint64_t *u, mm128_t *a, int is_qstrand);
81
82
 
82
- mm128_t *mm_chain_dp(int max_dist_x, int max_dist_y, int bw, int max_skip, int max_iter, int min_cnt, int min_sc, float gap_scale,
83
- int is_cdna, int n_segs, int64_t n, mm128_t *a, int *n_u_, uint64_t **_u, void *km);
84
83
  mm128_t *mg_lchain_dp(int max_dist_x, int max_dist_y, int bw, int max_skip, int max_iter, int min_cnt, int min_sc, float chn_pen_gap, float chn_pen_skip,
85
84
  int is_cdna, int n_segs, int64_t n, mm128_t *a, int *n_u_, uint64_t **_u, void *km);
86
85
  mm128_t *mg_lchain_rmq(int max_dist, int max_dist_inner, int bw, int max_chn_skip, int cap_rmq_size, int min_cnt, int min_sc, float chn_pen_gap, float chn_pen_skip,
@@ -55,7 +55,7 @@ void mm_mapopt_init(mm_mapopt_t *opt)
55
55
  opt->max_clip_ratio = 1.0f;
56
56
  opt->mini_batch_size = 500000000;
57
57
  opt->max_sw_mat = 100000000;
58
- opt->cap_kalloc = 1000000000;
58
+ opt->cap_kalloc = 500000000;
59
59
 
60
60
  opt->rank_min_len = 500;
61
61
  opt->rank_frac = 0.9f;
@@ -114,6 +114,14 @@ int mm_set_opt(const char *preset, mm_idxopt_t *io, mm_mapopt_t *mo)
114
114
  mo->a = 1, mo->b = 4, mo->q = 6, mo->q2 = 26, mo->e = 2, mo->e2 = 1;
115
115
  mo->min_dp_max = 200;
116
116
  }
117
+ } else if (strcmp(preset, "lr:hqae") == 0) { // high-quality assembly evaluation
118
+ io->flag = 0, io->k = 25, io->w = 51;
119
+ mo->flag |= MM_F_RMQ;
120
+ mo->min_mid_occ = 50, mo->max_mid_occ = 500;
121
+ mo->rmq_inner_dist = 5000;
122
+ mo->occ_dist = 200;
123
+ mo->best_n = 100;
124
+ mo->chain_gap_scale = 5.0f;
117
125
  } else if (strcmp(preset, "map-iclr-prerender") == 0) {
118
126
  io->flag = 0, io->k = 15;
119
127
  mo->b = 6, mo->transition = 1;
@@ -36,6 +36,7 @@ cdef extern from "minimap.h":
36
36
  float alt_drop
37
37
 
38
38
  int a, b, q, e, q2, e2
39
+ int transition
39
40
  int sc_ambi
40
41
  int noncan
41
42
  int junc_bonus
@@ -3,7 +3,7 @@ from libc.stdlib cimport free
3
3
  cimport cmappy
4
4
  import sys
5
5
 
6
- __version__ = '2.27'
6
+ __version__ = '2.28'
7
7
 
8
8
  cmappy.mm_reset_timer()
9
9
 
@@ -96,6 +96,7 @@ cdef class Alignment:
96
96
  a = [str(self._q_st), str(self._q_en), strand, self._ctg, str(self._ctg_len), str(self._r_st), str(self._r_en),
97
97
  str(self._mlen), str(self._blen), str(self._mapq), tp, ts, "cg:Z:" + self.cigar_str]
98
98
  if self._cs != "": a.append("cs:Z:" + self._cs)
99
+ if self._MD != "": a.append("MD:Z:" + self._MD)
99
100
  return "\t".join(a)
100
101
 
101
102
  cdef class ThreadBuffer:
@@ -5,7 +5,7 @@ import getopt
5
5
  import mappy as mp
6
6
 
7
7
  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")
9
9
  if len(args) < 2:
10
10
  print("Usage: minimap2.py [options] <ref.fa>|<ref.mmi> <query.fq>")
11
11
  print("Options:")
@@ -16,10 +16,11 @@ def main(argv):
16
16
  print(" -w INT minimizer window length")
17
17
  print(" -r INT band width")
18
18
  print(" -c output the cs tag")
19
+ print(" -M output the MD tag")
19
20
  sys.exit(1)
20
21
 
21
22
  preset = min_cnt = min_sc = k = w = bw = None
22
- out_cs = False
23
+ out_cs = out_MD = False
23
24
  for opt, arg in opts:
24
25
  if opt == '-x': preset = arg
25
26
  elif opt == '-n': min_cnt = int(arg)
@@ -28,11 +29,12 @@ def main(argv):
28
29
  elif opt == '-k': k = int(arg)
29
30
  elif opt == '-w': w = int(arg)
30
31
  elif opt == '-c': out_cs = True
32
+ elif opt == '-M': out_MD = True
31
33
 
32
34
  a = mp.Aligner(args[0], preset=preset, min_cnt=min_cnt, min_chain_score=min_sc, k=k, w=w, bw=bw)
33
35
  if not a: raise Exception("ERROR: failed to load/build index file '{}'".format(args[0]))
34
36
  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
36
38
  print('{}\t{}\t{}'.format(name, len(seq), h))
37
39
 
38
40
  if __name__ == "__main__":
data/ext/minimap2/seed.c CHANGED
@@ -112,7 +112,8 @@ mm_seed_t *mm_collect_matches(void *km, int *_n_m, int qlen, int max_occ, int ma
112
112
  }
113
113
  for (i = 0, n_m = 0, *rep_len = 0, *n_a = 0; i < n_m0; ++i) {
114
114
  mm_seed_t *q = &m[i];
115
- //fprintf(stderr, "X\t%d\t%d\t%d\n", q->q_pos>>1, q->n, q->flt);
115
+ if (mm_dbg_flag & MM_DBG_SEED_FREQ)
116
+ fprintf(stderr, "SF\t%d\t%d\t%d\n", q->q_pos>>1, q->n, q->flt);
116
117
  if (q->flt) {
117
118
  int en = (q->q_pos >> 1) + 1, st = en - q->q_span;
118
119
  if (st > rep_en) {
@@ -23,7 +23,7 @@ def readme():
23
23
 
24
24
  setup(
25
25
  name = 'mappy',
26
- version = '2.27',
26
+ version = '2.28',
27
27
  url = 'https://github.com/lh3/minimap2',
28
28
  description = 'Minimap2 python binding',
29
29
  long_description = readme(),
@@ -107,6 +107,7 @@ module Minimap2
107
107
  a = [@q_st, @q_en, strand, @ctg, @ctg_len, @r_st, @r_en,
108
108
  @mlen, @blen, @mapq, tp, ts, "cg:Z:#{@cigar_str}"]
109
109
  a << "cs:Z:#{@cs}" if @cs
110
+ a << "MD:Z:#{@md}" if @md
110
111
  a.join("\t")
111
112
  end
112
113
  end
@@ -113,7 +113,7 @@ module Minimap2
113
113
  :dp_max0, :int32, # DP score before mm_update_dp_max() adjustment
114
114
  :n_ambi_trans_strand, :uint32,
115
115
  :n_cigar, :uint32
116
- # :cigar, :pointer # variable length array (see cigar method below)
116
+ # :cigar, :pointer # variable length array (see cigar method below)
117
117
 
118
118
  bit_field :n_ambi_trans_strand,
119
119
  :n_ambi, 30, # number of ambiguous bases
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Minimap2
4
- VERSION = "0.2.27.0"
4
+ VERSION = "0.2.28.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimap2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.27.0
4
+ version: 0.2.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kojix2
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-13 00:00:00.000000000 Z
11
+ date: 2024-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -150,7 +150,7 @@ homepage: https://github.com/kojix2/ruby-minimap2
150
150
  licenses:
151
151
  - MIT
152
152
  metadata: {}
153
- post_install_message:
153
+ post_install_message:
154
154
  rdoc_options: []
155
155
  require_paths:
156
156
  - lib
@@ -165,8 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  requirements: []
168
- rubygems_version: 3.5.4
169
- signing_key:
168
+ rubygems_version: 3.5.3
169
+ signing_key:
170
170
  specification_version: 4
171
171
  summary: minimap2
172
172
  test_files: []