From fcb5d5e6eb9f107b7ec30e4cef81d483b7bf9574 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Tue, 15 Oct 2024 22:44:06 -0400 Subject: [PATCH] r1221: warn about file reading errors Resolves #1229 --- main.c | 12 ++++++++++-- minimap.h | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 46a47117..68a1205d 100644 --- a/main.c +++ b/main.c @@ -435,8 +435,16 @@ int main(int argc, char *argv[]) __func__, realtime() - mm_realtime0, cputime() / (realtime() - mm_realtime0), mi->n_seq); if (argc != o.ind + 1) mm_mapopt_update(&opt, mi); if (mm_verbose >= 3) mm_idx_stat(mi); - if (junc_bed) mm_idx_bed_read(mi, junc_bed, 1); - if (fn_spsc) mm_idx_spsc_read(mi, fn_spsc, mm_max_spsc_bonus(&opt)); + if (junc_bed) { + mm_idx_bed_read(mi, junc_bed, 1); + if (mi->I == 0 && mm_verbose >= 2) + fprintf(stderr, "[WARNING] failed to load the junction BED file\n"); + } + if (fn_spsc) { + mm_idx_spsc_read(mi, fn_spsc, mm_max_spsc_bonus(&opt)); + if (mi->spsc == 0 && mm_verbose >= 2) + fprintf(stderr, "[WARNING] failed to load the splice score file\n"); + } if (alt_list) mm_idx_alt_read(mi, alt_list); if (argc - (o.ind + 1) == 0) { mm_idx_destroy(mi); diff --git a/minimap.h b/minimap.h index 9678d1fc..03893481 100644 --- a/minimap.h +++ b/minimap.h @@ -5,7 +5,7 @@ #include #include -#define MM_VERSION "2.28-r1216-dirty" +#define MM_VERSION "2.28-r1221-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