diff --git a/minimap.h b/minimap.h index 6f571fa..3223a8d 100644 --- a/minimap.h +++ b/minimap.h @@ -5,7 +5,7 @@ #include #include -#define MM_VERSION "2.28-r1240-dirty" +#define MM_VERSION "2.28-r1241-dirty" #define MM_F_NO_DIAG (0x001LL) // no exact diagonal hit #define MM_F_NO_DUAL (0x002LL) // skip pairs where query name is lexicographically larger than target name diff --git a/minimap2.1 b/minimap2.1 index 6943b8e..59bff44 100644 --- a/minimap2.1 +++ b/minimap2.1 @@ -414,7 +414,7 @@ no attempt to match GT-AG [n] Score bonus when alignment extends to the end of the query sequence [0]. .TP .BI --score-N \ INT -Score of a mismatch involving ambiguous bases [1]. +Penalty of a mismatch involving ambiguous bases [1]. .TP .BI --pe-ind-chain For paired-end short reads, perform chaining for each end independently. diff --git a/options.c b/options.c index 2a6032c..0fb6af7 100644 --- a/options.c +++ b/options.c @@ -249,6 +249,11 @@ int mm_check_opt(const mm_idxopt_t *io, const mm_mapopt_t *mo) fprintf(stderr, "[ERROR]\033[1;31m scoring system violating ({-O}+{-E})+({-O2}+{-E2}) <= 127\033[0m\n"); return -1; } + if (mo->sc_ambi < 0 || mo->sc_ambi >= mo->b) { + if (mm_verbose >= 1) + fprintf(stderr, "[ERROR]\033[1;31m --score-N should be within [0,{-B})\033[0m\n"); + return -1; + } if (mo->zdrop < mo->zdrop_inv) { if (mm_verbose >= 1) fprintf(stderr, "[ERROR]\033[1;31m Z-drop should not be less than inversion-Z-drop\033[0m\n");