diff --git a/ksw2_exts2_sse.c b/ksw2_exts2_sse.c index cfb32a1..c16866d 100644 --- a/ksw2_exts2_sse.c +++ b/ksw2_exts2_sse.c @@ -191,7 +191,13 @@ void ksw_exts2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uin } } - if (junc && !(flag & KSW_EZ_SPLICE_SCORE)) { + if (junc && (flag & KSW_EZ_SPLICE_SCORE)) { // junc[] keeps the donor score + uint8_t donor_val = !(flag & KSW_EZ_REV_CIGAR)? 0 : 1; + for (t = 0; t < tlen - 1; ++t) + ((int8_t*)donor)[t] += junc[t+1] == 0xff? -junc_pen : (junc[t+1]&1) == donor_val? (int8_t)(junc[t+1]>>1) - (int8_t)KSW_SPSC_OFFSET : 0; + for (t = 0; t < tlen - 1; ++t) + ((int8_t*)acceptor)[t] += junc[t+1] == 0xff? -junc_pen : (junc[t+1]&1) == !donor_val? (int8_t)(junc[t+1]>>1) - (int8_t)KSW_SPSC_OFFSET : 0; + } else if (junc) { // junc[] keeps the splice sites if (!(flag & KSW_EZ_REV_CIGAR)) { for (t = 0; t < tlen - 1; ++t) if (((flag & KSW_EZ_SPLICE_FOR) && (junc[t+1]&1)) || ((flag & KSW_EZ_SPLICE_REV) && (junc[t+1]&8))) @@ -207,10 +213,6 @@ void ksw_exts2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uin if (((flag & KSW_EZ_SPLICE_FOR) && (junc[t]&1)) || ((flag & KSW_EZ_SPLICE_REV) && (junc[t]&8))) ((int8_t*)acceptor)[t] += junc_bonus; } - } else if (junc) { - if (!(flag & KSW_EZ_REV_CIGAR)) { - } else { - } } for (r = 0, last_st = last_en = -1; r < qlen + tlen - 1; ++r) {