From 41efd6840f2e1c052dbb77affd6f09fc2e2bcd05 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 18 Dec 2020 14:39:31 -0600 Subject: Changed show_corr_results.py to get sample names/values from the JSON sample_vals parameter --- wqflask/wqflask/correlation/show_corr_results.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 7d3b9b9f..be983c87 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -87,8 +87,6 @@ class CorrelationResults(object): else: helper_functions.get_species_dataset_trait(self, start_vars) - #self.dataset.group.read_genotype_file() - corr_samples_group = start_vars['corr_samples_group'] self.sample_data = {} @@ -454,13 +452,13 @@ class CorrelationResults(object): if not excluded_samples: excluded_samples = () + sample_val_dict = json.loads(start_vars['sample_vals']) for sample in sample_names: if sample not in excluded_samples: - # print("Looking for",sample,"in",start_vars) - value = start_vars.get('value:' + sample) - if value: - if not value.strip().lower() == 'x': - self.sample_data[str(sample)] = float(value) + value = sample_val_dict[sample] + if not value.strip().lower() == 'x': + self.sample_data[str(sample)] = float(value) + def do_bicor(this_trait_vals, target_trait_vals): r_library = ro.r["library"] # Map the library function -- cgit v1.2.3