aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations/correlations.py
diff options
context:
space:
mode:
authorBonfaceKilz2022-01-05 17:01:24 +0300
committerGitHub2022-01-05 17:01:24 +0300
commit0b1643e87cf4303db3673dcf3cf240aeb4d518cb (patch)
tree62ed5cae507303a469c040eb47a8b5b70b3a1a93 /gn3/computations/correlations.py
parentac28fb48e4e3197de6bfeef332198b70689837c9 (diff)
parentaf52afa4318feadfa3cd1cc4dcdd3d86907f68a4 (diff)
downloadgenenetwork3-0b1643e87cf4303db3673dcf3cf240aeb4d518cb.tar.gz
Merge branch 'main' into fix/check-for-duplicates-before-deletions-or-insertions
Diffstat (limited to 'gn3/computations/correlations.py')
-rw-r--r--gn3/computations/correlations.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py
index d38946e..1b4b3a4 100644
--- a/gn3/computations/correlations.py
+++ b/gn3/computations/correlations.py
@@ -7,6 +7,7 @@ from typing import List
from typing import Tuple
from typing import Optional
from typing import Callable
+from typing import Generator
import scipy.stats
import pingouin as pg
@@ -79,7 +80,7 @@ def compute_sample_r_correlation(trait_name, corr_method, trait_vals,
zip(*list(normalize_values(trait_vals, target_samples_vals))))
num_overlap = len(normalized_traits_vals)
except ValueError:
- return
+ return None
if num_overlap > 5:
@@ -106,7 +107,7 @@ package :not packaged in guix
def filter_shared_sample_keys(this_samplelist,
- target_samplelist) -> Tuple[List, List]:
+ target_samplelist) -> Generator:
"""Given primary and target sample-list for two base and target trait select
filter the values using the shared keys