From 67703a57db19c9a1ebcc6991087479979cbbca18 Mon Sep 17 00:00:00 2001
From: BonfaceKilz
Date: Thu, 29 Apr 2021 21:33:11 +0300
Subject: base: trait: Remove unused function
* wqflask/base/trait.py (jsonable_table_row): Delete it.
---
wqflask/base/trait.py | 68 ---------------------------------------------------
1 file changed, 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 ['',
- index,
- ''+str(trait.name)+'',
- 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 ['',
- index,
- ''+str(trait.name)+'',
- trait.description_display,
- trait.authors,
- '' + trait.pubmed_text + '',
- trait.LRS_score_repr,
- trait.LRS_location_repr,
- additive]
- else:
- return ['',
- index,
- ''+str(trait.name)+'',
- trait.description_display,
- trait.authors,
- trait.pubmed_text,
- trait.LRS_score_repr,
- trait.LRS_location_repr,
- additive]
- elif dataset.type == "Geno":
- return ['',
- index,
- ''+str(trait.name)+'',
- trait.location_repr]
- else:
- return dict()
-
-
def retrieve_trait_info(trait, dataset, get_qtl_info=False):
assert dataset, "Dataset doesn't exist"
--
cgit v1.2.3