aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/marker_regression/run_mapping.py2
-rw-r--r--wqflask/wqflask/views.py23
2 files changed, 17 insertions, 8 deletions
diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py
index 7449d8ce..5f7710ab 100644
--- a/wqflask/wqflask/marker_regression/run_mapping.py
+++ b/wqflask/wqflask/marker_regression/run_mapping.py
@@ -124,7 +124,7 @@ class RunMapping(object):
self.samples.append(sample)
self.vals.append(value)
- self.num_vals = start_vars['num_vals']
+ self.num_vals = len(self.vals)
#ZS: Check if genotypes exist in the DB in order to create links for markers
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 44752246..938570f3 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -40,7 +40,7 @@ from wqflask import update_search_results
from wqflask import docs
from wqflask import news
from wqflask.submit_bnw import get_bnw_input
-from base.data_set import DataSet # Used by YAML in marker_regression
+from base.data_set import create_dataset, DataSet # Used by YAML in marker_regression
from wqflask.show_trait import show_trait
from wqflask.show_trait import export_trait_data
from wqflask.heatmap import heatmap
@@ -593,12 +593,21 @@ def loading_page():
if 'num_vals' in start_vars:
num_vals = int(start_vars['num_vals'])
else:
- if 'primary_samples' in start_vars:
- samples = start_vars['primary_samples'].split(",")
- for sample in samples:
- value = start_vars.get('value:' + sample)
- if value != "x":
- num_vals += 1
+ dataset = create_dataset(start_vars['dataset'])
+ genofile_samplelist = []
+ samples = start_vars['primary_samples'].split(",")
+ if 'genofile' in start_vars:
+ if start_vars['genofile'] != "":
+ genofile_string = start_vars['genofile']
+ dataset.group.genofile = genofile_string.split(":")[0]
+ genofile_samples = run_mapping.get_genofile_samplelist(dataset)
+ if len(genofile_samples) > 1:
+ samples = genofile_samples
+
+ for sample in samples:
+ value = start_vars.get('value:' + sample)
+ if value != "x":
+ num_vals += 1
start_vars['num_vals'] = num_vals
start_vars['wanted_inputs'] = initial_start_vars['wanted_inputs']