Skip to content

Commit

Permalink
fix function usage
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse committed Mar 20, 2024
1 parent 4217eca commit c785430
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions conf/wustl_htcf.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
// Forked from https://github.com/nf-core/configs/blob/master/conf/prince.config

def singularityDir = set_singularity_path()
def labEnvVar = System.getenv("LAB")

if (labEnvVar) {
System.out.println("Lab: " + labEnvVar)
singularityDir = "/ref/$LAB/data/singularity_images_nextflow" // If $LAB is set, use that
} else {
def id = "id -nG".execute().text
def labAutodetect = id.split(" ").last()
System.out.println("Lab: " + labAutodetect)
singularityDir = "/ref/" + labAutodetect + "/data/singularity_images_nextflow"
}

params {
config_profile_description = """
Expand Down Expand Up @@ -29,15 +39,3 @@ process {
beforeScript = "exec \$( spack load --sh singularity )"
executor = "slurm"
}

def set_singularity_path() {
def labEnvVar = System.getenv("LAB")
if (labEnvVar) {
System.out.println("Lab: " + labEnvVar)
return "/ref/$LAB/data/singularity_images_nextflow" // If $LAB is set, use that
}
def id = "id -nG".execute().text
def labAutodetect = id.split(" ").last()
System.out.println("Lab: " + labAutodetect)
return "/ref/" + labAutodetect + "/data/singularity_images_nextflow"
}

0 comments on commit c785430

Please sign in to comment.