diff options
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/api/correlation.py | 4 | ||||
-rw-r--r-- | gn3/computations/partial_correlations.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/gn3/api/correlation.py b/gn3/api/correlation.py index 5f2d486..3aadcb9 100644 --- a/gn3/api/correlation.py +++ b/gn3/api/correlation.py @@ -148,8 +148,8 @@ def partial_correlation(): trait_fullname(args["primary_trait"]), tuple( trait_fullname(trait) for trait in args["control_traits"]), + args["method"], tuple( - trait_fullname(trait) for trait in args["target_traits"]), - args["method"]) + trait_fullname(trait) for trait in args["target_traits"])) return build_response({"status": "success", "results": results}) diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py index 530dd71..f316f67 100644 --- a/gn3/computations/partial_correlations.py +++ b/gn3/computations/partial_correlations.py @@ -681,7 +681,7 @@ def partial_correlations_with_target_db(# pylint: disable=[R0913, R0914, R0911] check_res = check_for_common_errors( conn, primary_trait_name, control_trait_names, threshold) - if check_res.get("status") == "error": + if check_res.get("status") != "success": return check_res primary_trait = check_res["primary_trait"] @@ -819,15 +819,15 @@ def partial_correlations_with_target_db(# pylint: disable=[R0913, R0914, R0911] def partial_correlations_with_target_traits( conn: Any, primary_trait_name: str, - control_trait_names: Tuple[str, ...], - target_trait_names: Tuple[str, ...], method: str) -> dict: + control_trait_names: Tuple[str, ...], method: str, + target_trait_names: Tuple[str, ...]) -> dict: """ Compute partial correlation against a specific selection of traits. """ threshold = 0 check_res = check_for_common_errors( conn, primary_trait_name, control_trait_names, threshold) - if check_res.get("status") == "error": + if check_res.get("status") != "success": return check_res target_traits = { |