aboutsummaryrefslogtreecommitdiff
path: root/scripts/rqtl2/install_phenos.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-12-03 11:18:14 -0600
committerFrederick Muriuki Muriithi2024-12-03 15:11:24 -0600
commitc7ff9222b74402e068630352ba37de0f15d07b88 (patch)
tree61604f01774ff170711df27f99d00ea4a2b3461b /scripts/rqtl2/install_phenos.py
parent0c59c583399ff0158d45c0bbdad61a056bd8fd6f (diff)
downloadgn-uploader-c7ff9222b74402e068630352ba37de0f15d07b88.tar.gz
Pass the redis connection and fully qualified job id
Pass the redis connection on to the function used to build main since it might need to use a connection to redis. Also pass the computed fully qualified job id rather than recomputing it every time. Update dependent functions to take the new arguments.
Diffstat (limited to 'scripts/rqtl2/install_phenos.py')
-rw-r--r--scripts/rqtl2/install_phenos.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/rqtl2/install_phenos.py b/scripts/rqtl2/install_phenos.py
index a6e9fb2..9059cd6 100644
--- a/scripts/rqtl2/install_phenos.py
+++ b/scripts/rqtl2/install_phenos.py
@@ -6,6 +6,7 @@ from zipfile import ZipFile
from functools import reduce
from logging import Logger, getLogger
+from redis import Redis
import MySQLdb as mdb
from MySQLdb.cursors import DictCursor
@@ -95,8 +96,10 @@ def cross_reference_probeset_data(dbconn: mdb.Connection,
} for row in dataids))
return cursor.rowcount
-def install_pheno_files(#pylint: disable=[too-many-arguments, too-many-locals]
+def install_pheno_files(#pylint: disable=[too-many-locals]
+ rconn: Redis,#pylint: disable=[unused-argument]
dbconn: mdb.Connection,
+ fullyqualifiedjobid: str,#pylint: disable=[unused-argument]
args: argparse.Namespace,
logger: Logger = getLogger()) -> int:
"""Load data in `pheno` files and other related files into the database."""