r463: optionally disable secondary hits
This commit is contained in:
parent
5babf41a38
commit
2581c44a21
7
main.c
7
main.c
|
|
@ -6,7 +6,7 @@
|
||||||
#include "mmpriv.h"
|
#include "mmpriv.h"
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
|
|
||||||
#define MM_VERSION "2.2-r462-dirty"
|
#define MM_VERSION "2.2-r463-dirty"
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
@ -40,6 +40,7 @@ static struct option long_options[] = {
|
||||||
{ "multi", optional_argument, 0, 0 },
|
{ "multi", optional_argument, 0, 0 },
|
||||||
{ "no-long-join", no_argument, 0, 0 },
|
{ "no-long-join", no_argument, 0, 0 },
|
||||||
{ "seed", required_argument, 0, 0 },
|
{ "seed", required_argument, 0, 0 },
|
||||||
|
{ "print-2nd", optional_argument, 0, 0 },
|
||||||
{ "help", no_argument, 0, 'h' },
|
{ "help", no_argument, 0, 'h' },
|
||||||
{ "max-intron-len", required_argument, 0, 'G' },
|
{ "max-intron-len", required_argument, 0, 'G' },
|
||||||
{ "version", no_argument, 0, 'V' },
|
{ "version", no_argument, 0, 'V' },
|
||||||
|
|
@ -124,6 +125,10 @@ int main(int argc, char *argv[])
|
||||||
if (optarg == 0 || strcmp(optarg, "yes") == 0 || strcmp(optarg, "y") == 0)
|
if (optarg == 0 || strcmp(optarg, "yes") == 0 || strcmp(optarg, "y") == 0)
|
||||||
opt.flag |= MM_F_MULTI_SEG;
|
opt.flag |= MM_F_MULTI_SEG;
|
||||||
else opt.flag &= ~MM_F_MULTI_SEG;
|
else opt.flag &= ~MM_F_MULTI_SEG;
|
||||||
|
} else if (c == 0 && long_idx ==17) { // --print-2nd
|
||||||
|
if (optarg == 0 || strcmp(optarg, "yes") == 0 || strcmp(optarg, "y") == 0)
|
||||||
|
opt.flag &= ~MM_F_NO_PRINT_2ND;
|
||||||
|
else opt.flag |= MM_F_NO_PRINT_2ND;
|
||||||
} else if (c == 'V') {
|
} else if (c == 'V') {
|
||||||
puts(MM_VERSION);
|
puts(MM_VERSION);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
5
map.c
5
map.c
|
|
@ -80,7 +80,7 @@ int mm_set_opt(const char *preset, mm_idxopt_t *io, mm_mapopt_t *mo)
|
||||||
mo->min_dp_max = 200;
|
mo->min_dp_max = 200;
|
||||||
} else if (strcmp(preset, "short") == 0 || strcmp(preset, "sr") == 0) {
|
} else if (strcmp(preset, "short") == 0 || strcmp(preset, "sr") == 0) {
|
||||||
io->is_hpc = 0, io->k = 21, io->w = 11;
|
io->is_hpc = 0, io->k = 21, io->w = 11;
|
||||||
mo->flag |= MM_F_SR | MM_F_MULTI_SEG;
|
mo->flag |= MM_F_SR | MM_F_MULTI_SEG | MM_F_NO_PRINT_2ND;
|
||||||
mo->pe_ori = 0<<1|1; // FR
|
mo->pe_ori = 0<<1|1; // FR
|
||||||
mo->a = 2, mo->b = 8, mo->q = 12, mo->e = 2, mo->q2 = 32, mo->e2 = 1;
|
mo->a = 2, mo->b = 8, mo->q = 12, mo->e = 2, mo->q2 = 32, mo->e2 = 1;
|
||||||
mo->max_gap = 200;
|
mo->max_gap = 200;
|
||||||
|
|
@ -452,6 +452,9 @@ static void *worker_pipeline(void *shared, int step, void *in)
|
||||||
mm_bseq1_t *t = &s->seq[i];
|
mm_bseq1_t *t = &s->seq[i];
|
||||||
for (j = 0; j < s->n_reg[i]; ++j) {
|
for (j = 0; j < s->n_reg[i]; ++j) {
|
||||||
mm_reg1_t *r = &s->reg[i][j];
|
mm_reg1_t *r = &s->reg[i][j];
|
||||||
|
assert(!r->sam_pri || r->id == r->parent);
|
||||||
|
if ((p->opt->flag & MM_F_NO_PRINT_2ND) && r->id != r->parent)
|
||||||
|
continue;
|
||||||
if (p->opt->flag & MM_F_OUT_SAM)
|
if (p->opt->flag & MM_F_OUT_SAM)
|
||||||
mm_write_sam(&p->str, mi, t, r, s->n_reg[i], s->reg[i]);
|
mm_write_sam(&p->str, mi, t, r, s->n_reg[i], s->reg[i]);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue