aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabui2021-10-09 21:58:36 +0300
committerAlexander Kabui2021-10-09 21:58:36 +0300
commit599ac567990a3881dc3821ad226a18ce538d1a17 (patch)
treee745a712e0fc4319d29ce8fcb030481f9596be3d
parentef80c72194dd8a0b8868ece15589e0a3cf04516f (diff)
downloadgenenetwork2-599ac567990a3881dc3821ad226a18ce538d1a17.tar.gz
add function to process image data
-rw-r--r--wqflask/wqflask/wgcna/gn3_wgcna.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/wqflask/wqflask/wgcna/gn3_wgcna.py b/wqflask/wqflask/wgcna/gn3_wgcna.py
index 2657a099..225bef22 100644
--- a/wqflask/wqflask/wgcna/gn3_wgcna.py
+++ b/wqflask/wqflask/wgcna/gn3_wgcna.py
@@ -3,7 +3,6 @@ and process data to be rendered by datatables
"""
-
def process_wgcna_data(response):
"""function for processing modeigene genes
for create row data for datataba"""
@@ -23,5 +22,12 @@ def process_wgcna_data(response):
}
-def process_image():
- pass \ No newline at end of file
+def process_image(response):
+ """function to process image check if byte string is empty"""
+ image_data = response["output"]["image_data"]
+ return ({
+ "image_generated": True,
+ "image_data": image_data
+ } if image_data else {
+ "image_generated": False
+ })