aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
Diffstat (limited to 'gn3')
-rw-r--r--gn3/computations/wgcna.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gn3/computations/wgcna.py b/gn3/computations/wgcna.py
index 4dd0985..94e2a40 100644
--- a/gn3/computations/wgcna.py
+++ b/gn3/computations/wgcna.py
@@ -28,12 +28,18 @@ def stream_cmd_output(socket, cmd: str):
"""function to stream in realtime"""
# xtodo syncing and closing /edge cases
+ socket.emit("output", {"data", f"calling you script {cmd}"})
+
results = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
for line in iter(results.stdout.readline, b""):
line = line.decode("utf-8").rstrip()
- # xtodo emit the data
+ socket.emit("output",
+ {"data": line})
+ # close above make sure the process is closed
+
+ socket.emit("output", {"data": "parsing the output results"})
def process_image(image_loc: str) -> bytes:
@@ -62,8 +68,6 @@ def call_wgcna_script(rscript_path: str, request_data: dict):
run_cmd_results = run_cmd(cmd)
- print(run_cmd_results["output"])
-
with open(generated_file, "r") as outputfile:
output_file_data = json.load(outputfile)