r149: introduced debugging flags on CLI
This commit is contained in:
parent
2e4fd9f1d0
commit
53c4bf5e4f
10
main.c
10
main.c
|
|
@ -10,7 +10,7 @@
|
||||||
#include "minimap.h"
|
#include "minimap.h"
|
||||||
#include "mmpriv.h"
|
#include "mmpriv.h"
|
||||||
|
|
||||||
#define MM_VERSION "2.0-r148-pre"
|
#define MM_VERSION "2.0-r149-pre"
|
||||||
|
|
||||||
void liftrlimit()
|
void liftrlimit()
|
||||||
{
|
{
|
||||||
|
|
@ -45,6 +45,8 @@ static struct option long_options[] = {
|
||||||
{ "bucket-bits", required_argument, 0, 0 },
|
{ "bucket-bits", required_argument, 0, 0 },
|
||||||
{ "mb-size", required_argument, 0, 0 },
|
{ "mb-size", required_argument, 0, 0 },
|
||||||
{ "int-rname", no_argument, 0, 0 },
|
{ "int-rname", no_argument, 0, 0 },
|
||||||
|
{ "no-kalloc", no_argument, 0, 0 },
|
||||||
|
{ "print-qname", no_argument, 0, 0 },
|
||||||
{ "version", no_argument, 0, 'V' },
|
{ "version", no_argument, 0, 'V' },
|
||||||
{ "min-count", required_argument, 0, 'n' },
|
{ "min-count", required_argument, 0, 'n' },
|
||||||
{ "min-chain-score",required_argument, 0, 'm' },
|
{ "min-chain-score",required_argument, 0, 'm' },
|
||||||
|
|
@ -94,8 +96,10 @@ int main(int argc, char *argv[])
|
||||||
else if (c == 'E') opt.e = atoi(optarg);
|
else if (c == 'E') opt.e = atoi(optarg);
|
||||||
else if (c == 'z') opt.zdrop = atoi(optarg);
|
else if (c == 'z') opt.zdrop = atoi(optarg);
|
||||||
else if (c == 's') opt.min_dp_max = atoi(optarg);
|
else if (c == 's') opt.min_dp_max = atoi(optarg);
|
||||||
else if (c == 0 && long_idx == 0) bucket_bits = atoi(optarg); // bucket-bits
|
else if (c == 0 && long_idx == 0) bucket_bits = atoi(optarg); // --bucket-bits
|
||||||
else if (c == 0 && long_idx == 2) keep_name = 0; // int-rname
|
else if (c == 0 && long_idx == 2) keep_name = 0; // --int-rname
|
||||||
|
else if (c == 0 && long_idx == 3) mm_dbg_flag |= MM_DBG_NO_KALLOC; // --no-kalloc
|
||||||
|
else if (c == 0 && long_idx == 4) mm_dbg_flag |= MM_DBG_PRINT_QNAME; // --print-qname
|
||||||
else if (c == 'V') {
|
else if (c == 'V') {
|
||||||
puts(MM_VERSION);
|
puts(MM_VERSION);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
5
map.c
5
map.c
|
|
@ -64,7 +64,7 @@ mm_tbuf_t *mm_tbuf_init(void)
|
||||||
{
|
{
|
||||||
mm_tbuf_t *b;
|
mm_tbuf_t *b;
|
||||||
b = (mm_tbuf_t*)calloc(1, sizeof(mm_tbuf_t));
|
b = (mm_tbuf_t*)calloc(1, sizeof(mm_tbuf_t));
|
||||||
if (mm_verbose < 10) b->km = km_init();
|
if (!(mm_dbg_flag & 1)) b->km = km_init();
|
||||||
b->sdb = sdust_buf_init(b->km);
|
b->sdb = sdust_buf_init(b->km);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
@ -262,7 +262,6 @@ mm_reg1_t *mm_map_frag(const mm_mapopt_t *opt, const mm_idx_t *mi, mm_tbuf_t *b,
|
||||||
mm_reg1_t *mm_map(const mm_idx_t *mi, int l_seq, const char *seq, int *n_regs, mm_tbuf_t *b, const mm_mapopt_t *opt, const char *qname)
|
mm_reg1_t *mm_map(const mm_idx_t *mi, int l_seq, const char *seq, int *n_regs, mm_tbuf_t *b, const mm_mapopt_t *opt, const char *qname)
|
||||||
{
|
{
|
||||||
mm_reg1_t *regs;
|
mm_reg1_t *regs;
|
||||||
if (mm_verbose >= 11) fprintf(stderr, "===> %s <===\n", qname);
|
|
||||||
b->mini.n = 0;
|
b->mini.n = 0;
|
||||||
mm_sketch(b->km, seq, l_seq, mi->w, mi->k, 0, mi->is_hpc, &b->mini);
|
mm_sketch(b->km, seq, l_seq, mi->w, mi->k, 0, mi->is_hpc, &b->mini);
|
||||||
if (opt->sdust_thres > 0)
|
if (opt->sdust_thres > 0)
|
||||||
|
|
@ -295,6 +294,8 @@ typedef struct {
|
||||||
static void worker_for(void *_data, long i, int tid) // kt_for() callback
|
static void worker_for(void *_data, long i, int tid) // kt_for() callback
|
||||||
{
|
{
|
||||||
step_t *step = (step_t*)_data;
|
step_t *step = (step_t*)_data;
|
||||||
|
if (mm_dbg_flag & MM_DBG_PRINT_QNAME)
|
||||||
|
fprintf(stderr, "Processing query %s on thread %d\n", step->seq[i].name, tid);
|
||||||
step->reg[i] = mm_map(step->p->mi, step->seq[i].l_seq, step->seq[i].seq, &step->n_reg[i], step->buf[tid], step->p->opt, step->seq[i].name);
|
step->reg[i] = mm_map(step->p->mi, step->seq[i].l_seq, step->seq[i].seq, &step->n_reg[i], step->buf[tid], step->p->opt, step->seq[i].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ typedef struct {
|
||||||
int mid_occ;
|
int mid_occ;
|
||||||
} mm_mapopt_t;
|
} mm_mapopt_t;
|
||||||
|
|
||||||
extern int mm_verbose;
|
extern int mm_verbose, mm_dbg_flag;
|
||||||
extern double mm_realtime0;
|
extern double mm_realtime0;
|
||||||
|
|
||||||
struct mm_tbuf_s;
|
struct mm_tbuf_s;
|
||||||
|
|
|
||||||
1
misc.c
1
misc.c
|
|
@ -3,6 +3,7 @@
|
||||||
#include "minimap.h"
|
#include "minimap.h"
|
||||||
|
|
||||||
int mm_verbose = 3;
|
int mm_verbose = 3;
|
||||||
|
int mm_dbg_flag = 0;
|
||||||
double mm_realtime0;
|
double mm_realtime0;
|
||||||
|
|
||||||
double cputime()
|
double cputime()
|
||||||
|
|
|
||||||
3
mmpriv.h
3
mmpriv.h
|
|
@ -8,6 +8,9 @@
|
||||||
#define MM_PARENT_UNSET (-1)
|
#define MM_PARENT_UNSET (-1)
|
||||||
#define MM_PARENT_TMP_PRI (-2)
|
#define MM_PARENT_TMP_PRI (-2)
|
||||||
|
|
||||||
|
#define MM_DBG_NO_KALLOC 0x1
|
||||||
|
#define MM_DBG_PRINT_QNAME 0x2
|
||||||
|
|
||||||
#ifndef kroundup32
|
#ifndef kroundup32
|
||||||
#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
|
#define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue