mirror of
https://github.com/lh3/minimap2.git
synced 2026-10-04 23:18:11 +08:00
r1285: better --spsc support
This commit is contained in:
@@ -85,6 +85,8 @@ static ko_longopt_t long_options[] = {
|
||||
{ "jump-min-match", ko_required_argument, 360 },
|
||||
{ "write-junc", ko_no_argument, 361 },
|
||||
{ "pass1", ko_required_argument, 362 },
|
||||
{ "spsc-scale", ko_required_argument, 363 },
|
||||
{ "spsc0", ko_required_argument, 364 },
|
||||
{ "dbg-seed-occ", ko_no_argument, 501 },
|
||||
{ "help", ko_no_argument, 'h' },
|
||||
{ "max-intron-len", ko_required_argument, 'G' },
|
||||
@@ -134,6 +136,7 @@ int main(int argc, char *argv[])
|
||||
mm_mapopt_t opt;
|
||||
mm_idxopt_t ipt;
|
||||
int i, c, n_threads = 3, n_parts, old_best_n = -1;
|
||||
float spsc_scale = 0.7f;
|
||||
char *fnw = 0, *rg = 0, *fn_bed_junc = 0, *fn_bed_jump = 0, *fn_bed_pass1 = 0, *fn_spsc = 0, *s, *alt_list = 0;
|
||||
FILE *fp_help = stderr;
|
||||
mm_idx_reader_t *idx_rdr;
|
||||
@@ -240,7 +243,6 @@ int main(int argc, char *argv[])
|
||||
else if (c == 338) opt.max_qlen = mm_parse_num(o.arg); // --max-qlen
|
||||
else if (c == 340) fn_bed_junc = o.arg; // --junc-bed
|
||||
else if (c == 341) opt.junc_bonus = atoi(o.arg); // --junc-bonus
|
||||
else if (c == 358) opt.junc_pen = atoi(o.arg); // --junc-pen
|
||||
else if (c == 342) opt.flag |= MM_F_SAM_HIT_ONLY; // --sam-hit-only
|
||||
else if (c == 343) opt.chain_gap_scale = atof(o.arg); // --chain-gap-scale
|
||||
else if (c == 351) opt.chain_skip_scale = atof(o.arg); // --chain-skip-scale
|
||||
@@ -260,6 +262,8 @@ int main(int argc, char *argv[])
|
||||
else if (c == 361) opt.flag |= MM_F_OUT_JUNC | MM_F_CIGAR; // --write-junc
|
||||
else if (c == 362) fn_bed_pass1 = o.arg; // --jump-pass1
|
||||
else if (c == 501) mm_dbg_flag |= MM_DBG_SEED_FREQ; // --dbg-seed-occ
|
||||
else if (c == 363) spsc_scale = atof(o.arg); // --spsc-scale
|
||||
else if (c == 358 || c == 364) opt.junc_pen = atoi(o.arg); // --junc-pen or --spsc0
|
||||
else if (c == 330) {
|
||||
fprintf(stderr, "[WARNING] \033[1;31m --lj-min-ratio has been deprecated.\033[0m\n");
|
||||
} else if (c == 313) { // --sr
|
||||
@@ -476,7 +480,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "[WARNING] failed to load the pass-1 jump BED file\n");
|
||||
}
|
||||
if (fn_spsc) {
|
||||
mm_idx_spsc_read(mi, fn_spsc, mm_max_spsc_bonus(&opt));
|
||||
mm_idx_spsc_read2(mi, fn_spsc, mm_max_spsc_bonus(&opt), spsc_scale);
|
||||
if (mi->spsc == 0 && mm_verbose >= 2)
|
||||
fprintf(stderr, "[WARNING] failed to load the splice score file\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user