From e5cd03134e1f1ea39b9703c37e789ddc22f5b8c6 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 7 Jul 2015 20:12:46 +0000 Subject: Added index column and changed the way location is displayed for search results --- wqflask/base/data_set.py | 12 ++++++------ wqflask/wqflask/do_search.py | 8 ++++---- wqflask/wqflask/templates/search_result_page.html | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index d46e4363..36f7d036 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -691,7 +691,7 @@ class PhenotypeDataSet(DataSet): 'sequence', 'units', 'comments'] # Fields displayed in the search results table header - self.header_fields = ['', + self.header_fields = ['Index', 'ID', 'Description', 'Authors', @@ -795,7 +795,7 @@ class PhenotypeDataSet(DataSet): this_trait.LRS_score_repr = LRS_score_repr = '%3.1f' % this_trait.lrs this_trait.LRS_score_value = LRS_score_value = this_trait.lrs - this_trait.LRS_location_repr = LRS_location_repr = 'Chr %s: %.6f Mb' % (LRS_Chr, float(LRS_Mb)) + this_trait.LRS_location_repr = LRS_location_repr = 'Chr%s: %.6f' % (LRS_Chr, float(LRS_Mb)) def retrieve_sample_data(self, trait): query = """ @@ -835,7 +835,7 @@ class GenotypeDataSet(DataSet): 'sequence'] # Fields displayed in the search results table header - self.header_fields = ['', + self.header_fields = ['Index', 'ID', 'Location'] @@ -953,7 +953,7 @@ class MrnaAssayDataSet(DataSet): 'flag'] # Fields displayed in the search results table header - self.header_fields = ['', + self.header_fields = ['Index', 'ID', 'Symbol', 'Description', @@ -1115,7 +1115,7 @@ class MrnaAssayDataSet(DataSet): # this_trait.mb) #ZS: Put this in function currently called "convert_location_to_value" - this_trait.location_repr = 'Chr %s: %.6f Mb' % (this_trait.chr, + this_trait.location_repr = 'Chr%s: %.6f' % (this_trait.chr, float(this_trait.mb)) this_trait.location_value = trait_location_value @@ -1171,7 +1171,7 @@ class MrnaAssayDataSet(DataSet): this_trait.LRS_score_repr = '%3.1f' % this_trait.lrs this_trait.LRS_score_value = this_trait.lrs - this_trait.LRS_location_repr = 'Chr %s: %.6f' % (lrs_chr, float(lrs_mb)) + this_trait.LRS_location_repr = 'Chr%s: %.6f' % (lrs_chr, float(lrs_mb)) def convert_location_to_value(self, chromosome, mb): diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index 6bf24faf..fc8db204 100755 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -92,7 +92,7 @@ class QuickMrnaAssaySearch(DoSearch): ProbeSet.name_num as ProbeSet_name_num FROM ProbeSet """ - header_fields = ['', + header_fields = ['Index', 'Record', 'Symbol', 'Location'] @@ -129,7 +129,7 @@ class MrnaAssaySearch(DoSearch): ProbeSet.name_num as TNAME_NUM FROM ProbeSetXRef, ProbeSet """ - header_fields = ['', + header_fields = ['Index', 'Record', 'Symbol', 'Description', @@ -234,7 +234,7 @@ class PhenotypeSearch(DoSearch): 'Publication.Authors', 'PublishXRef.Id') - header_fields = ['', + header_fields = ['Index', 'Record', 'Description', 'Authors', @@ -388,7 +388,7 @@ class GenotypeSearch(DoSearch): search_fields = ('Name', 'Chr') - header_fields = ['', + header_fields = ['Index', 'Record', 'Location'] diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html index 227dec0b..7c39ac61 100755 --- a/wqflask/wqflask/templates/search_result_page.html +++ b/wqflask/wqflask/templates/search_result_page.html @@ -63,7 +63,7 @@
{% for this_trait in trait_list %}