From a823e66f8dc742e1608b3e0db6d521d5f63b641a Mon Sep 17 00:00:00 2001
From: Zachary Sloan
Date: Tue, 15 Oct 2013 15:06:36 -0500
Subject: Changed templates to call the header macro
Correlation page now works with Non-BXD (or whatever group)
or All Samples options
---
wqflask/base/data_set.py | 14 ++++++++------
wqflask/wqflask/correlation/show_corr_results.py | 4 ++--
wqflask/wqflask/templates/base.html | 4 ++--
wqflask/wqflask/templates/correlation_page.html | 8 ++------
wqflask/wqflask/templates/index_page.html | 2 --
wqflask/wqflask/templates/marker_regression.html | 10 ++--------
wqflask/wqflask/templates/quick_search.html | 11 +++--------
wqflask/wqflask/templates/search_result_page.html | 10 ++--------
wqflask/wqflask/templates/show_trait.html | 11 +++--------
9 files changed, 24 insertions(+), 50 deletions(-)
(limited to 'wqflask')
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 9fa7beb3..f25e7974 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -322,7 +322,7 @@ class DatasetGroup(object):
self.incparentsf1 = 0
self.genotype = genotype_1
- self.samplelist = list(genotype.prgy)
+ self.samplelist = list(self.genotype.prgy)
#class DataSets(object):
@@ -440,10 +440,12 @@ class DataSet(object):
def get_trait_data(self, sample_list=None):
if sample_list:
- self.samplelist = sample_list + self.group.parlist + self.group.f1list
+ self.samplelist = sample_list
else:
- self.samplelist = self.group.samplelist + self.group.parlist + self.group.f1list
-
+ self.samplelist = self.group.samplelist
+
+ if (self.group.parlist + self.group.f1list) in self.samplelist:
+ self.samplelist += self.group.parlist + self.group.f1list
query = """
SELECT Strain.Name, Strain.Id FROM Strain, Species
@@ -503,8 +505,8 @@ class DataSet(object):
and {}Freeze.Name = '{}'
and {}.Id = {}XRef.{}Id
order by {}.Id
- """.format(*mescape(self.type, self.type, self.type, self.type,
- self.name, dataset_type, self.type, self.type, dataset_type))
+ """.format(*mescape(self.type, self.type, self.type, self.name,
+ dataset_type, self.type, dataset_type, dataset_type))
else:
query += """
WHERE {}XRef.{}FreezeId = {}Freeze.Id
diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py
index a5c80674..8f23165c 100644
--- a/wqflask/wqflask/correlation/show_corr_results.py
+++ b/wqflask/wqflask/correlation/show_corr_results.py
@@ -178,10 +178,10 @@ class CorrelationResults(object):
trait_object.lit_corr = lit_corr_data[trait][1]
self.correlation_results.append(trait_object)
- if self.corr_type != "lit":
+ if self.corr_type != "lit" and self.dataset.type == "ProbeSet":
self.do_lit_correlation_for_trait_list()
- if self.corr_type != "tissue":
+ if self.corr_type != "tissue" and self.dataset.type == "ProbeSet":
self.do_tissue_correlation_for_trait_list()
#print("self.correlation_results: ", pf(self.correlation_results))
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html
index 8efba6a7..a14eeb44 100644
--- a/wqflask/wqflask/templates/base.html
+++ b/wqflask/wqflask/templates/base.html
@@ -29,9 +29,9 @@
{% macro header(main, second) %}
- Gain access to GeneNetwork.
+ {{ second }}
Login
+ {{ main }}
Correlation
-