diff options
| author | Frederick Muriuki Muriithi | 2025-10-27 14:21:01 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2025-10-27 19:11:26 -0500 |
| commit | 51688d31004f8f7453d8190927b9c11503a453c0 (patch) | |
| tree | fe01bd42a5f8df1bdb9ece45f0c4c7b716c09eb2 /scripts/partial_correlations.py | |
| parent | 019282e64fb401f7a6823f3c8914d1d6e5ad0233 (diff) | |
| download | genenetwork3-51688d31004f8f7453d8190927b9c11503a453c0.tar.gz | |
Pass `TEXTDIR` configuration on to the script.
Pass the `TEXXDIR` configuration variable on to the script.
Diffstat (limited to 'scripts/partial_correlations.py')
| -rw-r--r-- | scripts/partial_correlations.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/partial_correlations.py b/scripts/partial_correlations.py index aab8f08..f47d9d6 100644 --- a/scripts/partial_correlations.py +++ b/scripts/partial_correlations.py @@ -1,7 +1,7 @@ """Script to run partial correlations""" - import json import traceback +from pathlib import Path from argparse import ArgumentParser from gn3.db_utils import database_connection @@ -48,7 +48,8 @@ def pcorrs_against_traits(dbconn, args): def pcorrs_against_db(dbconn, args): """Run partial correlations agaist the entire dataset provided.""" - return partial_correlations_with_target_db(dbconn, **process_db_args(args)) + return partial_correlations_with_target_db( + dbconn, **process_db_args(args), textdir=args.textdir) def run_pcorrs(dbconn, args): """Run the selected partial correlations function.""" @@ -89,6 +90,11 @@ def against_db_parser(parent_parser): "--criteria", help="Number of results to return", type=int, default=500) + parser.add_argument( + "--textdir", + help="Directory to read text files from", + type=Path, + default=Path("/tmp/")) parser.set_defaults(func=pcorrs_against_db) return parent_parser |
