Skip to content

Commit

Permalink
bug fix: print error message for missing fastq
Browse files Browse the repository at this point in the history
Addresses Issue #38. If a FASTQ file is missing, biscuit align will now
print an error message that the file is unable to be opened.
  • Loading branch information
jamorrison committed Aug 9, 2023
1 parent b648406 commit 8db341a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/aln/align.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ int main_align(int argc, char *argv[]) {
return 1;
}
fp = gzdopen(fd, "r");
if (!fp) {
if (bwa_verbose >= 1) fprintf(stderr, "[E::%s] fail to open file `%s'.\n", __func__, argv[optind + 1]);
return 1;
}
aux.ks = kseq_init(fp);
if (optind + 2 < argc) {
if (opt->flag&MEM_F_PE) {
Expand All @@ -555,6 +559,10 @@ int main_align(int argc, char *argv[]) {
return 1;
}
fp2 = gzdopen(fd2, "r");
if (!fp2) {
if (bwa_verbose >= 1) fprintf(stderr, "[E::%s] fail to open file `%s'.\n", __func__, argv[optind + 2]);
return 1;
}
aux.ks2 = kseq_init(fp2);
opt->flag |= MEM_F_PE;
}
Expand Down

0 comments on commit 8db341a

Please sign in to comment.