From 36f8421a8fe223189ab88ee1df3923719ffa4fc0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 24 May 2022 04:46:57 +0300 Subject: New script to compute partial correlations * Add a new script to compute the partial correlations against: - a select list of traits, or - an entire dataset depending on the specified subcommand. This new script is meant to supercede the `scripts/partial_correlations.py` script. * Fix the check for errors * Reorganise the order of arguments for the `partial_correlations_with_target_traits` function: move the `method` argument before the `target_trait_names` argument so that the common arguments in the partial correlation computation functions share the same order. --- gn3/api/correlation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn3/api') 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}) -- cgit v1.2.3