aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorAlexander Kabui2021-11-15 18:18:03 +0300
committerAlexander Kabui2021-11-15 18:18:03 +0300
commitaab6393dd60872a6a3b6e7db2a7c087c4ec41295 (patch)
tree66877bbfe7b5c109e30715cee85a875936c85fe9 /wqflask
parent2982ba491e89acee5ead69206691c786be1cf728 (diff)
downloadgenenetwork2-aab6393dd60872a6a3b6e7db2a7c087c4ec41295.tar.gz
fetch only strains from the primary datasets
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 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)