Commit Graph

1145 Commits

Author SHA1 Message Date
Rob Patro
358a39850f Allow passing read name to mappy (#1260)
* Allow passing read name to mappy

This adds the (optional) ability to pass the read
name to the mappy `map` method.  Without the
read name, the call to `map` can sometimes give
different output than the command line version
of `minimap2` because of the way minimap uses
the hash of the read name to break ties in ordering
hits.  This can affect which / if certain
supplementary alignments are generated, and even
which / if non-primary alignments are generated.

* Pass name directly to mm_map_aux

Get rid of additional function, and always
accept the name parameter in the mm_map_aux
function (can be nullptr if not available).

---------

Co-authored-by: Rob Patro <rob@newton>
2024-11-15 08:51:10 -05:00
Heng Li
fcb5d5e6eb r1221: warn about file reading errors
Resolves #1229
2024-10-15 22:44:06 -04:00
Heng Li
95807a2224 added "junc_pen" to python accordingly 2024-10-13 23:58:33 -04:00
Heng Li
a4c93e9377 support X and = in mapeval 2024-10-12 23:31:17 -04:00
Heng Li
7d69334e69 Merge remote-tracking branch 'remotes/origin/master' 2024-10-12 23:28:38 -04:00
Heng Li
3e1ab2951d document --spsc 2024-10-12 23:27:46 -04:00
Heng Li
68179ed195 r1215: scoring apparently works 2024-10-12 22:29:27 -04:00
Heng Li
d1f4c8d232 implemented ksw scoring; not tested 2024-10-11 23:58:18 -04:00
Heng Li
8efe83b744 fill the junction array
modifying ksw will be the next
2024-10-11 23:22:23 -04:00
Heng Li
042c8d4d71 added --junc-pen; it does nothing for now 2024-10-11 21:27:25 -04:00
Heng Li
e4e1f7843b backup for spsc 2024-10-10 22:43:50 -04:00
Marcus Fedarko
69e3629916 Mention in man page that CIGAR strings in SA tags are approximate (#1213)
* Mention approx CIGAR strings in man page #724

* Fix FAQ typo
2024-05-22 15:58:33 -04:00
Heng Li
0cc3cdca27 ignore filtered SVs in sveval 2024-04-07 17:12:31 -04:00
Heng Li
8170693de3 Release minimap2-2.28 (r1209) v2.28 2024-03-27 10:57:17 -04:00
Heng Li
e3d8c708ac r1208: reverted RMQ gap coefficient
Such that minimap2 can give the same alignment in other modes
2024-03-27 08:48:10 -04:00
Heng Li
119bdc6029 r1207: reduced cap_kalloc from 1G to 500M
This reduces the peak memory.
2024-03-20 15:53:12 -04:00
Heng Li
89d4d219cd r1206: enabled RMQ for lr:hqae
Also fixed a bug in determining inner_dist for RMQ. It should have no effect on
previous presets.
2024-03-20 15:29:54 -04:00
Heng Li
f51ff1abac r1205: updated lr:hqae 2024-03-20 14:06:59 -04:00
Heng Li
27b254ed6f backup; DON'T USE!!! 2024-03-20 10:21:10 -04:00
Heng Li
c881b14ba5 r1203: added preset lr:hqae 2024-03-20 00:25:57 -04:00
Heng Li
f18dadb1c4 r1202: halved RMQ gap cost 2024-03-19 23:47:54 -04:00
Heng Li
a83b8fe7cc r1201: renamed --dbg-seed-freq to --dbg-seed-occ 2024-03-19 21:53:09 -04:00
Heng Li
c22bfe7722 r1200: added --rmq-inner and --dbg-seed-freq 2024-03-19 21:52:07 -04:00
Heng Li
12d441ea22 Merge remote-tracking branch 'origin/master' 2024-03-19 21:47:52 -04:00
Heng Li
c7433c2811 r1197: sam2paf to output primary only 2024-03-19 21:47:31 -04:00
Joyjit Daw
5279377544 Fix MD generation check in SAM writing (#1181)
The existing logic checked for is_MD == 1, but
the function is called with a bitwise operator check
which does not evaluate to 1.
2024-03-19 19:20:21 -04:00
Heng Li
acab05781e Merge remote-tracking branch 'remotes/origin/master' 2024-03-19 09:56:13 -04:00
Heng Li
98c23bc6d2 r1194: output NM in sam2paf 2024-03-19 09:55:16 -04:00
kojix2
9b0ff2418c Fix mm_mapopt_t in Mappy (#1177)
Add transition. Related to #1069
2024-03-13 22:15:46 -04:00
Heng Li
b6762503a9 Release minimap2-2.27 (r1193) v2.27 2024-03-12 13:20:07 -04:00
Heng Li
9667468e89 NEWS draft 2024-03-11 22:46:47 -04:00
Heng Li
ba60aac6f6 r1191: fixed wrong reverse() and revcomp()
due to k8 incompatibility. Resolves #1161
2024-03-11 22:09:01 -04:00
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