1+ // Prevent schemas warnings for profile parameters
2+ validation {
3+ ignoreParams = [
4+ 'cheaha_scratch_dir',
5+ 'cheaha_getQueues'
6+ ]
7+ }
8+
19// Define the Scratch directory
2- def scratch_dir = System.getenv(" USER_SCRATCH" ) ?: " /tmp"
10+ params.cheaha_scratch_dir = env(' USER_SCRATCH' ) ?: ' /tmp'
311
412params {
513 config_profile_name = 'cheaha'
@@ -9,17 +17,17 @@ params {
917}
1018
1119env {
12- TMPDIR="$scratch_dir"
13- SINGULARITY_TMPDIR="$scratch_dir"
20+ TMPDIR=params.cheaha_scratch_dir
21+ SINGULARITY_TMPDIR=params.cheaha_scratch_dir
1422}
1523
1624singularity {
1725 enabled = true
1826 autoMounts = true
19- runOptions = "--contain --workdir $scratch_dir -B /scratch"
27+ runOptions = "--contain --workdir ${params.cheaha_scratch_dir} -B /scratch"
2028}
2129
22- def getQueues = { time, memory ->
30+ params.cheaha_getQueues = { time, memory ->
2331 def queue_list = ["long"]
2432
2533 if (time <= 2.h) {
@@ -44,6 +52,7 @@ def getQueues = { time, memory ->
4452
4553 return queue_list.join(",")
4654}
55+ //Note .call() above did not resolve current warning for Nextflow plugin (for queue process below).
4756
4857process {
4958 resourceLimits = [
@@ -54,5 +63,5 @@ process {
5463 executor = 'slurm'
5564 maxRetries = 3
5665 beforeScript = 'module load Singularity/3.5.2-GCC-5.4.0-2.26'
57- queue = { getQueues ( task.time, task.memory ) }
66+ queue = { params.cheaha_getQueues ( task.time, task.memory ) }
5867}
0 commit comments