diff --git a/CHANGES.txt b/CHANGES.txt index 1ba3e2993..b00554f5c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ * Symbol colors for `plotPCA` can now be specified. (issue #560) * `plotFingerprint` always returns the synthetic JSD, even if no `--JSDsample` is specified. (issue #564) * `plotEnrichment` will only read in annotation files a single time rather than in each thread. This prevents terrible performance when using many tens of millions of BED/GTF regions at the expense of a slight memory increase. (issue #530) + * Fixed a small bug generally affecting `plotFingerprint` where BAM files without an index were processed as bigWig files, resulting in a confusing error message (issue #574). Thanks to Sitanshu Gakkhar for poiting this out! 2.5.3 diff --git a/deeptools/countReadsPerBin.py b/deeptools/countReadsPerBin.py index 22ad2c5ef..d2ebbcf6a 100644 --- a/deeptools/countReadsPerBin.py +++ b/deeptools/countReadsPerBin.py @@ -278,6 +278,8 @@ def run(self, allArgs=None): for x in self.bamFilesList: try: y = bamHandler.openBam(x) + except SystemExit: + sys.exit(sys.exc_info()[1]) except: y = pyBigWig.open(x) bamFilesHandlers.append(y) @@ -424,6 +426,8 @@ def count_reads_in_region(self, chrom, start, end, bed_regions_list=None): for fname in self.bamFilesList: try: bam_handlers.append(bamHandler.openBam(fname)) + except SystemExit: + sys.exit(sys.exc_info()[1]) except: bam_handlers.append(pyBigWig.open(fname))