1
0
Fork 0
mirror of https://github.com/MillironX/nf-configs.git synced 2024-11-22 00:26:03 +00:00

UPPMAX profile - minor tweaks

* Only one params block instead of two
* Return only one 'grep' result and don't pipe to 'head'
* Use .startsWith instead of regex matching
* Print detected cluster name in the profile description
This commit is contained in:
Phil Ewels 2021-11-02 09:15:01 +01:00
parent 0600ac1293
commit c7dc9aa892

View file

@ -1,11 +1,17 @@
// Profile config names for nf-core/configs // UPPMAX Config Profile
params { params {
config_profile_description = 'Swedish UPPMAX cluster profile provided by nf-core/configs.' config_profile_description = 'UPPMAX (Rackham) cluster profile provided by nf-core/configs.'
config_profile_contact = 'Phil Ewels (@ewels)' config_profile_contact = 'Phil Ewels (@ewels)'
config_profile_url = 'https://www.uppmax.uu.se/' config_profile_url = 'https://www.uppmax.uu.se/'
project = null project = null
clusterOptions = null clusterOptions = null
schema_ignore_params = "genomes,input_paths,cluster-options,clusterOptions,project" schema_ignore_params = "genomes,input_paths,cluster-options,clusterOptions,project"
save_reference = true
max_memory = 500.GB
max_cpus = 16
max_time = 240.h
// illumina iGenomes reference file paths on UPPMAX
igenomes_base = '/sw/data/igenomes/'
} }
singularity { singularity {
@ -15,7 +21,7 @@ singularity {
def hostname = "r1" def hostname = "r1"
try { try {
hostname = "sinfo --local -N -h | grep -F -v CLUSTER: | head -1 | cut -f1 -d' ' ".execute().text.trim() hostname = "sinfo --local -N -h | grep -m 1 -F -v CLUSTER: | cut -f1 -d' ' ".execute().text.trim()
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
System.err.println("WARNING: Could not run sinfo to determine current cluster, defaulting to rackham") System.err.println("WARNING: Could not run sinfo to determine current cluster, defaulting to rackham")
} }
@ -24,7 +30,7 @@ try {
def clusterOptionsCreator = { m -> def clusterOptionsCreator = { m ->
String base = "-A $params.project ${params.clusterOptions ?: ''}" String base = "-A $params.project ${params.clusterOptions ?: ''}"
// Do not use -p node on irma or if a thin node/core is enough // Do not use -p node on irma or if a thin node/core is enough
if (m <= 125.GB || hostname ==~ "i.*") { if (m <= 125.GB || hostname.startsWith("i")) {
return base return base
} }
@ -34,7 +40,7 @@ def clusterOptionsCreator = { m ->
// Use mem1TB for remaining cases on rackham (no 512 Gbyte nodes) // Use mem1TB for remaining cases on rackham (no 512 Gbyte nodes)
if (hostname ==~ "r.*") { if (hostname.startsWith("r")) {
return base + " -p node -C mem1TB " return base + " -p node -C mem1TB "
} }
@ -54,26 +60,18 @@ process {
scratch = '$SNIC_TMP' scratch = '$SNIC_TMP'
} }
params { if (hostname.startsWith("s")) {
save_reference = true
max_memory = 500.GB
max_cpus = 16
max_time = 240.h
// illumina iGenomes reference file paths on UPPMAX
igenomes_base = '/sw/data/igenomes/'
}
if (hostname ==~ "s[0-9][0-9]*") {
params.max_time = 700.h params.max_time = 700.h
params.max_memory = 3880.GB params.max_memory = 3880.GB
params.config_profile_description = 'UPPMAX (Snowy) cluster profile provided by nf-core/configs.'
} }
if (hostname ==~ "i.*") { if (hostname.startsWith("i")) {
params.max_memory = 250.GB params.max_memory = 250.GB
params.config_profile_description = 'UPPMAX (Irma) cluster profile provided by nf-core/configs.'
} }
if (hostname ==~ "r.*") { if (hostname.startsWith("r")) {
params.max_cpus = 20 params.max_cpus = 20
params.max_memory = 970.GB params.max_memory = 970.GB
} }