diff options
author | Pjotr Prins | 2024-03-24 09:36:33 +0100 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-09-12 07:20:32 -0500 |
commit | 1c4286ec769bdea47c7950b905d78232366af1fe (patch) | |
tree | 79e4bf6a77cc77202eee662e573f7a477b02e904 /gn3/api/rqtl.py | |
parent | 090e5e0c41db2068d7e55684e320b287adc34bab (diff) | |
download | genenetwork3-1c4286ec769bdea47c7950b905d78232366af1fe.tar.gz |
Change behavior of do_paths_exist to actually throw useful error
Diffstat (limited to 'gn3/api/rqtl.py')
-rw-r--r-- | gn3/api/rqtl.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py index ae0110d..bfb191e 100644 --- a/gn3/api/rqtl.py +++ b/gn3/api/rqtl.py @@ -8,7 +8,7 @@ from flask import request from gn3.computations.rqtl import generate_rqtl_cmd, process_rqtl_mapping, \ process_rqtl_pairscan, process_perm_output -from gn3.computations.gemma import do_paths_exist +from gn3.computations.gemma import assert_paths_exist rqtl = Blueprint("rqtl", __name__) @@ -21,8 +21,7 @@ run the rqtl_wrapper script and return the results as JSON genofile = request.form['geno_file'] phenofile = request.form['pheno_file'] - if not do_paths_exist([genofile, phenofile]): - raise FileNotFoundError + assert_paths_exist([genofile, phenofile]) # Split kwargs by those with values and boolean ones that just convert to True/False kwargs = ["covarstruct", "model", "method", "nperm", "scale", "control"] |