minimap2 0.2.29.1 → 0.2.30.1

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: 10ad858934a06fbdf6c5b971a593df82cbf57b999aff967c542576cd53cd2344
4
- data.tar.gz: f6ca98e3d2dd06d37861228eaac34c5472238e4c2ab3488e489e503876812019
3
+ metadata.gz: 281c4137d44e544a2aab31eb16fce93d70ee4f8ddd69e77ff2d978306c6fdb5d
4
+ data.tar.gz: 4b4a7bffaf3ebb62613a7bf8f579a380f7b8f31fb548c31fb508d5ca44ccf04e
5
5
  SHA512:
6
- metadata.gz: 55760274861cb9c3ad8cdb595b9f5d1877c465574dfa252d7c6ec58370d11aaf43c60217ad846e9cdf887684268cf8503073da5724c7392e4006b8d6decba505
7
- data.tar.gz: aac0a3e2c7e01d8c79962e27cafd3819d8c94f409e2674a450b3f287a59889aa1c581cfe968c15d057013bb3addcd4849fcb9e69ac6b615bab9d0f3435fd4150
6
+ metadata.gz: 7e4ee67dc4efd148995832df4b854af5ae53a6bb337723f3dfa03575279791575e99beef452878e0d9d2d655673739ee4ec3db8750310b2a2d0f779cf903a1a3
7
+ data.tar.gz: 7024bff4e744068b4426181e58bdd509e359fdc3b3788146e3d571b0f5aa3489eba3e2f7d5dd89a133581f9fbe1d871e3c40f33e8a183da07f34c7d06322faa7
data/ext/minimap2/NEWS.md CHANGED
@@ -1,3 +1,18 @@
1
+ Release 2.30-r1287 (15 June 2025)
2
+ ---------------------------------
3
+
4
+ Notable changes:
5
+
6
+ * Improvement: consolidated `--spsc`.
7
+
8
+ * Deprecation: subcommands `splice2bed`, `gff2bed`, `gff2junc`, `junceval` and
9
+ `exoneval` in `paftools.js` are deprecated by minigff. They will remain
10
+ indefinitely for backward compatibility.
11
+
12
+ (2.30: 15 June 2025, r1287)
13
+
14
+
15
+
1
16
  Release 2.29-r1283 (18 April 2025)
2
17
  ----------------------------------
3
18
 
@@ -77,8 +77,8 @@ Detailed evaluations are available from the [minimap2 paper][doi] or the
77
77
  Minimap2 is optimized for x86-64 CPUs. You can acquire precompiled binaries from
78
78
  the [release page][release] with:
79
79
  ```sh
80
- curl -L https://github.com/lh3/minimap2/releases/download/v2.29/minimap2-2.29_x64-linux.tar.bz2 | tar -jxvf -
81
- ./minimap2-2.29_x64-linux/minimap2
80
+ curl -L https://github.com/lh3/minimap2/releases/download/v2.30/minimap2-2.30_x64-linux.tar.bz2 | tar -jxvf -
81
+ ./minimap2-2.30_x64-linux/minimap2
82
82
  ```
83
83
  If you want to compile from the source, you need to have a C compiler, GNU make
84
84
  and zlib development files installed. Then type `make` in the source code
@@ -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.29/minimap2-2.29_x64-linux.tar.bz2 | tar jxf -
35
- cp minimap2-2.29_x64-linux/{minimap2,k8,paftools.js} . # copy executables
34
+ curl -L https://github.com/lh3/minimap2/releases/download/v2.30/minimap2-2.30_x64-linux.tar.bz2 | tar jxf -
35
+ cp minimap2-2.30_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 -
data/ext/minimap2/index.c CHANGED
@@ -967,7 +967,7 @@ typedef struct mm_idx_spsc_s {
967
967
  uint64_t *a; // pos<<56 | score<<1 | acceptor
968
968
  } mm_idx_spsc_t;
969
969
 
970
- int32_t mm_idx_spsc_read(mm_idx_t *idx, const char *fn, int32_t max_sc)
970
+ int32_t mm_idx_spsc_read2(mm_idx_t *idx, const char *fn, int32_t max_sc, float scale)
971
971
  {
972
972
  gzFile fp;
973
973
  kstring_t str = {0,0,0};
@@ -1007,6 +1007,8 @@ int32_t mm_idx_spsc_read(mm_idx_t *idx, const char *fn, int32_t max_sc)
1007
1007
  }
1008
1008
  }
1009
1009
  if (i < 4) continue; // not enough fields
1010
+ if (scale > 0.0f && scale < 1.0f)
1011
+ score = score > 0.0f? (int)(score * scale + .499) : (int)(score * scale - .499);
1010
1012
  if (score > max_sc) score = max_sc;
1011
1013
  if (score < -max_sc) score = -max_sc;
1012
1014
  cid = mm_idx_name2id(idx, name);
@@ -1030,6 +1032,11 @@ int32_t mm_idx_spsc_read(mm_idx_t *idx, const char *fn, int32_t max_sc)
1030
1032
  return 0;
1031
1033
  }
1032
1034
 
1035
+ int32_t mm_idx_spsc_read(mm_idx_t *idx, const char *fn, int32_t max_sc)
1036
+ {
1037
+ return mm_idx_spsc_read2(idx, fn, max_sc, 1.0f);
1038
+ }
1039
+
1033
1040
  static int32_t mm_idx_find_intv(int32_t n, const uint64_t *a, int64_t x)
1034
1041
  {
1035
1042
  int32_t s = 0, e = n;
data/ext/minimap2/main.c CHANGED
@@ -85,6 +85,8 @@ static ko_longopt_t long_options[] = {
85
85
  { "jump-min-match", ko_required_argument, 360 },
86
86
  { "write-junc", ko_no_argument, 361 },
87
87
  { "pass1", ko_required_argument, 362 },
88
+ { "spsc-scale", ko_required_argument, 363 },
89
+ { "spsc0", ko_required_argument, 364 },
88
90
  { "dbg-seed-occ", ko_no_argument, 501 },
89
91
  { "help", ko_no_argument, 'h' },
90
92
  { "max-intron-len", ko_required_argument, 'G' },
@@ -134,6 +136,7 @@ int main(int argc, char *argv[])
134
136
  mm_mapopt_t opt;
135
137
  mm_idxopt_t ipt;
136
138
  int i, c, n_threads = 3, n_parts, old_best_n = -1;
139
+ float spsc_scale = 0.7f;
137
140
  char *fnw = 0, *rg = 0, *fn_bed_junc = 0, *fn_bed_jump = 0, *fn_bed_pass1 = 0, *fn_spsc = 0, *s, *alt_list = 0;
138
141
  FILE *fp_help = stderr;
139
142
  mm_idx_reader_t *idx_rdr;
@@ -240,7 +243,6 @@ int main(int argc, char *argv[])
240
243
  else if (c == 338) opt.max_qlen = mm_parse_num(o.arg); // --max-qlen
241
244
  else if (c == 340) fn_bed_junc = o.arg; // --junc-bed
242
245
  else if (c == 341) opt.junc_bonus = atoi(o.arg); // --junc-bonus
243
- else if (c == 358) opt.junc_pen = atoi(o.arg); // --junc-pen
244
246
  else if (c == 342) opt.flag |= MM_F_SAM_HIT_ONLY; // --sam-hit-only
245
247
  else if (c == 343) opt.chain_gap_scale = atof(o.arg); // --chain-gap-scale
246
248
  else if (c == 351) opt.chain_skip_scale = atof(o.arg); // --chain-skip-scale
@@ -260,6 +262,8 @@ int main(int argc, char *argv[])
260
262
  else if (c == 361) opt.flag |= MM_F_OUT_JUNC | MM_F_CIGAR; // --write-junc
261
263
  else if (c == 362) fn_bed_pass1 = o.arg; // --jump-pass1
262
264
  else if (c == 501) mm_dbg_flag |= MM_DBG_SEED_FREQ; // --dbg-seed-occ
265
+ else if (c == 363) spsc_scale = atof(o.arg); // --spsc-scale
266
+ else if (c == 358 || c == 364) opt.junc_pen = atoi(o.arg); // --junc-pen or --spsc0
263
267
  else if (c == 330) {
264
268
  fprintf(stderr, "[WARNING] \033[1;31m --lj-min-ratio has been deprecated.\033[0m\n");
265
269
  } else if (c == 313) { // --sr
@@ -476,7 +480,7 @@ int main(int argc, char *argv[])
476
480
  fprintf(stderr, "[WARNING] failed to load the pass-1 jump BED file\n");
477
481
  }
478
482
  if (fn_spsc) {
479
- mm_idx_spsc_read(mi, fn_spsc, mm_max_spsc_bonus(&opt));
483
+ mm_idx_spsc_read2(mi, fn_spsc, mm_max_spsc_bonus(&opt), spsc_scale);
480
484
  if (mi->spsc == 0 && mm_verbose >= 2)
481
485
  fprintf(stderr, "[WARNING] failed to load the splice score file\n");
482
486
  }
@@ -5,7 +5,7 @@
5
5
  #include <stdio.h>
6
6
  #include <sys/types.h>
7
7
 
8
- #define MM_VERSION "2.29-r1283"
8
+ #define MM_VERSION "2.30-r1287"
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
@@ -163,7 +163,8 @@ typedef struct {
163
163
  int transition; // transition mismatch score (A:G, C:T)
164
164
  int sc_ambi; // score when one or both bases are "N"
165
165
  int noncan; // cost of non-canonical splicing sites
166
- int junc_bonus, junc_pen;
166
+ int junc_bonus; // bonus for a splice site in annotation
167
+ int junc_pen; // penalty for GT- or -AG not scored in --spsc
167
168
  int zdrop, zdrop_inv; // break alignment if alignment score drops too fast along the diagonal
168
169
  int end_bonus;
169
170
  int min_dp_max; // drop an alignment if the score of the max scoring segment is below this threshold
@@ -420,6 +421,7 @@ int mm_idx_bed_junc(const mm_idx_t *mi, int32_t ctg, int32_t st, int32_t en, uin
420
421
 
421
422
  int mm_max_spsc_bonus(const mm_mapopt_t *mo);
422
423
  int32_t mm_idx_spsc_read(mm_idx_t *idx, const char *fn, int32_t max_sc);
424
+ int32_t mm_idx_spsc_read2(mm_idx_t *idx, const char *fn, int32_t max_sc, float scale);
423
425
  int64_t mm_idx_spsc_get(const mm_idx_t *db, int32_t cid, int64_t st0, int64_t en0, int32_t rev, uint8_t *sc);
424
426
 
425
427
  // deprecated APIs for backward compatibility
@@ -1,4 +1,4 @@
1
- .TH minimap2 1 "18 April 2025" "minimap2-2.29 (r1283)" "Bioinformatics tools"
1
+ .TH minimap2 1 "15 June 2025" "minimap2-2.30 (r1287)" "Bioinformatics tools"
2
2
  .SH NAME
3
3
  .PP
4
4
  minimap2 - mapping and alignment between collections of DNA sequences
@@ -443,14 +443,23 @@ line corresponds to a donor site and `A' for an acceptor site.
443
443
  A positive score suggests the junction is preferred and a negative score
444
444
  suggests the junction is not preferred.
445
445
  .TP
446
- .BR --junc-pen \ INT
447
- Penalty for a position not in FILE specified by
446
+ .BR --spsc0 \ INT
447
+ Penalty for positions not in
448
+ .I FILE
449
+ specified by
448
450
  .B --spsc
449
451
  [5]. Effective with
450
452
  .B --spsc
451
453
  but not
452
454
  .BR --junc-bed .
453
455
  .TP
456
+ .BR --spsc-scale \ FLOAT
457
+ Scale splice scores in
458
+ .B --spsc
459
+ by
460
+ .IR FLOAT
461
+ rounded to the nearest integer [0.7].
462
+ .TP
454
463
  .BR --junc-bed \ FILE
455
464
  Junctions to prefer during base alignment [].
456
465
  Same format as
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env k8
2
2
 
3
- var paftools_version = '2.29-r1283';
3
+ var paftools_version = '2.30-r1287';
4
4
 
5
5
  /*****************************
6
6
  ***** Library functions *****
@@ -2613,7 +2613,8 @@ function paf_junceval(args)
2613
2613
  function paf_exoneval(args) // adapted from paf_junceval()
2614
2614
  {
2615
2615
  var c, l_fuzzy = 0, print_ovlp = false, print_err_only = false, first_only = false, chr_only = false, aa = false, is_bed = false, use_cds = false, eval_base = false;
2616
- while ((c = getopt(args, "l:epcab1ds")) != null) {
2616
+ var skip_start = false, skip_last = false;
2617
+ while ((c = getopt(args, "l:epcab1dsft")) != null) {
2617
2618
  if (c == 'l') l_fuzzy = parseInt(getopt.arg);
2618
2619
  else if (c == 'e') print_err_only = print_ovlp = true;
2619
2620
  else if (c == 'p') print_ovlp = true;
@@ -2623,6 +2624,8 @@ function paf_exoneval(args) // adapted from paf_junceval()
2623
2624
  else if (c == '1') first_only = true;
2624
2625
  else if (c == 'd') use_cds = true;
2625
2626
  else if (c == 's') eval_base = true;
2627
+ else if (c == 'f') skip_start = true;
2628
+ else if (c == 't') skip_last = skip_start = true;
2626
2629
  }
2627
2630
 
2628
2631
  if (args.length - getopt.ind < 1) {
@@ -2635,6 +2638,8 @@ function paf_exoneval(args) // adapted from paf_junceval()
2635
2638
  print(" -e print erroreous overlapping exons");
2636
2639
  print(" -c only consider alignments to /^(chr)?([0-9]+|X|Y)$/");
2637
2640
  print(" -1 only process the first alignment of each query");
2641
+ print(" -f skip the first exon in the miniprot mode");
2642
+ print(" -t skip the first and the last exons");
2638
2643
  print(" -b BED as input");
2639
2644
  print(" -s compute base Sn and Sp (more memory)");
2640
2645
  exit(1);
@@ -2764,6 +2769,8 @@ function paf_exoneval(args) // adapted from paf_junceval()
2764
2769
  for (var i = tmp_exon.length - 1; i >= 0; --i)
2765
2770
  exon.push([pos + (glen - tmp_exon[i][1]), pos + (glen - tmp_exon[i][0])]);
2766
2771
  }
2772
+ if (skip_start) exon.shift();
2773
+ if (skip_last) exon.pop();
2767
2774
  } else {
2768
2775
  var tmp_st = pos;
2769
2776
  while ((m = re_cigar.exec(cigar)) != null) {
@@ -3,7 +3,7 @@ from libc.stdlib cimport free
3
3
  cimport cmappy
4
4
  import sys
5
5
 
6
- __version__ = '2.29'
6
+ __version__ = '2.30'
7
7
 
8
8
  cmappy.mm_reset_timer()
9
9
 
@@ -23,7 +23,7 @@ def readme():
23
23
 
24
24
  setup(
25
25
  name = 'mappy',
26
- version = '2.29',
26
+ version = '2.30',
27
27
  url = 'https://github.com/lh3/minimap2',
28
28
  description = 'Minimap2 python binding',
29
29
  long_description = readme(),
@@ -0,0 +1,5 @@
1
+ mm2: TGTTATCCCTAGGGTAACTTGTTCCGTTGGTCAAGTTATTGGATCAATTGAGTATAGTAGTGCACTCAC......................................................................................................................................CACTTGGAGCCATTCATACAGGTCCCTATTTAAGGAACAAGTGATTATGCTACCTTTGCACGGTT
2
+ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3
+ ref: TGTTATCCCTAGGGTAACTTGTTCCGTTGGTCAAGTTATTGGATCAATTGAGTATAGTAGTGCACTCACctGCTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTGGGTTCTGCTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGTTAGGCTAACCTCacCACTTGGAGCCATTCATACAGGTCCCTATTTAAGGAACAAGTGATTATGCTACCTTTGCACGGTT
4
+ |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5
+ sta: TGTTATCCCTAGGGTAACTTGTTCCGTTGGTCAAGTTATTGGATCAATTGAGTATAGTAGTGCA......................................................................................................................................CTCACCACTTGGAGCCATTCATACAGGTCCCTATTTAAGGAACAAGTGATTATGCTACCTTTGCACGGTT
@@ -0,0 +1,5 @@
1
+ >query
2
+ AACCGTGCAAAGGTAGCATAATCACTTGTTCCTTAAATAGGGACCTGTATGAATGGCTCC
3
+ AAGTG
4
+ GTGAGTGCA
5
+ CTACTATACTCAATTGATCCAATAACTTGACCAACGGAACAAGTTACCCTAGGGATAACA
@@ -0,0 +1,10 @@
1
+ >ref
2
+ TGATCCAACATCGAGGTCGTAAACCCTATTGTTGATATGGACTCTAGAATAGGATTGCGC
3
+ TGTTATCCCTAGGGTAACTTGTTCCGTTGGTCAAGTTATTGGATCAATTGAGTATAGTAG
4
+ TGCACTCAC
5
+ ctGCTTCGCTTTGACTGGTGAAGTCTTAGCATGTACTGCTCGGAGGTTGGGTTCTGCTCC
6
+ GAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGGACCTGTGGGTTTGT
7
+ TAGGCTAACCTCac
8
+ CACTTGGAGCCATTCATACAGGTCCCTATTTAAGGAACAAGTGATTATGCTACCTTTGCA
9
+ CGGTTAGGGTACCGCGGCCGTTAAACATGTGTCACTGGGCAGGCGGTGCCTCTAATACTG
10
+ GTGAT
@@ -205,6 +205,12 @@ module Minimap2
205
205
  [Idx.by_ref, :string, :int32],
206
206
  :int32
207
207
 
208
+ # int32_t mm_idx_spsc_read2(mm_idx_t *idx, const char *fn, int32_t max_sc, float scale);
209
+ attach_function \
210
+ :mm_idx_spsc_read2,
211
+ [Idx.by_ref, :string, :int32, :float],
212
+ :int32
213
+
208
214
  # int64_t mm_idx_spsc_get(const mm_idx_t *db, int32_t cid, int64_t st0, int64_t en0, int32_t rev, uint8_t *sc);
209
215
  attach_function \
210
216
  :mm_idx_spsc_get,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Minimap2
4
- VERSION = "0.2.29.1"
4
+ VERSION = "0.2.30.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimap2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.29.1
4
+ version: 0.2.30.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kojix2
@@ -117,6 +117,9 @@ files:
117
117
  - ext/minimap2/test/q2.fa
118
118
  - ext/minimap2/test/t-inv.fa
119
119
  - ext/minimap2/test/t2.fa
120
+ - ext/minimap2/test/x3s-aln.txt
121
+ - ext/minimap2/test/x3s-qry.fa
122
+ - ext/minimap2/test/x3s-ref.fa
120
123
  - ext/minimap2/tex/Makefile
121
124
  - ext/minimap2/tex/bioinfo.cls
122
125
  - ext/minimap2/tex/blasr-mc.eval