diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/base/webqtlCaseData.py | 4 | ||||
-rw-r--r-- | wqflask/wqflask/marker_regression/marker_regression.py | 18 | ||||
-rw-r--r-- | wqflask/wqflask/templates/collections/add.html | 3 |
3 files changed, 15 insertions, 10 deletions
diff --git a/wqflask/base/webqtlCaseData.py b/wqflask/base/webqtlCaseData.py index c80fcb65..8df9939e 100644 --- a/wqflask/base/webqtlCaseData.py +++ b/wqflask/base/webqtlCaseData.py @@ -52,6 +52,10 @@ class webqtlCaseData(object): str += " variance=%2.3f" % self.variance if self.num_cases != None: str += " ndata=%d" % self.num_cases + if self.name != None: + str += " name=%s" % self.name + if self.name2 != None: + str += " name2=%s" % self.name2 return str @property diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py index a8324442..89af856e 100644 --- a/wqflask/wqflask/marker_regression/marker_regression.py +++ b/wqflask/wqflask/marker_regression/marker_regression.py @@ -47,8 +47,6 @@ class MarkerRegression(object): helper_functions.get_species_dataset_trait(self, start_vars) - #tempdata = temp_data.TempData(temp_uuid) - self.temp_uuid = temp_uuid #needed to pass temp_uuid to gn1 mapping code (marker_regression_gn1.py) self.json_data = {} @@ -59,11 +57,11 @@ class MarkerRegression(object): all_samples_ordered = self.dataset.group.all_samples_ordered() primary_sample_names = list(all_samples_ordered) - + for sample in self.dataset.group.samplelist: in_trait_data = False for item in self.this_trait.data: - if self.this_trait.data[item].name2 == sample: + if self.this_trait.data[item].name == sample: value = start_vars['value:' + self.this_trait.data[item].name] self.samples.append(self.this_trait.data[item].name) self.vals.append(value) @@ -280,7 +278,6 @@ class MarkerRegression(object): # print("json_data:", self.json_data) - self.js_data = dict( result_score_type = self.score_type, json_data = self.json_data, @@ -657,16 +654,15 @@ class MarkerRegression(object): genotype = genotype.addinterval() samples, values, variances, sample_aliases = self.this_trait.export_informative() - + trimmed_samples = [] trimmed_values = [] for i in range(0, len(samples)): - if self.this_trait.data[samples[i]].name2 in self.dataset.group.samplelist: - trimmed_samples.append(sample_aliases[i]) + #if self.this_trait.data[samples[i]].name2 in self.dataset.group.samplelist: + if self.this_trait.data[samples[i]].name in self.samples: + trimmed_samples.append(samples[i]) trimmed_values.append(values[i]) - #print("THE SAMPLES:", trimmed_samples) - if self.num_perm < 100: self.suggestive = 0 self.significant = 0 @@ -706,6 +702,8 @@ class MarkerRegression(object): control = control_geno, nboot = self.num_bootstrap) else: + # reaper_results = genotype.regression(strains = self.samples, + # trait = self.vals) reaper_results = genotype.regression(strains = trimmed_samples, trait = trimmed_values) diff --git a/wqflask/wqflask/templates/collections/add.html b/wqflask/wqflask/templates/collections/add.html index f4a69423..c5598e84 100644 --- a/wqflask/wqflask/templates/collections/add.html +++ b/wqflask/wqflask/templates/collections/add.html @@ -23,6 +23,9 @@ <input type="text" name="new_collection" placeholder="Name of new collection..." data-trigger="change" data-minlength="5" data-maxlength="50"> <span class="help-block">Type the name of the new collection.</span> + {% if uc is not defined %} + <span class="help-block" style="color:red;">This collection will be saved to this computer for 5 days.</span> + {% endif %} <button type="submit" name="create_new" class="btn">Create and add traits</button> </fieldset> |