aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations/correlations.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-06-21 08:58:27 +0300
committerGitHub2021-06-21 08:58:27 +0300
commitf949189dc727976a1574a57d3b0e895ff6598d07 (patch)
treee7e0634176d55afefa25467652b4f97601287837 /gn3/computations/correlations.py
parentd653a635d0efd2291754c18f51d31f91a1c0a25c (diff)
parent10140ab707021dd2dffb1b439f52a62e3d59c29a (diff)
downloadgenenetwork3-f949189dc727976a1574a57d3b0e895ff6598d07.tar.gz
Merge pull request #20 from genenetwork/feature/biweight-correlation
add biweight r script and tests
Diffstat (limited to 'gn3/computations/correlations.py')
-rw-r--r--gn3/computations/correlations.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py
index 0fe46ab..bc738a7 100644
--- a/gn3/computations/correlations.py
+++ b/gn3/computations/correlations.py
@@ -7,6 +7,7 @@ from typing import Optional
from typing import Callable
import scipy.stats
+from gn3.computations.biweight import calculate_biweight_corr
def map_shared_keys_to_values(target_sample_keys: List,
@@ -99,8 +100,12 @@ def do_bicor(x_val, y_val) -> Tuple[float, float]:
package :not packaged in guix
"""
- x_val, y_val = 0, 0
- return (x_val, y_val)
+
+ try:
+ results = calculate_biweight_corr(x_val, y_val)
+ return results
+ except Exception as error:
+ raise error
def filter_shared_sample_keys(this_samplelist,