aboutsummaryrefslogtreecommitdiff
path: root/gn3/api
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-05-24 04:46:57 +0300
committerFrederick Muriuki Muriithi2022-05-24 05:16:55 +0300
commit36f8421a8fe223189ab88ee1df3923719ffa4fc0 (patch)
tree7f79b4f594ec787190c9a7c7dcbdd4bec40a0db1 /gn3/api
parent63d9c9932721e98a9d6715686214157e276af105 (diff)
downloadgenenetwork3-36f8421a8fe223189ab88ee1df3923719ffa4fc0.tar.gz
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.
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/correlation.py4
1 files changed, 2 insertions, 2 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})