Commit Graph

48 Commits

Author SHA1 Message Date
Heng Li
79c9cc186b Release minimap2-2.30 (r1287) 2025-06-15 17:54:11 -04:00
Heng Li
1fd85be6e2 Release minimap2-2.29 (r1283) 2025-04-18 13:41:47 -04:00
Chang Y
74ebfb2532 fix error (#1223) 2025-03-21 18:21:15 -04:00
Leon Rauschning
7d8bbb74a8 Add sc_ambi and max_chain_skip parameters to mappy.pyx (#1240)
* add sc_ambi option to cython interface

* add max_gaplen param

* set max_chain_skip to arg instead of forcing 255
2024-11-15 08:56:36 -05:00
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
8170693de3 Release minimap2-2.28 (r1209) 2024-03-27 10:57:17 -04:00
Heng Li
b6762503a9 Release minimap2-2.27 (r1193) 2024-03-12 13:20:07 -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
Heng Li
e28a55be86 Release minimap2-2.26 (r1175) 2023-04-29 12:21:09 -04:00
Heng Li
4483f89ee5 Release minimap2-2.25 (r1173) 2023-04-25 12:44:52 -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
fe35e679e9 Release minimap2-2.24 (r1122) 2021-12-26 15:14:54 -05:00
Heng Li
d0cff3eb36 Release minimap2-2.23 (r1111) 2021-11-18 17:11:48 -05:00
Heng Li
7358a1ead1 Release minimap2-2.22 (r1101) 2021-08-07 11:30:31 -04:00
Heng Li
581f2d7123 Release minimap2-2.21 (r1071) 2021-07-06 13:18:55 -04:00
John Marshall
177eef259d Use the full MIDNSHP=X string whenever printing CIGAR strings
Define MM_CIGAR_STR to the full string of CIGAR operators (including
the 'B' operator as well) and use it throughout the C code.

It would be possible to use it from the Cython code too, but it's easier
to keep that as a Cython string literal to avoid adding extra runtime
code to handle locale conversion.
2021-07-02 13:03:03 -04:00
Heng Li
15471bd629 Release minimap2-2.20 (r1061) 2021-05-27 15:26:04 -04:00
Heng Li
ef09ccf104 Release minimap2-2.19 (r1055) 2021-05-26 21:01:03 -04:00
Heng Li
b6ff332de1 Release minimap2-2.18 (r1015) 2021-04-09 13:33:34 -04:00
Marcus Stoiber
238b6bb3ea Fix memory leak in mappy.aligner.map. 2019-07-08 09:50:54 -04:00
Heng Li
03dc8d5d97 test if index is built for #413 2019-06-07 09:11:11 -04:00
Heng Li
7bc87b4175 Release minimap2-2.17 (r941) 2019-05-04 23:49:17 -04:00
Heng Li
189555503a potentially fix issue #372
Needs someone to confirm
2019-04-30 21:49:51 -04:00
Heng Li
6b391e3373 Release minimap2-2.16 (r922) 2019-02-28 15:49:24 -05:00
Heng Li
aaf3233818 added mappy.Aligner.seq_names to return seq names
Resolves #312
2019-01-29 12:53:20 -05:00
Heng Li
c404f49569 Release minimap2-2.15 (r905) 2019-01-10 12:34:45 -05:00
Heng Li
59f23f7579 Release minimap2-2.14 (r883) 2018-11-06 00:03:16 -05:00
Heng Li
5d5d392c02 Release minimap2-2.13 (r850) 2018-10-11 13:18:31 -04:00
Heng Li
9a567e4b37 allow mappy to change scoring 2018-08-06 09:52:13 -04:00
Heng Li
b0f39a1a61 r823: mappy to index a single sequence 2018-08-05 20:57:05 -04:00
Heng Li
ff9917a1c4 r819: mappy to support cs/MD 2018-07-24 23:29:55 -04:00
Heng Li
0517972d02 Release minimap2-2.11 (r797) 2018-06-21 00:04:08 -04:00
Heng Li
e9ca0c9dab added __version__; resolved #165
Not sure if this is the right way. Apparently working.
2018-06-19 15:40:26 -04:00
mvdbeek
1bde2cf076 Allow setting max_frag_len on a per alignment level 2018-06-19 14:39:30 -04:00
mvdbeek
31fc0f218a Allow setting max_frag_len parameter in Aligner class 2018-06-19 14:39:30 -04:00
Heng Li
24a4808826 r718: retrieve sequence from the index 2018-02-23 10:18:26 -05:00
Heng Li
29ed675ee5 bugfix: in-place revcomp() not working 2018-02-20 11:05:54 -05:00
Heng Li
7dc7097208 added reverse complement 2018-02-20 09:41:25 -05:00
Heng Li
090361c25b fixed a typo in mappy (#117) 2018-02-16 21:10:57 -05:00
Heng Li
46d6349af4 r670: added PE support to mappy
and minor code cleanup
2018-01-31 11:33:08 -05:00
cwright
4f77b0c1ed Fix typo in strand property 2017-11-11 01:18:44 +00:00
martinghunt
29a26e3eea Bug fix with byte strings in Python3 2017-11-09 13:57:15 +00:00
Heng Li
b24c9c90c7 updated mappy and example.c 2017-10-16 11:15:07 -04:00
Heng Li
cf93e5c0a1 more functional minimap2.py; added categories 2017-09-17 17:06:39 -04:00
Heng Li
0b660c70e2 syntax error 2017-09-17 16:02:06 -04:00
Heng Li
5715c423ff exposed timer and verbose-level to mappy 2017-09-17 15:21:36 -04:00
Heng Li
c8a019fae8 exposed fasta/q reader to mappy 2017-09-17 14:41:59 -04:00
Heng Li
d5012a1b17 this is embarrassing: rename again to mappy 2017-09-17 00:05:30 -04:00