aboutsummaryrefslogtreecommitdiff
path: root/scripts/rqtl2
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rqtl2')
-rw-r--r--scripts/rqtl2/phenotypes_qc.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/rqtl2/phenotypes_qc.py b/scripts/rqtl2/phenotypes_qc.py
index d8bf3c2..2e7937f 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 uuid
import shutil
import logging
import tempfile
@@ -111,11 +112,13 @@ def check_for_averages_files(
}
-def extract_bundle(bundle: Path, workdir: Path) -> tuple[Path, tuple[Path, ...]]:
+def extract_bundle(
+ bundle: Path, workdir: Path, jobid: uuid.UUID
+) -> tuple[Path, tuple[Path, ...]]:
"""Extract the bundle."""
with ZipFile(bundle) as zfile:
extractiondir = workdir.joinpath(
- f"{sha256_digest_over_file(bundle)}_phenotype_qc_{bundle.name}")
+ f"{str(jobid)}-{sha256_digest_over_file(bundle)}-{bundle.name}")
return extractiondir, rqtl2.extract(zfile, extractiondir)