aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorzsloan2016-10-25 16:39:47 +0000
committerzsloan2016-10-25 16:39:47 +0000
commite67129ad901bb2af29f4f00ba5d4d5b9b94ae705 (patch)
tree9d0dc85cb14523f528f849cc4e7d177bb088ecc1 /wqflask/base
parenteb4a6942d51f1f69135f95fb14587a6494732eda (diff)
downloadgenenetwork2-e67129ad901bb2af29f4f00ba5d4d5b9b94ae705.tar.gz
Replaced the Download Table button for collection page with python version that displays metadata, etc
Removed currently unused javascript and css imports related to the DataTables buttons import (since it was replaced with the python export) from regular search, both global searches, and the view_collection page Added a bunch of parameters to the jsonable function for the GeneralTrait object in order to later create a json version of the search results and implement the client-side Scroller feature (which dynamically loads table rows from json when you scroll)
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/trait.py34
1 files changed, 30 insertions, 4 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 32032ba7..358138f5 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -78,10 +78,36 @@ class GeneralTrait(object):
"""Return a dict suitable for using as json
Actual turning into json doesn't happen here though"""
- return dict(name=self.name,
- dataset=self.dataset.name,
- description=self.description_display,
- mean=self.mean)
+
+ if self.dataset.type == "ProbeSet":
+ return dict(name=self.name,
+ symbol=self.symbol,
+ dataset=self.dataset.name,
+ description=self.description_display,
+ mean=self.mean,
+ location=self.location_repr,
+ lrs_score=self.LRS_score_repr,
+ lrs_location=self.LRS_location_repr,
+ additive=self.additive
+ )
+ elif self.dataset.type == "Publish":
+ return dict(name=self.name,
+ dataset=self.dataset.name,
+ description=self.description_display,
+ authors=self.authors,
+ pubmed_text=self.pubmed_text,
+ pubmed_link=self.pubmed_link,
+ lrs_score=self.LRS_score_repr,
+ lrs_location=self.LRS_location_repr,
+ additive=self.additive
+ )
+ elif self.dataset.type == "Geno":
+ return dict(name=self.name,
+ dataset=self.dataset.name,
+ location=self.location_repr
+ )
+ else:
+ return dict()
def get_name(self):