aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-09-20 06:54:04 +0300
committerFrederick Muriuki Muriithi2021-09-20 06:54:04 +0300
commit03a91557c119fc2c4cdfc36015260034ead0ba98 (patch)
tree32a42397dbd53ab58fc4f7a93e65771a4f5a5c70
parentb6c0885007d516b257d1027b97df66c11b8672dd (diff)
downloadgenenetwork2-03a91557c119fc2c4cdfc36015260034ead0ba98.tar.gz
Provide UI elements for clustered heatmap generation
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * wqflask/wqflask/collect.py: provide hard-coded URL for testing * wqflask/wqflask/templates/collections/view.html: provide button Provide a button to trigger the heatmap generation. As a test, we also provide a hard-coded URL for the API endpoint to get the heatmap data.
-rw-r--r--wqflask/wqflask/collect.py3
-rw-r--r--wqflask/wqflask/templates/collections/view.html6
2 files changed, 8 insertions, 1 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py
index 01274ba9..41ff47ae 100644
--- a/wqflask/wqflask/collect.py
+++ b/wqflask/wqflask/collect.py
@@ -219,7 +219,8 @@ def view_collection():
json_version.append(jsonable(trait_ob))
collection_info = dict(trait_obs=trait_obs,
- uc=uc)
+ uc=uc,
+ heatmap_data_url="http://localhost:8080/api/heatmaps/clustered")
if "json" in params:
return json.dumps(json_version)
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index 9ec98ab1..09f9dd21 100644
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -50,6 +50,12 @@
<button class="btn btn-default" id="deselect_all" type="button"><span class="glyphicon glyphicon-remove"></span> Deselect</button>
<button id="remove" class="btn btn-danger" data-url="/collections/remove" type="button" disabled><i class="icon-minus-sign"></i> Delete Rows</button>
<button id="delete" class="btn btn-danger submit_special" data-url="/collections/delete" title="Delete this collection" > Delete Collection</button>
+ <button id="clustered-heatmap"
+ class="btn btn-main"
+ data-url="{{heatmap_data_url}}"
+ title="Generate heatmap from this collection">
+ Clustered Heatmap
+ </button>
</form>
</div>
<div style="margin-top: 10px; margin-bottom: 5px;">