From aab6393dd60872a6a3b6e7db2a7c087c4ec41295 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Mon, 15 Nov 2021 18:18:03 +0300 Subject: fetch only strains from the primary datasets --- 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 d8629706..355701f2 100644 --- a/wqflask/wqflask/correlation/pre_computes.py +++ b/wqflask/wqflask/correlation/pre_computes.py @@ -86,7 +86,6 @@ def fetch_precompute_results(base_dataset_name, target_dataset_name, dataset_typ file_path = os.path.join(TMPDIR, f"{file_name}.json") - results = None try: with open(file_path, "r+") as json_handler: @@ -130,15 +129,19 @@ def get_datasets_data(base_dataset, target_dataset_data): """required to pass data in a given format to the pre compute function + (works for bxd only probeset datasets) + + # fix issue with fetching of the datasets + output:two dicts for datasets with key==trait and value==strains """ + samples_fetched = base_dataset.group.all_samples_ordered() target_traits_data = target_dataset.get_trait_data( - base_dataset.group.all_samples_ordered()) + samples_fetched) base_traits_data = base_dataset.get_trait_data( - base_dataset.group.all_samples_ordered()) + samples_fetched) - samples_fetched = base_dataset.group.all_samples_ordered() target_results = map_shared_keys_to_values( samples_fetched, target_traits_data) -- cgit v1.2.3