diff options
author | BonfaceKilz | 2021-04-29 21:33:11 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-04-29 21:33:11 +0300 |
commit | 67703a57db19c9a1ebcc6991087479979cbbca18 (patch) | |
tree | 841c545668d1a14dfa2fe80be759df1941b15f13 /wqflask | |
parent | dd0116f7cc3bed84777d625b6a22d716a3ba4fe2 (diff) | |
download | genenetwork2-67703a57db19c9a1ebcc6991087479979cbbca18.tar.gz |
base: trait: Remove unused function
* wqflask/base/trait.py (jsonable_table_row): Delete it.
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/base/trait.py | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index df96d46e..a9223a32 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -341,74 +341,6 @@ def jsonable(trait): return dict() -def jsonable_table_row(trait, dataset_name, index): - """Return a list suitable for json and intended to be displayed in a table - - Actual turning into json doesn't happen here though""" - - dataset = create_dataset(dataset_name) - - if dataset.type == "ProbeSet": - if trait.mean == "": - mean = "N/A" - else: - mean = "%.3f" % round(float(trait.mean), 2) - if trait.additive == "": - additive = "N/A" - else: - additive = "%.3f" % round(float(trait.additive), 2) - return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" value="' + hmac.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, - trait.description_display, - trait.location_repr, - mean, - trait.LRS_score_repr, - trait.LRS_location_repr, - additive] - elif dataset.type == "Publish": - if trait.additive == "": - additive = "N/A" - else: - additive = "%.2f" % round(float(trait.additive), 2) - if trait.pubmed_id: - return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" value="' + hmac.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, - trait.authors, - '<a href="' + trait.pubmed_link + '">' + trait.pubmed_text + '</href>', - trait.LRS_score_repr, - trait.LRS_location_repr, - additive] - else: - return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" value="' + hmac.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, - trait.authors, - trait.pubmed_text, - trait.LRS_score_repr, - trait.LRS_location_repr, - additive] - elif dataset.type == "Geno": - return ['<input type="checkbox" name="searchResult" class="checkbox trait_checkbox" value="' + hmac.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] - else: - return dict() - - def retrieve_trait_info(trait, dataset, get_qtl_info=False): assert dataset, "Dataset doesn't exist" |