From c447413ee26f9d91927009e82b0987c38cf25cd1 Mon Sep 17 00:00:00 2001 From: asntech Date: Mon, 12 Oct 2020 19:03:18 +0200 Subject: [PATCH] fixed for pandas v1.0.0 #37 #40 --- intervene/__init__.py | 2 +- intervene/modules/pairwise/pairwise.py | 7 +++++-- requirements.txt | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/intervene/__init__.py b/intervene/__init__.py index 46dee82..b029ee7 100755 --- a/intervene/__init__.py +++ b/intervene/__init__.py @@ -1 +1 @@ -__version__ = '0.6.4' \ No newline at end of file +__version__ = '0.6.5' \ No newline at end of file diff --git a/intervene/modules/pairwise/pairwise.py b/intervene/modules/pairwise/pairwise.py index 951cf8e..a273ebd 100644 --- a/intervene/modules/pairwise/pairwise.py +++ b/intervene/modules/pairwise/pairwise.py @@ -147,7 +147,8 @@ def barplot(series, matrix, outfile, options, max_size=1): ax.set_axisbelow(True) # Order the bars by the clustering. - series = series.ix[order] + #series = series.ix[order] + series = series.loc[order] #pandas v1.0 namelen = 15 # Shorten lengthy names. @@ -211,7 +212,9 @@ def heatmap_triangle(dataframe, axes, options): Z = sch.linkage(D, method='average') R = sch.dendrogram(Z, no_plot=True) cluster_order = R['leaves'] - D = D.ix[cluster_order, cluster_order] + + #D = D.ix[cluster_order, cluster_order] + D = D.iloc[cluster_order, cluster_order] #pandas v1.0 # Get the lower triangle of the matrix. #C = np.tril(D) diff --git a/requirements.txt b/requirements.txt index 396f4c1..f9ea089 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -pandas +pybedtools +pandas >= 1.0.0 numpy scipy -pybedtools matplotlib seaborn