From 6f6e28d216e0a2adbf939b9b29f8794ae45d9aa8 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Mon, 15 Nov 2021 18:08:10 +0300 Subject: pep8 formatting & fix variable names --- wqflask/wqflask/correlation/pre_computes.py | 11 +++++++---- 1 file 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 -- cgit v1.2.3