Skip to content

Commit aa53a6e

Browse files
authored
Merge pull request #1180 from fls-bioinformatics-core/auto_process-default-conda-env-dir-in-analysis-dir
Create conda environments under the analysis directory by default for 'make_fastqs' & 'run_qc'
2 parents 4458a29 + 212092d commit aa53a6e

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

auto_process_ngs/commands/make_fastqs_cmd.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
#
33
# make_fastqs_cmd.py: implement auto process make_fastqs command
4-
# Copyright (C) University of Manchester 2018-2025 Peter Briggs
4+
# Copyright (C) University of Manchester 2018-2026 Peter Briggs
55
#
66
#########################################################################
77

@@ -392,7 +392,12 @@ def make_fastqs(ap,protocol='standard',platform=None,
392392
if enable_conda is None:
393393
enable_conda = ap.settings.conda.enable_conda
394394
if conda_env_dir is None:
395-
conda_env_dir = ap.settings.conda.env_dir
395+
if ap.settings.conda.env_dir is not None:
396+
# Use value from configuration
397+
conda_env_dir = ap.settings.conda.env_dir
398+
else:
399+
# Use subdirectory of analysis dir
400+
conda_env_dir = os.path.join(ap.analysis_dir, "__conda", "envs")
396401

397402
# Other pipeline settings
398403
poll_interval = ap.settings.general.poll_interval

auto_process_ngs/commands/run_qc_cmd.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,12 @@ def run_qc(ap,projects=None,protocols=None,
243243
if enable_conda is None:
244244
enable_conda = ap.settings.conda.enable_conda
245245
if conda_env_dir is None:
246-
conda_env_dir = ap.settings.conda.env_dir
246+
# Use value from configuration
247+
if ap.settings.conda.env_dir is not None:
248+
conda_env_dir = ap.settings.conda.env_dir
249+
else:
250+
# Use subdirectory of analysis dir
251+
conda_env_dir = os.path.join(ap.analysis_dir, "__conda", "envs")
247252
# Set scheduler parameters
248253
if poll_interval is None:
249254
poll_interval = ap.settings.general.poll_interval

0 commit comments

Comments
 (0)