From 98293e5a4b68565bc0a26240d111f55c60907006 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 14 Mar 2016 15:49:13 +0000 Subject: Changed the way headers look across all pages Changed the way details are displayed in show trait page Changed search query so that it orders results by symbol --- wqflask/base/trait.py | 35 ------ wqflask/wqflask/do_search.py | 4 +- .../wqflask/static/packages/bootstrap/css/docs.css | 4 +- wqflask/wqflask/templates/collections/view.html | 12 +- wqflask/wqflask/templates/search_result_page.html | 23 ++++ wqflask/wqflask/templates/show_trait.html | 37 ++++-- wqflask/wqflask/templates/show_trait_details.html | 133 +++++++++++---------- 7 files changed, 134 insertions(+), 114 deletions(-) (limited to 'wqflask') diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index eb9bc940..ff149ba3 100755 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -221,32 +221,6 @@ class GeneralTrait(object): if samplelist == None: samplelist = [] - #assert self.dataset - - #if self.cellid: - # #Probe Data - # query = ''' - # SELECT - # Strain.Name, ProbeData.value, ProbeSE.error, ProbeData.Id - # FROM - # (ProbeData, ProbeFreeze, ProbeSetFreeze, ProbeXRef, - # Strain, Probe, ProbeSet) - # left join ProbeSE on - # (ProbeSE.DataId = ProbeData.Id AND ProbeSE.StrainId = ProbeData.StrainId) - # WHERE - # Probe.Name = '%s' AND ProbeSet.Name = '%s' AND - # Probe.ProbeSetId = ProbeSet.Id AND - # ProbeXRef.ProbeId = Probe.Id AND - # ProbeXRef.ProbeFreezeId = ProbeFreeze.Id AND - # ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id AND - # ProbeSetFreeze.Name = '%s' AND - # ProbeXRef.DataId = ProbeData.Id AND - # ProbeData.StrainId = Strain.Id - # Order BY - # Strain.Name - # ''' % (self.cellid, self.name, self.dataset.name) - # - #else: results = self.dataset.retrieve_sample_data(self.name) # Todo: is this necessary? If not remove @@ -260,15 +234,6 @@ class GeneralTrait(object): if not samplelist or (samplelist and name in samplelist): self.data[name] = webqtlCaseData(*item) #name, value, variance, num_cases) - #def keys(self): - # return self.__dict__.keys() - # - #def has_key(self, key): - # return self.__dict__.has_key(key) - # - #def items(self): - # return self.__dict__.items() - def retrieve_info(self, get_qtl_info=False): assert self.dataset, "Dataset doesn't exist" if self.dataset.type == 'Publish': diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index a6f9c949..0e2dd27a 100755 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -171,6 +171,7 @@ class MrnaAssaySearch(DoSearch): WHERE %s and ProbeSet.Id = ProbeSetXRef.ProbeSetId and ProbeSetXRef.ProbeSetFreezeId = %s + ORDER BY ProbeSet.symbol ASC """ % (escape(from_clause), where_clause, escape(str(self.dataset.id)))) @@ -192,6 +193,7 @@ class MrnaAssaySearch(DoSearch): WHERE %s and ProbeSet.Id = ProbeSetXRef.ProbeSetId and ProbeSetXRef.ProbeSetFreezeId = %s + ORDER BY ProbeSet.symbol ASC """ % (escape(from_clause), where_clause, escape(str(self.dataset.id)))) @@ -205,7 +207,7 @@ class MrnaAssaySearch(DoSearch): print("Running ProbeSetSearch") where_clause = self.get_where_clause() - query = self.base_query + "WHERE " + where_clause + query = self.base_query + "WHERE " + where_clause + "ORDER BY ProbeSet.symbol ASC" #print("final query is:", pf(query)) diff --git a/wqflask/wqflask/static/packages/bootstrap/css/docs.css b/wqflask/wqflask/static/packages/bootstrap/css/docs.css index 2d6a713c..31616821 100755 --- a/wqflask/wqflask/static/packages/bootstrap/css/docs.css +++ b/wqflask/wqflask/static/packages/bootstrap/css/docs.css @@ -94,7 +94,7 @@ hr.soften { .jumbotron { position: relative; padding: 0px 0; - color: #336699; + color: black; text-align: left; text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075); background: #d5d5d5; /* Old browsers */ @@ -107,7 +107,7 @@ hr.soften { line-height: 1; } .jumbotron p { - font-size: 15px; + font-size: 20px; font-weight: 300; line-height: 20px; margin-bottom: 10px; diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index a53759c4..f92d9984 100755 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -8,13 +8,17 @@ {% endblock %} {% block content %} + +
{% if uc %} - {{ header(uc.name, - 'This collection has {}.'.format(numify(trait_obs|count, "record", "records"))) }} +

{{ uc.name }}

+

{{ 'This collection has {}.'.format(numify(trait_obs|count, "record", "records")) }}

{% else %} - {{ header('Your Collection', - 'This collection has {}.'.format(numify(trait_obs|count, "record", "records"))) }} +

Your Collection

+

{{ 'This collection has {}.'.format(numify(trait_obs|count, "record", "records")) }}

{% endif %} +
+
{% if uc %} diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index ff3e04bb..a4ef68b9 100755 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -2,6 +2,7 @@ {% block title %}Search Results{% endblock %} {% block css %} + @@ -161,6 +162,7 @@ + @@ -217,8 +219,29 @@ } }); +/* + serverSide: true, + ajax: function ( data, callback, settings ) { + var out = []; + + for ( var i=data.start, ien=data.start+data.length ; i + +
+

Trait Data and Analysis for {{ this_trait.name }}

+

{{ this_trait.description_fmt }}

+
@@ -36,40 +41,50 @@
- - {% include 'show_trait_details.html' %}
-
+
+

+ Details and Links +

+
+
+
+ {% include 'show_trait_details.html' %} +
+
+
+
+

Statistics

-
+
{% include 'show_trait_statistics.html' %}
-
+

Calculate Correlations

-
+
{% include 'show_trait_calculate_correlations.html' %}
-
+

Mapping Tools

-
+
{% include 'show_trait_mapping_tools.html' %}
@@ -77,12 +92,12 @@
-
+

Review and Edit Data

-
+
{% include 'show_trait_edit_data.html' %}
diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html index 16c5dc47..ccb3b51b 100755 --- a/wqflask/wqflask/templates/show_trait_details.html +++ b/wqflask/wqflask/templates/show_trait_details.html @@ -1,71 +1,82 @@ -
-
Species
-
{{ this_trait.dataset.group.species }}
-
Group
-
{{ this_trait.dataset.group.name }}
-
Tissue
-
{{ this_trait.dataset.tissue }}
+ + + + + + + + + + + + + {% if this_trait.dataset.type == 'ProbeSet' %} -
Aliases
-
{{ this_trait.alias_fmt }}
+ + + + {% endif %} - {% if this_trait.dataset.type != 'Publish' %} -
Location
-
{{ this_trait.location_fmt }}
+ + + + {% endif %} - -
Database
-
- - {{ dataset.name }} - -
- + + + + {% if this_trait.probe_set_specificity %} -
- - BLAT Specificity - -
-
{{ "%0.3f" | format(this_trait.probe_set_specificity|float) }}
+ + + + {% endif %} - {% if this_trait.probe_set_blat_score %} -
BLAT Score
-
{{ "%0.3f" | format(this_trait.probe_set_blat_score|float) }}
- {% endif %} -
Resource Links
- {% if this_trait.dataset.type == 'ProbeSet' %} -
- {% if this_trait.geneid != None %} - - Gene - -    +
+ + + +
Species{{ this_trait.dataset.group.species }}
Group{{ this_trait.dataset.group.name }}
Tissue{{ this_trait.dataset.tissue }}
Aliases{{ this_trait.alias_fmt|replace(",",";") }}
Location{{ this_trait.location_fmt }}
Database + + {{ dataset.fullname }} + +
Target Score + + BLAT Specificity + : + {{ "%0.3f" | format(this_trait.probe_set_specificity|float) }} +    + {% if this_trait.probe_set_blat_score %} + Score: {{ "%0.3f" | format(this_trait.probe_set_blat_score|float) }} + {% endif %} +
Resource Links + {% if this_trait.geneid != None %} + + Gene + +    + {% endif %} + {% if this_trait.omim != None %} + + OMIM + +    + {% endif %} + {% if this_trait.genbankid != None %} + + GenBank + +    + {% endif %} + {% if this_trait.symbol != None %} + + Genotation + +    {% endif %} - {% if this_trait.omim != None %} - - OMIM - -    - {% endif %} - {% if this_trait.genbankid != None %} - - GenBank - -    - {% endif %} - {% if this_trait.symbol != None %} - - Genotation - -    - {% endif %} - - {% endif %} - - +
-- cgit v1.2.3