diff options
| author | Frederick Muriuki Muriithi | 2026-04-09 12:27:29 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-04-09 12:27:29 -0500 |
| commit | 5e49a4be1866dea06d35d4c0a8004f8ccf9dd19e (patch) | |
| tree | b794248ed4d6a626b3d0f79b2bf6cfd6feb83fb8 /scripts | |
| parent | f183e7bfd5ee4e84e78d2c5915b23e13be6e31e5 (diff) | |
| download | gn-uploader-5e49a4be1866dea06d35d4c0a8004f8ccf9dd19e.tar.gz | |
Specify the --permu_output option to QTLReaper
Specify the --permu_output option to QTLReaper to prevent it from attempting to write to the working directory, which in the guix containers is a READONLY file system.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/run_qtlreaper.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/run_qtlreaper.py b/scripts/run_qtlreaper.py index b9ccaa5..5ab5b21 100644 --- a/scripts/run_qtlreaper.py +++ b/scripts/run_qtlreaper.py @@ -147,13 +147,16 @@ def dispatch(args: Namespace) -> int: _qtlreaper_main_output = args.working_dir.joinpath( f"main-output-{secrets.token_urlsafe(15)}.tsv")#type: ignore[attr-defined] + _qtlreaper_permu_output = args.working_dir.joinpath( + f"permu-output-{secrets.token_urlsafe(15)}.tsv") logger.debug("Main output filename: %s", _qtlreaper_main_output) with subprocess.Popen( ("qtlreaper", "--n_permutations", "1000", "--geno", _genofile, "--traits", _traitsfile, - "--main_output", _qtlreaper_main_output), + "--main_output", _qtlreaper_main_output, + "--permu_output", _qtlreaper_permu_output), env=({**os.environ, "RUST_BACKTRACE": "full"} if logger.getEffectiveLevel() == logging.DEBUG else dict(os.environ))) as _qtlreaper: @@ -178,7 +181,11 @@ def dispatch(args: Namespace) -> int: if _qtlreaper_main_output.exists(): _qtlreaper_main_output.unlink() - logger.info("Deleted QTLReaper output file.") + logger.info("Deleted QTLReaper's main output file.") + + if _qtlreaper_permu_output.exists(): + _qtlreaper_permu_output.unlink() + logger.info("Deleted QTLReaper's permutations file.") if _qtlreaper.returncode != 0: return _qtlreaper.returncode |
