aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/heatmaps.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-09-17 10:35:15 +0300
committerFrederick Muriuki Muriithi2021-09-17 10:35:15 +0300
commit8ac3194f06084dfe5d0cfb141f178d83d937fcc3 (patch)
treed29994b36ed20f3557b4b329d28fa066744bf0e9 /gn3/api/heatmaps.py
parente17540bf8a57837fcf3241ea0b694250b53294fc (diff)
downloadgenenetwork3-8ac3194f06084dfe5d0cfb141f178d83d937fcc3.tar.gz
Return path to generated filename for now
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * To help with demonstrating that the code is producing the expected output, for now, we return the path to the generated html file that displays the interactive heatmap. At this point, it is mostly useful in the development environment. Moving forward, we might have to actually stream the raw html, or if we can get the Kaleido library packaged for GNU Guix, stream the images binary data instead.
Diffstat (limited to 'gn3/api/heatmaps.py')
-rw-r--r--gn3/api/heatmaps.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/gn3/api/heatmaps.py b/gn3/api/heatmaps.py
index cac9c71..f053241 100644
--- a/gn3/api/heatmaps.py
+++ b/gn3/api/heatmaps.py
@@ -20,9 +20,10 @@ def clustered_heatmaps():
# stream the heatmap data somehow here.
# Can plotly actually stream the figure data in a way that can be used on
# remote end to display the image without necessarily being html?
- return jsonify(
- {
- "query": heatmap_request,
- "output_png": heatmap_fig.to_image(format="png"),
- "output_svg": heatmap_fig.to_image(format="svg")
- }), 200
+ # return jsonify(
+ # {
+ # "query": heatmap_request,
+ # "output_png": heatmap_fig.to_image(format="png"),
+ # "output_svg": heatmap_fig.to_image(format="svg")
+ # }), 200
+ return jsonify({"output_filename": _heatmap_file}), 200