Commit Graph

1113 Commits

Author SHA1 Message Date
Heng Li
fcd4df2a73 r1190: output unadjusted dp_max to ms:i
This was an oversight affecting v2.22+. The latest minimap2 ranks hits and
estimates mapping quality with an adjusted alignment score (see the minimap2
update paper). This score however is not calculated when there is only one hit.
As a result, the ms:i tag varies depends on other sequences in the reference
genome, which is confusing. This change lets minimap2 to output the unadjusted
score at ms:i. At present, the adjusted score is not outputted.

Resolves #1146
2024-03-11 17:19:13 -04:00
Heng Li
0efc886012 r1189: fixed an out-of-memory issue
Resolves #1166
2024-03-11 10:14:20 -04:00
Heng Li
940388f8e4 r1188: added --ds to output tag ds
Adapted from minigraph
2024-03-10 15:01:13 -04:00
Heng Li
23d2674c39 r1187: set stage for the ds tag; not added yet 2024-03-10 14:12:56 -04:00
Heng Li
a12673611f Merge remote-tracking branch 'origin/master' 2024-03-10 13:49:30 -04:00
Heng Li
8140259974 r1183: added lr:hq; fixed transition
* Added the lr:hq preset suggested by Nanopore developers (#1127)
 * Fixed transition scoring. It did not work with presets.
 * Cleaned up preset documentation
2024-03-10 13:47:34 -04:00
blawrence-ont
f3e59fc2a0 Avoid NULL pointer dereference (#1154)
If the allocated region is 0 bytes then it's unsafe to dereference it.

Fixes #1147.
2024-01-24 12:32:05 -05:00
Pesho Ivanov
fc2e1607d7 Update paftools.js (#1145)
In mapeval "-Q INT" reports wrong alignments with mapQ>=INT, not with mapQ>INT
2024-01-03 09:06:08 -05:00
Heng Li
bc588c0eeb r1182: improved paftools.js compatibility
Older k8/v8 can't use large memory. The previous change read large FASTA as
strings and might have problems. The new change tests k8 version.
2023-10-30 16:37:29 -04:00
Heng Li
ab717023b6 reverted to the previous paftools.js 2023-10-30 16:24:18 -04:00
Heng Li
9506e7ac3f r1180: paftools.js call compatibility with k8-1.0 2023-10-28 15:54:37 -04:00
Heng Li
ce03fbc275 Merge remote-tracking branch 'remotes/origin/master' 2023-10-24 09:53:51 -04:00
Heng Li
98a3aa1b39 document --secondary-seq in manpage
Resolve #1122
2023-10-24 09:52:39 -04:00
Donaim
ae05f8485f Add bw_long option to mappy's Aligner class (#1124)
The Minimap2 behavior was found to handle sequences with large
deletions differently when upgraded from v2.17 to v2.26, causing
potential issues in projects mapping extensive deletions of ~1200 base
pairs. The originally suggested solution of setting `-r 500,500` was
observed to be partially non-applicable since the Python Wrapper,
`mappy`, only allowed manipulation of parameter `bw`.

In response to issue #1111, where this was originally reported,
this commit introduces a modification in the Python wrapper,
`mappy`. Until now, `mappy` only allowed manipulation of the `bw`
parameter, preventing the suggested fix of setting `-r 500,500`.

This commit introduces a modification in the Python wrapper to include
the `bw_long` option in the `Aligner` class. Consequently, both
parameters `bw` and `bw_long` can be manipulated, thereby allowing the
desired Minimap2 behavior encountered in version 2.17. As a result,
this patch ensures consistent handling of sequences containing large
deletions irrespective of the version upgrade."

Closes #1111
2023-10-24 09:23:06 -04:00
Aaron Darling
ace990c381 Illumina Complete Long Read presets (#1069)
* Implements a transition-aware alignment scoring scheme and configuration presets for ICLR

* Fix to enable use of general scoring matrix in ksw as suggested by lh3

---------

Co-authored-by: koadman <>
2023-06-04 11:06:15 -04:00
Heng Li
e28a55be86 Release minimap2-2.26 (r1175) v2.26 2023-04-29 12:21:09 -04:00
Heng Li
f8d46a7a30 Revert #868 and use the old setup.py 2023-04-29 11:48:41 -04:00
Heng Li
4483f89ee5 Release minimap2-2.25 (r1173) v2.25 2023-04-25 12:44:52 -04:00
Heng Li
f1b3c7ad06 added -ldl for asan on some linux 2023-04-25 11:14:15 -04:00
Heng Li
180faa3594 r1171: add operator priority explicit with ()
I can never remember the operator priority of & and &&
2023-04-21 11:09:07 -04:00
Mikhail Kolmogorov
704fbc6f5c An option to output SEQ field for secondary alignment (#687)
* a new option --secondary-seq to output SEQ field for secondary alignments

* comments removed

* Fixed a conflict in #687

---------

Co-authored-by: Heng Li <lh3@me.com>
2023-04-21 11:06:13 -04:00
Heng Li
fc24c8a348 r1169: improved kexpand compatibility 2023-04-21 10:53:23 -04:00
Chris Seymour
e68d868806 use updated kalloc macros (#1051)
* use updated kalloc macros

* review

* get the reference

* store the reference

* last one
2023-04-21 10:45:53 -04:00
Alex Payne
c3d461e22a mappy check index flags before mapping
mappy creates a CIGAR string by default (`-c` flag) and so is
incompatible with indexes that are created using the `--idx-no-seq`
flag.

The previous implementation of mappy did not check for the `MM_I_NO_SEQ`
flag and would seg fault when attempting to map a read or retrieve a
reference sequence from the index. This patch adds a check to both
`mappy.Aligner.seq` and `mappy.Aligner.map` and returns `None` if there
is no index sequences. I've chose `None` as this is inline with the
behaviour of mappy for reads that do not align/retreiving sequences that
aren't in the index, however it might be better to raise an exception so
that this error is distinct and can be communicated to the caller.
2023-04-19 21:49:58 -04:00
Heng Li
c41518ae85 r1166: sync kalloc with miniwfa and miniprot 2023-04-19 21:38:47 -04:00
Chris Seymour
819d843e3c make mm_tbuf_t public 2023-04-19 21:32:23 -04:00
Heng Li
5e7242303c r1164: changed the syntax of -J 2023-04-07 22:54:33 -04:00
Heng Li
a026c69b89 r1163: increased the default -I to 8G
To reduce accidental errors when mapping against diploid human assemblies.
2023-04-07 01:22:22 -04:00
Heng Li
ea2042a577 r1162: fixed a typo; also increased splice pen
Now slightly better on ISO-seq
2023-04-07 01:19:18 -04:00
Heng Li
1834b1fd42 r1161: merged the simple and complex models 2023-04-06 23:42:50 -04:00
Heng Li
7ced0f16a0 r1160: splice model code cleanup 2023-04-06 23:32:06 -04:00
Heng Li
35732f3025 Merge branch 'master' into splice-model 2023-04-06 21:09:18 -04:00
Alberto Zeni
a6fab118c5 Fixed alignment result final update when computing the exact max value 2023-04-06 21:05:24 -04:00
Chris Seymour
6ce0dd8b70 move MM_VERSION define to minimap.h 2023-03-17 20:58:43 +01:00
Nils Homer
1d3c3eef03 Add HD header ilne to SAM output
#905
2023-02-14 09:12:03 -05:00
Heng Li
01b98e8e52 r1155: fixed a bug on parsing --rmq
resolves #1010
2023-01-17 09:09:25 -05:00
Heng Li
16b8d50199 removed debugging code 2023-01-06 11:16:09 -05:00
Heng Li
226fd6114c fixed a wrong comment. Resolves #997 2022-11-30 09:22:39 -05:00
Heng Li
822ccd1733 r1152: evaluate base Sn and Sp 2022-11-01 21:58:45 -04:00
Heng Li
f67849c9af r1151: added exoneval 2022-11-01 21:10:35 -04:00
Heng Li
b0b199f503 r1150: the prev impl counted one less submer 2022-10-21 21:00:22 -04:00
Heng Li
c2f07ff2ac r1149: implemented random open syncmer
On the mm2-update dataset, -j8 leads to sparser k-mer selection at higher
accuracy. The speed becomes a little slower. There seems a benefit but not a
big one.
2022-10-21 19:07:28 -04:00
Heng Li
cefd0d9f6c removed -b0 (a typo) 2022-10-21 17:37:04 -04:00
Heng Li
2a319c89aa support ##PAF lines in GFF3 2022-10-07 19:34:25 -04:00
Heng Li
85a5260408 correctly parse ##PAF lines in GFF3 (for miniprot) 2022-10-07 19:33:27 -04:00
Heng Li
6c2cbf7903 miniprot-like splice model
slightly worse on iso-seq and slightly better on direct-RNA
2022-10-06 09:10:17 -04:00
Heng Li
5aa4355ca8 extract junctions from GFF 2022-09-21 12:57:40 -04:00
Heng Li
6ed7263670 junceval for plain junction BED as input 2022-09-10 23:18:08 -04:00
Heng Li
315795eefd skip unmapped lines 2022-09-10 08:48:57 -04:00
Heng Li
fc6869a9e8 r1141: junceval to support miniprot output 2022-09-09 16:28:23 -04:00