diff --git a/nextflow.config b/nextflow.config index d12b078..c31d793 100644 --- a/nextflow.config +++ b/nextflow.config @@ -108,29 +108,29 @@ params.manifest = manifest def check_max(obj, type) { if (type == 'memory') { try { - if (obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1) - return params.max_memory as nextflow.util.MemoryUnit + if (obj.compareTo(params.memory as nextflow.util.MemoryUnit) == 1) + return params.memory as nextflow.util.MemoryUnit else return obj } catch (all) { - println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj" + println " ### ERROR ### Max memory '${params.memory}' is not valid! Using default value: $obj" return obj } } else if (type == 'time') { try { - if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1) - return params.max_time as nextflow.util.Duration + if (obj.compareTo(params.time as nextflow.util.Duration) == 1) + return params.time as nextflow.util.Duration else return obj } catch (all) { - println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj" + println " ### ERROR ### Max time '${params.time}' is not valid! Using default value: $obj" return obj } } else if (type == 'cpus') { try { - return Math.min( obj, params.max_cpus as int ) + return Math.min( obj, params.cpus as int ) } catch (all) { - println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj" + println " ### ERROR ### Max cpus '${params.cpus}' is not valid! Using default value: $obj" return obj } }