aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations/wgcna.py
diff options
context:
space:
mode:
authorPjotr Prins2024-04-03 13:24:32 +0200
committerFrederick Muriuki Muriithi2024-09-12 07:40:04 -0500
commit9d221ad285e4d41e0a83af88bef8f221356848ba (patch)
treeaef89f20b2b8d87641a134a0c59f064a98a0cd44 /gn3/computations/wgcna.py
parente10b62f88432856019540074fd19b6acdb70d4ad (diff)
downloadgenenetwork3-9d221ad285e4d41e0a83af88bef8f221356848ba.tar.gz
Replace TMPDIR/output with TMPDIR/gn3 so it is clear where it comes from
Diffstat (limited to 'gn3/computations/wgcna.py')
-rw-r--r--gn3/computations/wgcna.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gn3/computations/wgcna.py b/gn3/computations/wgcna.py
index 01d024b..e6fab26 100644
--- a/gn3/computations/wgcna.py
+++ b/gn3/computations/wgcna.py
@@ -29,18 +29,18 @@ def stream_cmd_output(socketio, request_data, cmd: str):
"""function to stream in realtime"""
# xtodo syncing and closing /edge cases
- socketio.emit("output", {"data": f"calling you script {cmd}"},
+ socketio.emit("gn3", {"data": f"calling you script {cmd}"},
namespace="/", room=request_data["socket_id"])
with subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) as results:
if results.stdout is not None:
for line in iter(results.stdout.readline, b""):
- socketio.emit("output",
+ socketio.emit("gn3",
{"data": line.decode("utf-8").rstrip()},
namespace="/", room=request_data["socket_id"])
socketio.emit(
- "output", {"data":
+ "gn3", {"data":
"parsing the output results"}, namespace="/",
room=request_data["socket_id"])
@@ -79,8 +79,8 @@ def call_wgcna_script(rscript_path: str, request_data: dict):
return run_cmd_results
output_file_data = json.load(outputfile)
- output_file_data["output"]["image_data"] = process_image(
- output_file_data["output"]["imageLoc"]).decode("ascii")
+ output_file_data["gn3"]["image_data"] = process_image(
+ output_file_data["gn3"]["imageLoc"]).decode("ascii")
# json format only supports unicode string// to get image data reconvert
return {