diff options
author | Frederick Muriuki Muriithi | 2024-10-24 15:57:27 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-10-24 15:58:13 -0500 |
commit | 6fb2834489888937842d761cbbc7c2992a4f5a0d (patch) | |
tree | a2d4d76c563a9bf1a057016daa880c65a833631e /scripts/rqtl2/install_phenos.py | |
parent | a52401e7191850c4a6542da1af5f2b2769312871 (diff) | |
download | gn-uploader-6fb2834489888937842d761cbbc7c2992a4f5a0d.tar.gz |
Parse entire namespace object rather than individual values.
Diffstat (limited to 'scripts/rqtl2/install_phenos.py')
-rw-r--r-- | scripts/rqtl2/install_phenos.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/rqtl2/install_phenos.py b/scripts/rqtl2/install_phenos.py index e96742f..a6e9fb2 100644 --- a/scripts/rqtl2/install_phenos.py +++ b/scripts/rqtl2/install_phenos.py @@ -1,7 +1,7 @@ """Load pheno from R/qtl2 bundle into the database.""" import sys +import argparse import traceback -from pathlib import Path from zipfile import ZipFile from functools import reduce from logging import Logger, getLogger @@ -97,12 +97,11 @@ def cross_reference_probeset_data(dbconn: mdb.Connection, def install_pheno_files(#pylint: disable=[too-many-arguments, too-many-locals] dbconn: mdb.Connection, - speciesid: int, - platformid: int, - datasetid: int, - rqtl2bundle: Path, + args: argparse.Namespace, logger: Logger = getLogger()) -> int: """Load data in `pheno` files and other related files into the database.""" + (speciesid, platformid, datasetid, rqtl2bundle) = ( + args.speciesid, args.platformid, args.datasetid, args.rqtl2bundle) with ZipFile(str(rqtl2bundle), "r") as zfile: try: rqc.validate_bundle(zfile) |