Skip to content

Commit

Permalink
Fix pairwise dendrogram plots for new seaborn
Browse files Browse the repository at this point in the history
This fixes asntech#12
  • Loading branch information
mvdbeek committed Sep 11, 2018
1 parent d7c7766 commit 67a2a25
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions intervene/modules/pairwise/pairwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
import pylab as pl
import scipy.cluster.hierarchy as sch
import string
import matplotlib.pyplot as plt
from matplotlib import gridspec
import seaborn as sns
from intervene import helpers

sns.set()


def get_name(fname):
return op.splitext(op.basename(fname))[0]
Expand Down Expand Up @@ -301,8 +304,8 @@ def heatmap_dendrogram(dataframe, outfile, options):
else:
sns_plot = sns.clustermap(dataframe, cmap="RdBu", linewidths=.3)

sns.plt.setp(sns_plot.ax_heatmap.yaxis.get_majorticklabels(), rotation=0)
sns.plt.suptitle(options.hlabel)
plt.setp(sns_plot.ax_heatmap.yaxis.get_majorticklabels(), rotation=0)
plt.suptitle(options.hlabel)

sns_plot.savefig(outfile, bbox_inches='tight', dpi=options.dpi)

Expand Down Expand Up @@ -486,4 +489,4 @@ def pairwise_intersection(label_names, options):
create_r_script(matrix_file, options, max_size=max(bed_sizes))
#cmd = 'heatmap_intervene.R %s %s %s %s %s %s %s' % (matrix_file,options.htype,options.compute, output_name,options.figtype, str(options.title), options.dpi)
#os.system(cmd)
#print('\nYou are done! Please check your results @ '+options.output+'. \nThank you for using Intervene!\n')
#print('\nYou are done! Please check your results @ '+options.output+'. \nThank you for using Intervene!\n')

0 comments on commit 67a2a25

Please sign in to comment.