aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorAlexander Kabui2021-11-15 18:08:10 +0300
committerAlexander Kabui2021-11-15 18:08:10 +0300
commit6f6e28d216e0a2adbf939b9b29f8794ae45d9aa8 (patch)
treefd3f8c577d7936cb6056cb5f030a24961668a67c /wqflask
parent18b53441a0136071db94c72b112a746e056ef971 (diff)
downloadgenenetwork2-6f6e28d216e0a2adbf939b9b29f8794ae45d9aa8.tar.gz
pep8 formatting & fix variable names
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/pre_computes.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/wqflask/wqflask/correlation/pre_computes.py b/wqflask/wqflask/correlation/pre_computes.py
index e7147ddf..d8629706 100644
--- a/wqflask/wqflask/correlation/pre_computes.py
+++ b/wqflask/wqflask/correlation/pre_computes.py
@@ -108,17 +108,20 @@ def pre_compute_dataset_vs_dataset(base_dataset, target_dataset, corr_method):
"""
dataset_correlation_results = {}
- for (trait_name, strain_values) in target_dataset.trait_data:
+ target_traits_data, base_traits_data = get_datasets_data(
+ base_dataset, target_dataset_data)
+
+ for (primary_trait_name, strain_values) in base_traits_data:
this_trait_data = {
"trait_sample_data": strain_values,
- "trait_id": trait_name
+ "trait_id": primary_trait_name
}
trait_correlation_result = fast_compute_all_sample_correlation(
- corr_method=corr_method, this_trait=this_trait_data, target_dataset=target_dataset_data)
+ corr_method=corr_method, this_trait=this_trait_data, target_dataset=target_traits_data)
- dataset_correlation_results[trait_name] = trait_correlation_result
+ dataset_correlation_results[primary_trait_name] = trait_correlation_result
return dataset_correlation_results