From db196d5ea2dd2ffbb6d9ff4b9fcc5dd2b2d66678 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 17 Oct 2024 14:15:03 -0500 Subject: Add the working directory argument to the script. Add a `--working-dir` argument to allow passing a directory where the script process the files within. If not provided, it defaults to a directory within the systems temporary directory. --- scripts/rqtl2/phenotypes_qc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/rqtl2/phenotypes_qc.py b/scripts/rqtl2/phenotypes_qc.py index be57513..9d58137 100644 --- a/scripts/rqtl2/phenotypes_qc.py +++ b/scripts/rqtl2/phenotypes_qc.py @@ -1,5 +1,6 @@ """Run quality control on phenotypes-specific files in the bundle.""" import sys +import tempfile from pathlib import Path from argparse import ArgumentParser from zipfile import ZipFile @@ -128,6 +129,12 @@ if __name__ == "__main__": program="PhenotypesQC", description=( "Perform Quality Control checks on a phenotypes bundle file"))) + parser.add_argument( + "--working-dir", + default=f"{tempfile.gettempdir()}/phenotypes_qc", + help=("The directory where this script will put its intermediate " + "files."), + type=Path) return parser.parse_args() _logger = getLogger("phenotypes_qc") -- cgit v1.2.3