Skip to content

Commit

Permalink
r260: tighter bound on max spsc score
Browse files Browse the repository at this point in the history
Intron open is applied once but spsc bonus is applied twice, so the max score
should be less than half of intron open.
  • Loading branch information
lh3 committed Oct 2, 2024
1 parent c3d4530 commit 0c97a5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ int main(int argc, char *argv[])
if (set_I && !set_G) mp_mapopt_set_max_intron(&mo, mi->nt->l_seq);
if (mp_verbose >= 3) mp_idx_print_stat(mi, mo.max_occ);
if (fn_idx != 0) mp_idx_dump(fn_idx, mi);
if (fn_spsc != 0) mp_ntseq_read_spsc(mi->nt, fn_spsc, mo.io - mo.go);
if (fn_spsc != 0) {
int32_t max_sc = (mo.io + 1) / 2 - 1;
max_sc = max_sc > mo.io - mo.go? max_sc : mo.io - mo.go;
mp_ntseq_read_spsc(mi->nt, fn_spsc, max_sc);
}
for (i = o.ind + 1; i < argc; ++i) {
int32_t res = mp_map_file(mi, argv[i], &mo, n_threads);
if (res != 0) {
Expand Down
2 changes: 1 addition & 1 deletion miniprot.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdint.h>

#define MP_VERSION "0.13-r259-dirty"
#define MP_VERSION "0.13-r260-dirty"

#define MP_F_NO_SPLICE 0x1
#define MP_F_NO_ALIGN 0x2
Expand Down

0 comments on commit 0c97a5b

Please sign in to comment.