Skip to content

Commit

Permalink
Merge branch 'hotfix/fixHclust'
Browse files Browse the repository at this point in the history
Fixes the --hclust option in plotHeatmap and plotProfile
  • Loading branch information
dpryan79 committed Feb 19, 2016
2 parents bd92d76 + e94e3a6 commit 677ecdb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions deeptools/heatmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,10 @@ def hmcluster(self, k, method='kmeans'):

if method == 'hierarchical':
# normally too slow for large data sets
from scipy.cluster.hierarchy import fclusterdata
cluster_labels = fclusterdata(matrix, k, criterion='maxclust', metric='euclidean', depth=2, method='ward')
from scipy.cluster.hierarchy import fcluster, linkage
Z = linkage(matrix, method='ward', metric='euclidean')
cluster_labels = fcluster(Z, k, criterion='maxclust')

# create groups using the clustering
self.group_labels = []
self.group_boundaries = [0]
Expand Down

0 comments on commit 677ecdb

Please sign in to comment.