Skip to content

Commit a9d5f0e

Browse files
committed
plotHeatmap --yMin ... doesn't work, apparently because --yMin and --yMax are taken as strings and not converted to np.float64s. We can manually do that.
1 parent 9271632 commit a9d5f0e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
2.3.6
22

33
* multiBamSummary will now not automatically append .npz to the output file name if it's not present. This was bug #436
4+
* Fixed a bug with plotHeatmap where --yMin and --yMax didn't work
45

56
2.3.5
67

deeptools/plotHeatmap.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,13 @@ def plotMatrix(hm, outFileName,
475475
ticks[0].label1.set_horizontalalignment('left')
476476
ticks[-1].label1.set_horizontalalignment('right')
477477

478-
# reduce the number of yticks by half
478+
# It turns out that set_ylim only takes np.float64s
479+
if yMin:
480+
yMin = np.float64(yMin)
481+
if yMax:
482+
yMax = np.float64(yMax)
479483
ax_list[0].set_ylim(yMin, yMax)
484+
# reduce the number of yticks by half
480485
num_ticks = len(ax_list[0].get_yticks())
481486
yticks = [ax_list[0].get_yticks()[i] for i in range(1, num_ticks, 2)]
482487
ax_list[0].set_yticks(yticks)

0 commit comments

Comments
 (0)