aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-12-18 14:38:09 -0600
committerzsloan2020-12-18 14:38:09 -0600
commit6d493f7ef57322f226dd310497e4dc7518440cfd (patch)
tree05c8e2a68e2407c678b9e7c701c75b671bec3dec /wqflask
parent7544d03a6d819d70779deb79d38b7465a648c1ff (diff)
downloadgenenetwork2-6d493f7ef57322f226dd310497e4dc7518440cfd.tar.gz
Changed display_mapping_results.py to get sample names and values from the JSON sample_vals parameter
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/marker_regression/display_mapping_results.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index 08c2d750..9f1b050d 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -270,8 +270,9 @@ class DisplayMappingResults(object):
# Needing for form submission when doing single chr
# mapping or remapping after changing options
- self.samples = start_vars['samples']
- self.vals = start_vars['vals']
+ self.sample_vals = start_vars['sample_vals']
+ self.sample_vals_dict = json.loads(self.sample_vals)
+
self.transform = start_vars['transform']
self.mapping_method = start_vars['mapping_method']
self.mapping_results_path = start_vars['mapping_results_path']
@@ -492,11 +493,10 @@ class DisplayMappingResults(object):
## count the amount of individuals to be plotted, and increase self.graphHeight
if self.haplotypeAnalystChecked and self.selectedChr > -1:
thisTrait = self.this_trait
- _strains, _vals, _vars, _aliases = thisTrait.export_informative()
smd=[]
- for ii, _val in enumerate(self.vals):
- if _val != "x":
- temp = GeneralObject(name=self.samples[ii], value=float(_val))
+ for sample in self.sample_vals_dict.keys():
+ if self.sample_vals_dict[sample] != "x":
+ temp = GeneralObject(name=sample, value=float(self.sample_vals_dict[sample]))
smd.append(temp)
else:
continue
@@ -1464,12 +1464,11 @@ class DisplayMappingResults(object):
yPaddingTop = yTopOffset
thisTrait = self.this_trait
- _strains, _vals, _vars, _aliases = thisTrait.export_informative()
smd=[]
- for ii, _val in enumerate(self.vals):
- if _val != "x":
- temp = GeneralObject(name=self.samples[ii], value=float(_val))
+ for sample in self.sample_vals_dict.keys():
+ if self.sample_vals_dict[sample] != "x":
+ temp = GeneralObject(name=sample, value=float(self.sample_vals_dict[sample]))
smd.append(temp)
else:
continue