diff options
Diffstat (limited to 'gn3/computations/rust_correlation.py')
-rw-r--r-- | gn3/computations/rust_correlation.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gn3/computations/rust_correlation.py b/gn3/computations/rust_correlation.py index 1ae26b8..5ce097d 100644 --- a/gn3/computations/rust_correlation.py +++ b/gn3/computations/rust_correlation.py @@ -54,19 +54,19 @@ def run_correlation( """entry function to call rust correlation""" # pylint: disable=too-many-arguments - CORRELATION_COMMAND = current_app.config["CORRELATION_COMMAND"] # make arg? + correlation_command = current_app.config["CORRELATION_COMMAND"] # make arg? (tmp_dir, tmp_file) = generate_input_files(dataset) (output_file, json_file) = generate_json_file( tmp_dir=tmp_dir, tmp_file=tmp_file, method=method, delimiter=delimiter, x_vals=trait_vals) - command_list = [CORRELATION_COMMAND, json_file, TMPDIR] + command_list = [correlation_command, json_file, TMPDIR] try: subprocess.run(command_list, check=True, capture_output=True) except subprocess.CalledProcessError as cpe: actual_command = ( - os.readlink(CORRELATION_COMMAND) - if os.path.islink(CORRELATION_COMMAND) - else CORRELATION_COMMAND) + os.readlink(correlation_command) + if os.path.islink(correlation_command) + else correlation_command) raise Exception(command_list, actual_command, cpe.stdout) from cpe return parse_correlation_output(output_file, corr_type, top_n) |