aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-12-18 14:39:31 -0600
committerzsloan2020-12-18 14:39:31 -0600
commit41efd6840f2e1c052dbb77affd6f09fc2e2bcd05 (patch)
tree8b679f0b3429f44fa5ec25f08b26c6b6d2c3f0bd /wqflask
parent6d493f7ef57322f226dd310497e4dc7518440cfd (diff)
downloadgenenetwork2-41efd6840f2e1c052dbb77affd6f09fc2e2bcd05.tar.gz
Changed show_corr_results.py to get sample names/values from the JSON sample_vals parameter
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/show_corr_results.py12
1 files 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