aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/heatmaps.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-09-22 07:53:53 +0300
committerFrederick Muriuki Muriithi2021-09-22 07:57:21 +0300
commitcd7f301688fd9780df1f842f8bd2b7602775ba1f (patch)
treecdbcf8077c532c1b5ba7bc0c934932c1a6eb58ab /gn3/api/heatmaps.py
parent5892ffc7488b0c9cbb4ea08fd5c5f8648e0baea8 (diff)
downloadgenenetwork3-cd7f301688fd9780df1f842f8bd2b7602775ba1f.tar.gz
Fix pylint errors
* Add missing function and module docstrings * Remove unused imports * Fix import order * Rework some code sections to fix issues * Disable some pylint errors.
Diffstat (limited to 'gn3/api/heatmaps.py')
-rw-r--r--gn3/api/heatmaps.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gn3/api/heatmaps.py b/gn3/api/heatmaps.py
index 1022a35..fe47aee 100644
--- a/gn3/api/heatmaps.py
+++ b/gn3/api/heatmaps.py
@@ -1,3 +1,7 @@
+"""
+Module to hold the entrypoint functions that generate heatmaps
+"""
+
import io
from flask import jsonify
from flask import request
@@ -9,6 +13,10 @@ heatmaps = Blueprint("heatmaps", __name__)
@heatmaps.route("/clustered", methods=("POST",))
def clustered_heatmaps():
+ """
+ Parses the incoming data and responds with the JSON-serialized plotly figure
+ representing the clustered heatmap.
+ """
heatmap_request = request.get_json()
traits_names = heatmap_request.get("traits_names", tuple())
if len(traits_names) < 2: