Commit Graph
88 Commits
Author SHA1 Message Date
Heng Li 9bb4d2bed4 r1290: support ds in Python 2025-12-12 11:39:01 -05:00
Heng Li a5411fc3c0 r1269: added --write-junc
in preparation for 2-pass
2025-04-11 01:00:15 -04:00
Heng Li 83e9b2e28c r1242: append /[12] to read name in --frag mode
Resolve #1079
2025-04-01 10:48:15 -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
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 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 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 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 KolmogorovandHeng Li 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
Nils Homer 1d3c3eef03 Add HD header ilne to SAM output
#905
2023-02-14 09:12:03 -05:00
Heng Li 83a535f148 dev-r1084: fixed flag integer overflow 2021-07-19 11:52:18 -04:00
Heng Li 161ae7ff73 dev-r1079: per-read error rate
more tuning needed
2021-07-18 20:38:53 -04:00
Heng Li 5f449c5cae fixed potential integer overflows 2021-07-16 17:20:05 -04:00
Heng Li b046052d82 Merge branch 'master' into utec 2021-07-16 13:32:47 -04:00
John Marshall 260a68d232 Use #defines for CIGAR operators in C code
Give the CIGAR constants names to clarify the code. So that ksw2.h
remains self-contained, define KSW_* versions of the CIGAR operators
it needs for use within ksw2.h. Other code should in general use the
full set of MM_CIGAR_* constants in minimap.h.
2021-07-02 13:03:03 -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 0b41dd26a2 r1009: fixed a compiler warning 2021-04-05 11:43:13 -04:00
Heng Li cd2b19035b r987: position on for strand wrongly outputted 2020-04-22 10:31:25 -04:00
Heng Li da7109fd29 r985: optionally report cs/cg on the query strand
PAF only; not well tested
2020-04-21 12:37:35 -04:00
Heng Li 7996f04008 r972: fixed negative de:f caused by ambiguous base 2020-01-21 09:14:37 -05:00
Heng Li 3c0d05d272 r962: abort given wrong RG line; resolves #541 2020-01-06 21:53:21 -05:00
John Marshall 371bc9513a SAM TLEN should be 0 when either read is unmapped
this_rid/this_pos will be copied from r_prev(=r_next)'s values when this
read is unmapped (i.e., r is NULL). In this case, we can write RNEXT as
'=' but should not calculate TLEN from these placeholder values.
Similarly when the mate is unmapped (i.e., r_next is NULL).

Fixes #365.
2019-04-05 09:36:46 -04:00
Heng Li 55e39c2d30 r921: output unmapped reads in full PAF 2019-02-27 15:03:19 -05:00
Heng Li 1739a260fb r913: output tag "rl", length of unseedable regs 2019-02-05 14:19:17 -05:00
Heng Li 597212b9f3 r908: added an assertion to detect a potential bug
as in #311
2019-01-23 11:18:50 -05:00
Heng Li 48e230f40d r906: de tag is wrongly calculated given "N"
Resolves #309
2019-01-11 19:39:09 -05:00
Heng Li 2c52364527 r892: avoid de:f:0.0000 2018-11-24 21:54:28 -05:00
Heng Li 128476efc9 r891: compute gap-compressed divergence 2018-11-24 21:50:49 -05:00
Heng Li a8ee48c2ce r873: comforming to C99/C11; resolves #261 2018-11-05 08:25:07 -05:00
Heng Li 9ed56b4a25 r860: MD/cs not working with --eqx 2018-10-26 23:23:53 -04:00
Heng Li 7d80d6de4a r832: fixed outdated -L. Resolved #231 and #233 2018-09-14 22:21:33 -04:00
Heng Li 3a119d606f r828: --MD to support spliced alignment 2018-08-22 10:47:45 -04:00
Heng Li ff9917a1c4 r819: mappy to support cs/MD 2018-07-24 23:29:55 -04:00
Heng Li a609a07f8c optionally output unmapped query in PAF 2018-07-07 10:26:08 -05:00
Heng Li 7e6e8ca73f r792: fixed -Wextra warnings and resolved #184 2018-06-19 15:26:58 -04:00
Heng Li 154d2caf5b r784: support the =/X CIGAR operators (#156) 2018-05-30 16:11:22 -04:00
Heng Li 08bd2123b6 r752: option to copy comments to output (#136) 2018-03-23 10:04:33 -04:00
Heng Li 8766d286df r751: optionally output MD (#118) 2018-03-22 14:15:33 -04:00
Heng Li 623b5d9d48 r750: check puts() return (#132 & #103) 2018-03-22 11:31:58 -04:00
Heng Li 0e42628ef6 r611: document --idx-no-seq; better inv aln 2017-12-08 13:16:18 -05:00
Heng Li 704ff9f4c6 r607: estimate sequence divergence
Currently using the simplest method. There may be a more accurate estimate.
2017-12-06 16:14:39 -05:00
Heng Li 99a2709913 r567: minor change to #56 2017-11-09 19:17:45 -05:00
mvdbeek 1cb0bf4bef Implement -Y for soft clipping of supp. alignments
I tried to base this on bwa-mem and it seems to work for sam alignments.
2017-11-09 19:22:36 +01:00
Heng Li b24d68ae9f r557: fixed another mapq underestimate
When a chain is split during base-level alignment, its chaining score is
reduced. However, the chaining score of its suboptimal chain remains the same.
This leads to underestimated mapping quality.
2017-11-07 23:20:49 -05:00
Heng Li a3f0aa1d5b r550: fixed -L issues with secondary and supp aln 2017-11-04 12:13:38 -04:00
Heng Li 4683da2455 r520: added option -L to write long cigar to CG 2017-10-17 17:32:44 -04:00
Heng Li adf6cd7f52 r513: merged pre- and post-cigar blen and mlen
This saves a bit memory and is cleaner.
2017-10-16 10:55:18 -04:00
Heng Li e6f525edaf r512: option to filter poorly aligned reads 2017-10-16 10:38:22 -04:00
Heng Li dea3b60918 r510: fixed an off-by-1 bug for unmapped mate 2017-10-12 17:31:13 -04:00