diff options
author | BonfaceKilz | 2022-01-05 17:01:24 +0300 |
---|---|---|
committer | GitHub | 2022-01-05 17:01:24 +0300 |
commit | 0b1643e87cf4303db3673dcf3cf240aeb4d518cb (patch) | |
tree | 62ed5cae507303a469c040eb47a8b5b70b3a1a93 /gn3/computations/correlations.py | |
parent | ac28fb48e4e3197de6bfeef332198b70689837c9 (diff) | |
parent | af52afa4318feadfa3cd1cc4dcdd3d86907f68a4 (diff) | |
download | genenetwork3-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.py | 5 |
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 |