From bba6befbad749533779c0b6057e22885d351595b Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Fri, 20 Dec 2024 17:53:07 +0300 Subject: feat: Enable streaming for output. --- gn3/api/rqtl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py index 7246ba8..39f45a3 100644 --- a/gn3/api/rqtl.py +++ b/gn3/api/rqtl.py @@ -64,9 +64,11 @@ run the rqtl_wrapper script and return the results as JSON run_id = request.args.get("id", str(uuid.uuid4())) if not os.path.isfile(os.path.join(current_app.config.get("TMPDIR"), "gn3", rqtl_cmd.get('output_file'))): - stream_ouput_file = os.path.join(current_app.config.get("TMPDIR"), + pass + stream_ouput_file = os.path.join(current_app.config.get("TMPDIR"), f"{run_id}.txt") - run_process(rqtl_cmd.get("rqtl_cmd"), stream_ouput_file, run_id) + + results = run_process(rqtl_cmd.get("rqtl_cmd"), stream_ouput_file, run_id) if "pairscan" in rqtl_bool_kwargs: rqtl_output['results'] = process_rqtl_pairscan(rqtl_cmd.get('output_file'), genofile) -- cgit 1.4.1