r489: don't use approximate zdrop

it doesn't work well
This commit is contained in:
Heng Li 2017-10-08 19:29:09 -04:00
parent 61e56c941d
commit f9415628a8
2 changed files with 6 additions and 9 deletions

View File

@ -141,11 +141,6 @@ static void mm_align_pair(void *km, const mm_mapopt_t *opt, int qlen, const uint
for (i = 0; i < qlen; ++i) fputc("ACGTN"[qseq[i]], stderr); for (i = 0; i < qlen; ++i) fputc("ACGTN"[qseq[i]], stderr);
fputc('\n', stderr); fputc('\n', stderr);
} }
if (opt->flag & MM_F_SR) {
zdrop = (qlen < tlen? qlen : tlen) * opt->a; // zdrop disabled
flag |= KSW_EZ_APPROX_MAX;
if (flag & KSW_EZ_EXTZ_ONLY) flag |= KSW_EZ_APPROX_DROP;
}
if (opt->flag & MM_F_SPLICE) if (opt->flag & MM_F_SPLICE)
ksw_exts2_sse(km, qlen, qseq, tlen, tseq, 5, mat, opt->q, opt->e, opt->q2, opt->noncan, zdrop, flag, ez); ksw_exts2_sse(km, qlen, qseq, tlen, tseq, 5, mat, opt->q, opt->e, opt->q2, opt->noncan, zdrop, flag, ez);
else if (opt->q == opt->q2 && opt->e == opt->e2) else if (opt->q == opt->q2 && opt->e == opt->e2)
@ -270,9 +265,9 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
bw = (int)(opt->bw * 1.5 + 1.); bw = (int)(opt->bw * 1.5 + 1.);
r2->cnt = 0; r2->cnt = 0;
as1 = r->as, cnt1 = r->cnt;
if (!(opt->flag & MM_F_SPLICE)) if (!(opt->flag & MM_F_SPLICE))
mm_fix_bad_ends(r, a, opt->bw, &as1, &cnt1); mm_fix_bad_ends(r, a, opt->bw, &as1, &cnt1);
else as1 = r->as, cnt1 = r->cnt;
mm_filter_bad_seeds(km, as1, cnt1, a, 10, 40, opt->max_gap>>1, 10); mm_filter_bad_seeds(km, as1, cnt1, a, 10, 40, opt->max_gap>>1, 10);
mm_adjust_minier(mi, qseq0, &a[as1], &rs, &qs); mm_adjust_minier(mi, qseq0, &a[as1], &rs, &qs);
mm_adjust_minier(mi, qseq0, &a[as1 + cnt1 - 1], &re, &qe); mm_adjust_minier(mi, qseq0, &a[as1 + cnt1 - 1], &re, &qe);
@ -290,6 +285,7 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
l = qs < opt->max_gap? qs : opt->max_gap; l = qs < opt->max_gap? qs : opt->max_gap;
qs0 = qs - l; qs0 = qs - l;
l += l * opt->a > opt->q? (l * opt->a - opt->q) / opt->e : 0; l += l * opt->a > opt->q? (l * opt->a - opt->q) / opt->e : 0;
if (!(opt->flag & MM_F_SR))
l = l < opt->max_gap? l : opt->max_gap; l = l < opt->max_gap? l : opt->max_gap;
l = l < rs? l : rs; l = l < rs? l : rs;
rs0 = rs - l; rs0 = rs - l;
@ -301,6 +297,7 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
l = qlen - qe < opt->max_gap? qlen - qe : opt->max_gap; l = qlen - qe < opt->max_gap? qlen - qe : opt->max_gap;
qe0 = qe + l; qe0 = qe + l;
l += l * opt->a > opt->q? (l * opt->a - opt->q) / opt->e : 0; l += l * opt->a > opt->q? (l * opt->a - opt->q) / opt->e : 0;
if (!(opt->flag & MM_F_SR))
l = l < opt->max_gap? l : opt->max_gap; l = l < opt->max_gap? l : opt->max_gap;
l = l < mi->seq[rid].len - re? l : mi->seq[rid].len - re; l = l < mi->seq[rid].len - re? l : mi->seq[rid].len - re;
re0 = re + l; re0 = re + l;

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h" #include "mmpriv.h"
#include "getopt.h" #include "getopt.h"
#define MM_VERSION "2.2-r488-dirty" #define MM_VERSION "2.2-r489-dirty"
#ifdef __linux__ #ifdef __linux__
#include <sys/resource.h> #include <sys/resource.h>