aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask
diff options
context:
space:
mode:
authorzsloan2016-08-05 20:53:38 +0000
committerzsloan2016-08-05 20:53:38 +0000
commitce160e61fffbc3370497a1adc299dad230411b72 (patch)
tree1a99a3ba561df0690beaab70b2336c3384c7a57a /wqflask/wqflask
parent08849a27af933340fc14decf8dfdd62e3d65b3b3 (diff)
downloadgenenetwork2-ce160e61fffbc3370497a1adc299dad230411b72.tar.gz
Fixed issue that caused some interval mapping results to be wrong; the cause seems to be related to some strains being renamed in the genofiles
Added a message to the Add to Collection page warning users that anonymous collections will only be stored for 5 days Updated genofiles
Diffstat (limited to 'wqflask/wqflask')
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression.py18
-rw-r--r--wqflask/wqflask/templates/collections/add.html3
2 files changed, 11 insertions, 10 deletions
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>