aboutsummaryrefslogtreecommitdiff
path: root/gn3/heatmaps.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-11-12 04:07:42 +0300
committerFrederick Muriuki Muriithi2021-11-12 04:07:42 +0300
commitd1617bd8af25bf7c7777be7a634559fd31b491ad (patch)
tree9565d4fcca4fa553dc21a9543353a8b29357ab4a /gn3/heatmaps.py
parentd895eea22ab908c11f4ebb77f99518367879b1f6 (diff)
parent85405fe6875358d3bb98b03621271d5909dd393f (diff)
downloadgenenetwork3-d1617bd8af25bf7c7777be7a634559fd31b491ad.tar.gz
Merge branch 'main' of github.com:genenetwork/genenetwork3 into partial-correlations
Diffstat (limited to 'gn3/heatmaps.py')
-rw-r--r--gn3/heatmaps.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/gn3/heatmaps.py b/gn3/heatmaps.py
index bf9dfd1..f0af409 100644
--- a/gn3/heatmaps.py
+++ b/gn3/heatmaps.py
@@ -64,11 +64,7 @@ def cluster_traits(traits_data_list: Sequence[Dict]):
def __compute_corr(tdata_i, tdata_j):
if tdata_i[0] == tdata_j[0]:
return 0.0
- corr_vals = compute_correlation(tdata_i[1], tdata_j[1])
- corr = corr_vals[0]
- if (1 - corr) < 0:
- return 0.0
- return 1 - corr
+ return 1 - compute_correlation(tdata_i[1], tdata_j[1])[0]
def __cluster(tdata_i):
return tuple(