diff options
author | Frederick Muriuki Muriithi | 2024-10-24 16:57:10 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-10-24 16:57:40 -0500 |
commit | ac78c38f9fa10a82e72cf9686b89e0d93fb85f0d (patch) | |
tree | a6d13b3480769b3ee3c394d92c672a8b144440c7 | |
parent | cfdc87755c1be7f9c5f0dbd4236679621e612d8f (diff) | |
download | gn-uploader-ac78c38f9fa10a82e72cf9686b89e0d93fb85f0d.tar.gz |
Use the values in the argparse.Namespace object directly to avoid
creating many local variables.
-rw-r--r-- | scripts/rqtl2/phenotypes_qc.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/rqtl2/phenotypes_qc.py b/scripts/rqtl2/phenotypes_qc.py index 2e7937f..83828e4 100644 --- a/scripts/rqtl2/phenotypes_qc.py +++ b/scripts/rqtl2/phenotypes_qc.py @@ -329,12 +329,10 @@ def run_qc(# pylint: disable=[too-many-locals] logger: Logger ) -> int: """Run quality control checks on the bundle.""" - (phenobundle, workingdir, speciesid, populationid) = ( - args.rqtl2bundle, args.workingdir, args.speciesid, args.populationid) logger.debug("Beginning the quality assuarance checks.") results = check_for_averages_files( **check_for_mandatory_pheno_keys( - **validate(phenobundle, logger))) + **validate(args.rqtl2bundle, logger))) errors = results.get("errors", tuple()) if len(errors) > 0: logger.error("We found the following errors:\n%s", @@ -343,7 +341,8 @@ def run_qc(# pylint: disable=[too-many-locals] # Run QC on actual values # Steps: # - Extract file to specific directory - extractiondir, *_bundlefiles = extract_bundle(phenobundle, workingdir) + extractiondir, *_bundlefiles = extract_bundle( + args.rqtl2bundle, args.workingdir, args.jobid) # - For every pheno, phenocovar, phenose, phenonum file, undo # transposition where relevant @@ -360,7 +359,8 @@ def run_qc(# pylint: disable=[too-many-locals] item for item in set(reduce( lambda acc, item: acc + ( item["Name"], item["Name2"], item["Symbol"], item["Alias"]), - samples_by_species_and_population(dbconn, speciesid, populationid), + samples_by_species_and_population( + dbconn, args.speciesid, args.populationid), tuple())) if bool(item)) |