replaced --approx-ext with --sr
--sr disables Z-drop and may come with other heurstics
This commit is contained in:
parent
4979e66ff0
commit
7a9b4db874
10
align.c
10
align.c
|
|
@ -136,6 +136,7 @@ static void mm_append_cigar(mm_reg1_t *r, uint32_t n_cigar, uint32_t *cigar) //
|
||||||
|
|
||||||
static void mm_align_pair(void *km, const mm_mapopt_t *opt, int qlen, const uint8_t *qseq, int tlen, const uint8_t *tseq, const int8_t *mat, int w, int flag, ksw_extz_t *ez)
|
static void mm_align_pair(void *km, const mm_mapopt_t *opt, int qlen, const uint8_t *qseq, int tlen, const uint8_t *tseq, const int8_t *mat, int w, int flag, ksw_extz_t *ez)
|
||||||
{
|
{
|
||||||
|
int zdrop = opt->zdrop;
|
||||||
if (mm_dbg_flag & MM_DBG_PRINT_ALN_SEQ) {
|
if (mm_dbg_flag & MM_DBG_PRINT_ALN_SEQ) {
|
||||||
int i;
|
int i;
|
||||||
fprintf(stderr, "===> q=(%d,%d), e=(%d,%d), bw=%d, flag=%d, zdrop=%d <===\n", opt->q, opt->q2, opt->e, opt->e2, w, flag, opt->zdrop);
|
fprintf(stderr, "===> q=(%d,%d), e=(%d,%d), bw=%d, flag=%d, zdrop=%d <===\n", opt->q, opt->q2, opt->e, opt->e2, w, flag, opt->zdrop);
|
||||||
|
|
@ -144,16 +145,17 @@ static void mm_align_pair(void *km, const mm_mapopt_t *opt, int qlen, const uint
|
||||||
for (i = 0; i < qlen; ++i) fputc("ACGTN"[qseq[i]], stderr);
|
for (i = 0; i < qlen; ++i) fputc("ACGTN"[qseq[i]], stderr);
|
||||||
fputc('\n', stderr);
|
fputc('\n', stderr);
|
||||||
}
|
}
|
||||||
if (opt->flag & MM_F_APPROX_EXT) {
|
if (opt->flag & MM_F_SR) {
|
||||||
|
zdrop = (qlen < tlen? qlen : tlen) * opt->a; // zdrop disabled
|
||||||
flag |= KSW_EZ_APPROX_MAX;
|
flag |= KSW_EZ_APPROX_MAX;
|
||||||
if (flag & KSW_EZ_EXTZ_ONLY) flag |= KSW_EZ_APPROX_DROP;
|
if (flag & KSW_EZ_EXTZ_ONLY) flag |= KSW_EZ_APPROX_DROP;
|
||||||
}
|
}
|
||||||
if (opt->flag & MM_F_SPLICE)
|
if (opt->flag & MM_F_SPLICE)
|
||||||
ksw_exts2_sse(km, qlen, qseq, tlen, tseq, 5, mat, opt->q, opt->e, opt->q2, opt->noncan, opt->zdrop, flag, ez);
|
ksw_exts2_sse(km, qlen, qseq, tlen, tseq, 5, mat, opt->q, opt->e, opt->q2, opt->noncan, zdrop, flag, ez);
|
||||||
else if (opt->q == opt->q2 && opt->e == opt->e2)
|
else if (opt->q == opt->q2 && opt->e == opt->e2)
|
||||||
ksw_extz2_sse(km, qlen, qseq, tlen, tseq, 5, mat, opt->q, opt->e, w, opt->zdrop, flag, ez);
|
ksw_extz2_sse(km, qlen, qseq, tlen, tseq, 5, mat, opt->q, opt->e, w, zdrop, flag, ez);
|
||||||
else
|
else
|
||||||
ksw_extd2_sse(km, qlen, qseq, tlen, tseq, 5, mat, opt->q, opt->e, opt->q2, opt->e2, w, opt->zdrop, flag, ez);
|
ksw_extd2_sse(km, qlen, qseq, tlen, tseq, 5, mat, opt->q, opt->e, opt->q2, opt->e2, w, zdrop, flag, ez);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int mm_get_hplen_back(const mm_idx_t *mi, uint32_t rid, uint32_t x)
|
static inline int mm_get_hplen_back(const mm_idx_t *mi, uint32_t rid, uint32_t x)
|
||||||
|
|
|
||||||
4
main.c
4
main.c
|
|
@ -36,7 +36,7 @@ static struct option long_options[] = {
|
||||||
{ "splice", no_argument, 0, 0 },
|
{ "splice", no_argument, 0, 0 },
|
||||||
{ "cost-non-gt-ag", required_argument, 0, 0 },
|
{ "cost-non-gt-ag", required_argument, 0, 0 },
|
||||||
{ "no-sam-sq", no_argument, 0, 0 },
|
{ "no-sam-sq", no_argument, 0, 0 },
|
||||||
{ "approx-ext", no_argument, 0, 0 },
|
{ "sr", no_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' },
|
||||||
|
|
@ -114,7 +114,7 @@ int main(int argc, char *argv[])
|
||||||
else if (c == 0 && long_idx ==10) opt.flag |= MM_F_SPLICE; // --splice
|
else if (c == 0 && long_idx ==10) opt.flag |= MM_F_SPLICE; // --splice
|
||||||
else if (c == 0 && long_idx ==11) opt.noncan = atoi(optarg); // --cost-non-gt-ag
|
else if (c == 0 && long_idx ==11) opt.noncan = atoi(optarg); // --cost-non-gt-ag
|
||||||
else if (c == 0 && long_idx ==12) opt.flag |= MM_F_NO_SAM_SQ; // --no-sam-sq
|
else if (c == 0 && long_idx ==12) opt.flag |= MM_F_NO_SAM_SQ; // --no-sam-sq
|
||||||
else if (c == 0 && long_idx ==13) opt.flag |= MM_F_APPROX_EXT; // --approx-ext
|
else if (c == 0 && long_idx ==13) opt.flag |= MM_F_SR; // --sr
|
||||||
else if (c == 'V') {
|
else if (c == 'V') {
|
||||||
puts(MM_VERSION);
|
puts(MM_VERSION);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
2
map.c
2
map.c
|
|
@ -75,7 +75,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_APPROX_EXT;
|
mo->flag |= MM_F_SR;
|
||||||
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 = 100;
|
mo->max_gap = 100;
|
||||||
mo->pri_ratio = 0.5f;
|
mo->pri_ratio = 0.5f;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
#define MM_F_SPLICE_REV 0x200
|
#define MM_F_SPLICE_REV 0x200
|
||||||
#define MM_F_SPLICE_BOTH 0x400
|
#define MM_F_SPLICE_BOTH 0x400
|
||||||
#define MM_F_NO_SAM_SQ 0x800
|
#define MM_F_NO_SAM_SQ 0x800
|
||||||
#define MM_F_APPROX_EXT 0x1000
|
#define MM_F_SR 0x1000
|
||||||
|
|
||||||
#define MM_IDX_MAGIC "MMI\2"
|
#define MM_IDX_MAGIC "MMI\2"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.TH minimap2 1 "17 September 2017" "minimap2-2.2 (r409)" "Bioinformatics tools"
|
.TH minimap2 1 "20 September 2017" "minimap2-2.2 (r420)" "Bioinformatics tools"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.PP
|
.PP
|
||||||
minimap2 - mapping and alignment between collections of DNA sequences
|
minimap2 - mapping and alignment between collections of DNA sequences
|
||||||
|
|
@ -338,7 +338,7 @@ tag ignores introns to demote hits to pseudogenes.
|
||||||
Short single-end reads without splicing
|
Short single-end reads without splicing
|
||||||
.RB ( -k21
|
.RB ( -k21
|
||||||
.B -w11 -A2 -B8 -O12,32 -E2,1 -r50 -p.5 -N20 -f1000 -n2 -m20 -s40 -g100 -K50m
|
.B -w11 -A2 -B8 -O12,32 -E2,1 -r50 -p.5 -N20 -f1000 -n2 -m20 -s40 -g100 -K50m
|
||||||
.BR --approx-ext ).
|
.BR --sr ).
|
||||||
.RE
|
.RE
|
||||||
.SS Miscellaneous options
|
.SS Miscellaneous options
|
||||||
.TP 10
|
.TP 10
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue