aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorAlexander Kabui2021-11-29 00:28:42 +0300
committerBonfaceKilz2021-12-10 09:58:29 +0300
commit9fa90438672f7a96740a489f2b2fc3f2b32a99b0 (patch)
tree7a38d6dcb7a38149767ac6e50f52d3a06fa5419e /gn3
parentbc1b310503d63555ffe9d2da0a881f11b666fa3b (diff)
downloadgenenetwork3-9fa90438672f7a96740a489f2b2fc3f2b32a99b0.tar.gz
update function docs for normalizing strain values
Diffstat (limited to 'gn3')
-rw-r--r--gn3/computations/correlations.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py
index 2f79c4a..1f90b6c 100644
--- a/gn3/computations/correlations.py
+++ b/gn3/computations/correlations.py
@@ -38,18 +38,13 @@ def map_shared_keys_to_values(target_sample_keys: List,
return target_dataset_data
-def normalize_values(a_values: List,
- b_values: List) -> Tuple[List[float], List[float], int]:
- """Trim two lists of values to contain only the values they both share Given
- two lists of sample values, trim each list so that it contains only the
- samples that contain a value in both lists. Also returns the number of
- such samples.
-
- >>> normalize_values([2.3, None, None, 3.2, 4.1, 5],
- [3.4, 7.2, 1.3, None, 6.2, 4.1])
- ([2.3, 4.1, 5], [3.4, 6.2, 4.1], 3)
+def normalize_values(a_values: List,b_values: List):
+ """
+ input:nested two list of primary and target values *includes None vals
+ output: yield two list of normalized values elimate if none
"""
+
for a_val, b_val in zip(a_values, b_values):
if (a_val and b_val is not None):
yield a_val, b_val