Skip to content

Commit

Permalink
Addressing #1181
Browse files Browse the repository at this point in the history
  • Loading branch information
adRn-s committed Jan 5, 2023
1 parent 77dffdf commit 4c0c4fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions deeptools/heatmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ def read_matrix_file(self, matrix_file):
# split the line into bed interval and matrix values
region = line.split('\t')
chrom, start, end, name, score, strand = region[0:6]
matrix_row = np.ma.masked_invalid(np.fromiter(region[6:], np.float))
matrix_row = np.ma.masked_invalid(np.fromiter(region[6:], np.float64))
matrix_rows.append(matrix_row)
starts = start.split(",")
ends = end.split(",")
Expand Down Expand Up @@ -852,7 +852,7 @@ def save_matrix(self, file_name):
# join np_array values
# keeping nans while converting them to strings
if not np.ma.is_masked(score_list[idx]):
np.float(score_list[idx])
np.float64(score_list[idx])
matrix_values = "\t".join(
np.char.mod('%f', self.matrix.matrix[idx, :]))
starts = ["{0}".format(x[0]) for x in region[1]]
Expand Down Expand Up @@ -1345,7 +1345,7 @@ def removeempty(self):
to_keep = []
score_list = np.ma.masked_invalid(np.mean(self.matrix, axis=1))
for idx, region in enumerate(self.regions):
if np.ma.is_masked(score_list[idx]) or np.float(score_list[idx]) == 0:
if np.ma.is_masked(score_list[idx]) or np.float64(score_list[idx]) == 0:
continue
else:
to_keep.append(idx)
Expand Down
2 changes: 1 addition & 1 deletion deeptools/sumCoveragePerBin.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_coverage_of_region(self, bamHandle, chrom, regions,
except:
# bigWig input, as used by plotFingerprint
if bamHandle.chroms(chrom):
_ = np.array(bamHandle.stats(chrom, regStart, regEnd, type="mean", nBins=nRegBins), dtype=np.float)
_ = np.array(bamHandle.stats(chrom, regStart, regEnd, type="mean", nBins=nRegBins), dtype=np.float64)
_[np.isnan(_)] = 0.0
_ = _ * tileSize
coverages += _
Expand Down

0 comments on commit 4c0c4fa

Please sign in to comment.