aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-05-05 15:19:08 +0300
committerFrederick Muriuki Muriithi2022-05-05 15:19:08 +0300
commitbe9d1d4aad720274f6d75345123fae8d6a96bc12 (patch)
treea0e314b06c4aee746cac71e73c7ff9bc9d2ce0af /scripts
parent3f0b4bf1085f4b28d50318e695da3f2bd739061f (diff)
downloadgenenetwork3-be9d1d4aad720274f6d75345123fae8d6a96bc12.tar.gz
Extract common error checking. Rename function.
* Extract the common error checking code into a separate function * Rename the function to make its use clearer
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/partial_correlations.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/partial_correlations.py b/scripts/partial_correlations.py
index f203daa..52bde4c 100755
--- a/scripts/partial_correlations.py
+++ b/scripts/partial_correlations.py
@@ -5,7 +5,7 @@ from argparse import ArgumentParser
from gn3.db_utils import database_connector
from gn3.responses.pcorrs_responses import OutputEncoder
-from gn3.computations.partial_correlations import partial_correlations_entry
+from gn3.computations.partial_correlations import partial_correlations_with_target_db
def process_cli_arguments():
parser = ArgumentParser()
@@ -37,7 +37,7 @@ def cleanup_string(the_str):
def run_partial_corrs(args):
with database_connector() as conn:
try:
- return partial_correlations_entry(
+ return partial_correlations_with_target_db(
conn, cleanup_string(args.primary_trait),
tuple(cleanup_string(args.control_traits).split(",")),
cleanup_string(args.method), args.criteria,