mirror of
https://github.com/MillironX/nf-configs.git
synced 2024-12-22 02:38:16 +00:00
Prince config - use function to check if env SCRATCH is set
This commit is contained in:
parent
da46b1cd9a
commit
28027a8489
1 changed files with 15 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
singularityDir = "$SCRATCH/singularity_images_nextflow"
|
||||
singularityModule = "singularity/3.2.1"
|
||||
squashfsModule = "squashfs/4.3"
|
||||
def singularityDir = set_singularity_path()
|
||||
def singularityModule = "singularity/3.2.1"
|
||||
def squashfsModule = "squashfs/4.3"
|
||||
|
||||
params {
|
||||
config_profile_description = """
|
||||
|
@ -13,11 +13,21 @@ params {
|
|||
}
|
||||
|
||||
singularity {
|
||||
enabled = true
|
||||
cacheDir = singularityDir
|
||||
enabled = true
|
||||
cacheDir = singularityDir
|
||||
}
|
||||
|
||||
process {
|
||||
beforeScript = "module load $singularityModule $squashfsModule"
|
||||
executor = 'slurm'
|
||||
}
|
||||
|
||||
def set_singularity_path() {
|
||||
def scratch = System.getenv('SCRATCH')
|
||||
if(scratch == null){
|
||||
System.err.println("WARNING: prince.config requires the SCRATCH env var to be set.")
|
||||
return null
|
||||
} else {
|
||||
return "$SCRATCH/singularity_images_nextflow"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue