Skip to content

Commit

Permalink
Merge pull request #40 from kdm9/report-error
Browse files Browse the repository at this point in the history
Report errors mapping amino acids
  • Loading branch information
lh3 authored Apr 11, 2023
2 parents 64e72b9 + aa6daae commit e61d7b4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,13 @@ int main(int argc, char *argv[])
if (set_I && !set_G) mp_mapopt_set_max_intron(&mo, mi->nt->l_seq);
if (mp_verbose >= 3) mp_idx_print_stat(mi, mo.max_occ);
if (fn_idx != 0) mp_idx_dump(fn_idx, mi);
for (i = o.ind + 1; i < argc; ++i)
mp_map_file(mi, argv[i], &mo, n_threads);
for (i = o.ind + 1; i < argc; ++i) {
int32_t res = mp_map_file(mi, argv[i], &mo, n_threads);
if (res != 0) {
fprintf(stderr, "[M::%s] ERROR during mapping %s (check files exists and are amino acid fastas)\n", __func__, argv[i]);
return 1;
}
}
mp_idx_destroy(mi);

if (mp_verbose >= 3) {
Expand Down

0 comments on commit e61d7b4

Please sign in to comment.