X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=misc%2Fbamcheck.c;h=c7db8abfb8c153fcc5a95c947a6013e258e6e95a;hb=1ef8ee37fa796dd58e4c18681939a2fafe84ee0c;hp=e5bfb5d0e1db18a0c182349ae0734294451331fc;hpb=c560dcebed800084f30f3c277d13e6fd8629908c;p=samtools.git diff --git a/misc/bamcheck.c b/misc/bamcheck.c index e5bfb5d..c7db8ab 100644 --- a/misc/bamcheck.c +++ b/misc/bamcheck.c @@ -15,7 +15,7 @@ */ -#define BAMCHECK_VERSION "2012-04-23" +#define BAMCHECK_VERSION "2012-04-24" #define _ISOC99_SOURCE #include @@ -1082,7 +1082,7 @@ void init_regions(stats_t *stats, char *file) if ( iter == kh_end(header_hash) ) { if ( !warned ) - fprintf(stderr,"Warning: Some sequences not present in the BAM (%s)\n", line); + fprintf(stderr,"Warning: Some sequences not present in the BAM, e.g. \"%s\". This message is printed only once.\n", line); warned = 1; continue; } @@ -1116,6 +1116,7 @@ void init_regions(stats_t *stats, char *file) stats->regions[tid].npos++; } if (line) free(line); + if ( !stats->regions ) error("Unable to map the -t sequences to the BAM sequences.\n"); fclose(fp); }