From be9d1d4aad720274f6d75345123fae8d6a96bc12 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 5 May 2022 15:19:08 +0300 Subject: Extract common error checking. Rename function. * Extract the common error checking code into a separate function * Rename the function to make its use clearer --- scripts/partial_correlations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') 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, -- cgit v1.2.3