diff options
| author | Alexander_Kabui | 2025-02-07 13:50:25 +0300 |
|---|---|---|
| committer | Alexander_Kabui | 2025-02-07 13:50:25 +0300 |
| commit | 445e820f136f21b9ee83bc824a5b8a9c42782bfe (patch) | |
| tree | 153af8a9f728f91e64e529e04144cdb8ce1fbc44 /gn3/api | |
| parent | 766963ea39c2dacb8d3e7226a52d82ce4e16e7e9 (diff) | |
| download | genenetwork3-445e820f136f21b9ee83bc824a5b8a9c42782bfe.tar.gz | |
feat: Enable streaming functionality for rqtl2.
Diffstat (limited to 'gn3/api')
| -rw-r--r-- | gn3/api/rqtl2.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gn3/api/rqtl2.py b/gn3/api/rqtl2.py index 5b27f3c..5219573 100644 --- a/gn3/api/rqtl2.py +++ b/gn3/api/rqtl2.py @@ -12,11 +12,14 @@ from gn3.computations.rqtl2 import (compose_rqtl2_cmd, process_qtl2_results ) from gn3.computations.streaming import run_process +from gn3.computations.streaming import enable_streaming + rqtl2 = Blueprint("rqtl2", __name__) @rqtl2.route("/compute", methods=["POST"]) -def compute(): +@enable_streaming +def compute(log_file): """Endpoint for computing QTL analysis using R/QTL2""" data = request.json required_keys = ["crosstype", "geno_data","pheno_data", "geno_codes"] @@ -30,7 +33,7 @@ def compute(): run_id = request.args.get("id", "output") # prepare necessary files and dir for computation (workspace_dir, input_file, - output_file, log_file) = prepare_files(current_app.config.get("TMPDIR")) + output_file, _log2_file) = prepare_files(current_app.config.get("TMPDIR")) # write the input file with data required for creating the cross write_input_file(input_file, workspace_dir, data) # TODO : Implement a better way for fetching the file Path. |
