diff options
| author | Munyoki Kilyungi (aider) | 2025-02-26 17:09:11 +0300 |
|---|---|---|
| committer | BonfaceKilz | 2025-03-04 15:48:10 +0300 |
| commit | e7baf1a4cf05a4e7794a6531c92d367fcd8f1651 (patch) | |
| tree | fe02dc4412b50042a7fc578ad11a44e4a4c37c3b | |
| parent | afa382287c7a73fe6985ddea69a35ddff39a99e1 (diff) | |
| download | genenetwork3-e7baf1a4cf05a4e7794a6531c92d367fcd8f1651.tar.gz | |
fix: Replace file path fetching code in rqtl2.py with current_app.root_path
| -rw-r--r-- | gn3/api/rqtl2.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gn3/api/rqtl2.py b/gn3/api/rqtl2.py index 5219573..5e0a390 100644 --- a/gn3/api/rqtl2.py +++ b/gn3/api/rqtl2.py @@ -36,8 +36,7 @@ def compute(log_file): 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. - rqtl_path =Path(__file__).absolute().parent.parent.parent.joinpath("scripts/rqtl2_wrapper.R") + rqtl_path = Path(current_app.root_path) / "scripts" / "rqtl2_wrapper.R" if not rqtl_path.is_file(): return jsonify({"error" : f"The script {rqtl_path} does not exists"}), 400 rqtl2_cmd = compose_rqtl2_cmd(rqtl_path, input_file, |
