r941: set a min length for 3rd-round seeding
This commit is contained in:
parent
282130a64e
commit
60b728487a
4
bwamem.c
4
bwamem.c
|
|
@ -147,7 +147,7 @@ static void mem_collect_intv(const mem_opt_t *opt, const bwt_t *bwt, int len, co
|
||||||
if (seq[x] < 4) {
|
if (seq[x] < 4) {
|
||||||
if (1) {
|
if (1) {
|
||||||
bwtintv_t m;
|
bwtintv_t m;
|
||||||
x = bwt_seed_strategy1(bwt, len, seq, x, opt->max_mem_intv, &m);
|
x = bwt_seed_strategy1(bwt, len, seq, x, opt->min_seed_len, opt->max_mem_intv, &m);
|
||||||
if (m.x[2] > 0) kv_push(bwtintv_t, a->mem, m);
|
if (m.x[2] > 0) kv_push(bwtintv_t, a->mem, m);
|
||||||
} else { // for now, we never come to this block which is slower
|
} else { // for now, we never come to this block which is slower
|
||||||
x = bwt_smem1a(bwt, len, seq, x, start_width, opt->max_mem_intv, &a->mem1, a->tmpv);
|
x = bwt_smem1a(bwt, len, seq, x, start_width, opt->max_mem_intv, &a->mem1, a->tmpv);
|
||||||
|
|
@ -274,7 +274,7 @@ mem_chain_v mem_chain(const mem_opt_t *opt, const bwt_t *bwt, const bntseq_t *bn
|
||||||
bwtintv_t *p = &aux->mem.a[i];
|
bwtintv_t *p = &aux->mem.a[i];
|
||||||
int step, count, slen = (uint32_t)p->info - (p->info>>32); // seed length
|
int step, count, slen = (uint32_t)p->info - (p->info>>32); // seed length
|
||||||
int64_t k;
|
int64_t k;
|
||||||
if (slen < opt->min_seed_len) continue; // ignore if too short or too repetitive
|
// if (slen < opt->min_seed_len) continue; // ignore if too short or too repetitive
|
||||||
step = p->x[2] > opt->max_occ? p->x[2] / opt->max_occ : 1;
|
step = p->x[2] > opt->max_occ? p->x[2] / opt->max_occ : 1;
|
||||||
for (k = count = 0; k < p->x[2] && count < opt->max_occ; k += step, ++count) {
|
for (k = count = 0; k < p->x[2] && count < opt->max_occ; k += step, ++count) {
|
||||||
mem_chain_t tmp, *lower, *upper;
|
mem_chain_t tmp, *lower, *upper;
|
||||||
|
|
|
||||||
4
bwt.c
4
bwt.c
|
|
@ -355,7 +355,7 @@ int bwt_smem1(const bwt_t *bwt, int len, const uint8_t *q, int x, int min_intv,
|
||||||
return bwt_smem1a(bwt, len, q, x, min_intv, 0, mem, tmpvec);
|
return bwt_smem1a(bwt, len, q, x, min_intv, 0, mem, tmpvec);
|
||||||
}
|
}
|
||||||
|
|
||||||
int bwt_seed_strategy1(const bwt_t *bwt, int len, const uint8_t *q, int x, int max_intv, bwtintv_t *mem)
|
int bwt_seed_strategy1(const bwt_t *bwt, int len, const uint8_t *q, int x, int min_len, int max_intv, bwtintv_t *mem)
|
||||||
{
|
{
|
||||||
int i, c;
|
int i, c;
|
||||||
bwtintv_t ik, ok[4];
|
bwtintv_t ik, ok[4];
|
||||||
|
|
@ -367,7 +367,7 @@ int bwt_seed_strategy1(const bwt_t *bwt, int len, const uint8_t *q, int x, int m
|
||||||
if (q[i] < 4) { // an A/C/G/T base
|
if (q[i] < 4) { // an A/C/G/T base
|
||||||
c = 3 - q[i]; // complement of q[i]
|
c = 3 - q[i]; // complement of q[i]
|
||||||
bwt_extend(bwt, &ik, ok, 0);
|
bwt_extend(bwt, &ik, ok, 0);
|
||||||
if (ok[c].x[2] < max_intv) {
|
if (ok[c].x[2] < max_intv && i - x >= min_len) {
|
||||||
*mem = ok[c];
|
*mem = ok[c];
|
||||||
mem->info = (uint64_t)x<<32 | (i + 1);
|
mem->info = (uint64_t)x<<32 | (i + 1);
|
||||||
return i + 1;
|
return i + 1;
|
||||||
|
|
|
||||||
2
bwt.h
2
bwt.h
|
|
@ -121,7 +121,7 @@ extern "C" {
|
||||||
int bwt_smem1(const bwt_t *bwt, int len, const uint8_t *q, int x, int min_intv, bwtintv_v *mem, bwtintv_v *tmpvec[2]);
|
int bwt_smem1(const bwt_t *bwt, int len, const uint8_t *q, int x, int min_intv, bwtintv_v *mem, bwtintv_v *tmpvec[2]);
|
||||||
int bwt_smem1a(const bwt_t *bwt, int len, const uint8_t *q, int x, int min_intv, uint64_t max_intv, bwtintv_v *mem, bwtintv_v *tmpvec[2]);
|
int bwt_smem1a(const bwt_t *bwt, int len, const uint8_t *q, int x, int min_intv, uint64_t max_intv, bwtintv_v *mem, bwtintv_v *tmpvec[2]);
|
||||||
|
|
||||||
int bwt_seed_strategy1(const bwt_t *bwt, int len, const uint8_t *q, int x, int max_intv, bwtintv_t *mem);
|
int bwt_seed_strategy1(const bwt_t *bwt, int len, const uint8_t *q, int x, int min_len, int max_intv, bwtintv_t *mem);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
main.c
2
main.c
|
|
@ -4,7 +4,7 @@
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef PACKAGE_VERSION
|
#ifndef PACKAGE_VERSION
|
||||||
#define PACKAGE_VERSION "0.7.10-r940-dirty"
|
#define PACKAGE_VERSION "0.7.10-r941-dirty"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int bwa_fa2pac(int argc, char *argv[]);
|
int bwa_fa2pac(int argc, char *argv[]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue