diff options
author | zsloan | 2017-01-26 13:48:01 -0600 |
---|---|---|
committer | GitHub | 2017-01-26 13:48:01 -0600 |
commit | 5bf5c4091d14666c07a8d490551b931e80e614f0 (patch) | |
tree | 1e0c445912af7ccb273a25b858889048eb96f756 /wqflask/base/trait.py | |
parent | 7ea8ee22074c297925335cc048777f0ce8cb3912 (diff) | |
parent | 298ca525114a570794d4326613be54ec223dce8b (diff) | |
download | genenetwork2-5bf5c4091d14666c07a8d490551b931e80e614f0.tar.gz |
Merge pull request #237 from zsloan/master
Various changes/fixes
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r-- | wqflask/base/trait.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index eb5b91c3..bf87e879 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -207,7 +207,7 @@ class GeneralTrait(object): formatted = self.post_publication_description else: formatted = "Not available" - return formatted.capitalize() + return formatted @property def alias_fmt(self): @@ -379,7 +379,7 @@ def jsonable_table_row(trait, dataset_name, index): additive = "N/A" else: additive = "%.3f" % round(float(trait.additive), 2) - return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" style="transform: scale(1.5);" value="' + user_manager.data_hmac('{}:{}'.format(str(trait.name), dataset.name)) + '">', + return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" value="' + user_manager.data_hmac('{}:{}'.format(str(trait.name), dataset.name)) + '">', index, '<a href="/show_trait?trait_id='+str(trait.name)+'&dataset='+dataset.name+'">'+str(trait.name)+'</a>', trait.symbol, @@ -395,7 +395,7 @@ def jsonable_table_row(trait, dataset_name, index): else: additive = "%.2f" % round(float(trait.additive), 2) if trait.pubmed_id: - return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" style="transform: scale(1.5);" value="' + user_manager.data_hmac('{}:{}'.format(str(trait.name), dataset.name)) + '">', + return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" value="' + user_manager.data_hmac('{}:{}'.format(str(trait.name), dataset.name)) + '">', index, '<a href="/show_trait?trait_id='+str(trait.name)+'&dataset='+dataset.name+'">'+str(trait.name)+'</a>', trait.description_display, @@ -405,7 +405,7 @@ def jsonable_table_row(trait, dataset_name, index): trait.LRS_location_repr, additive] else: - return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" style="transform: scale(1.5);" value="' + user_manager.data_hmac('{}:{}'.format(str(trait.name), dataset.name)) + '">', + return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" value="' + user_manager.data_hmac('{}:{}'.format(str(trait.name), dataset.name)) + '">', index, '<a href="/show_trait?trait_id='+str(trait.name)+'&dataset='+dataset.name+'">'+str(trait.name)+'</a>', trait.description_display, @@ -415,7 +415,7 @@ def jsonable_table_row(trait, dataset_name, index): trait.LRS_location_repr, additive] elif dataset.type == "Geno": - return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" style="transform: scale(1.5);" value="' + user_manager.data_hmac('{}:{}'.format(str(trait.name), dataset.name)) + '">', + return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" value="' + user_manager.data_hmac('{}:{}'.format(str(trait.name), dataset.name)) + '">', index, '<a href="/show_trait?trait_id='+str(trait.name)+'&dataset='+dataset.name+'">'+str(trait.name)+'</a>', trait.location_repr] @@ -499,7 +499,7 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False): for i, field in enumerate(dataset.display_fields): holder = trait_info[i] if isinstance(trait_info[i], basestring): - holder = unicode(trait_info[i], "utf8", "ignore") + holder = unicode(trait_info[i], "utf-8", "ignore") setattr(trait, field, holder) if dataset.type == 'Publish': |