comparison 0.5.0/conf/modules.config @ 1:365849f031fd

"planemo upload"
author kkonganti
date Mon, 05 Jun 2023 18:48:51 -0400
parents
children
comparison
equal deleted inserted replaced
0:a4b1ee4b68b1 1:365849f031fd
1 process {
2 publishDir = [
3 path: {
4 "${task.process.tokenize(':')[-1].toLowerCase()}" == "multiqc" ?
5 "${params.output}${params.fs}${params.pipeline.toLowerCase()}-${task.process.tokenize(':')[-1].toLowerCase()}" :
6 "${params.output}${params.fs}${task.process.tokenize(':')[-1].toLowerCase()}"
7 },
8 mode: params.publish_dir_mode,
9 overwrite: params.publish_dir_overwrite,
10 saveAs: { filename -> filename =~ /^versions\.yml|genome_paths\.txt|[bettercallsalbcs].+?_mqc.*/ ? null : filename }
11 ]
12
13 errorStrategy = {
14 ![0].contains(task.exitStatus) ? dynamic_retry(task.attempt, 10) : 'finish'
15 }
16
17 maxRetries = 80
18
19 withLabel: 'process_femto' {
20 cpus = 2
21 }
22
23 withLabel: 'process_pico' {
24 cpus = min_cpus(2)
25 }
26
27 withLabel: 'process_nano' {
28 cpus = min_cpus(4)
29 }
30
31 withLabel: 'process_micro' {
32 cpus = min_cpus(8)
33 }
34
35 withLabel: 'process_only_mem_low' {
36 cpus = 2
37 }
38
39 withLabel: 'process_only_mem_medium' {
40 cpus = 2
41 }
42
43 withLabel: 'process_only_mem_high' {
44 cpus = 2
45 }
46
47 withLabel: 'process_low' {
48 cpus = min_cpus(8)
49 }
50
51 withLabel: 'process_medium' {
52 cpus = min_cpus(8)
53 }
54
55 withLabel: 'process_high' {
56 cpus = min_cpus(8)
57 }
58
59 withLabel: 'process_higher' {
60 cpus = min_cpus(8)
61 }
62
63 withLabel: 'process_gigantic' {
64 cpus = min_cpus(8)
65 }
66 }
67
68 if ( ( ( params.input || params.metadata ) && params.pipeline ) ||
69 ( params.pipeline.toString().equalsIgnoreCase('bettercallsal_db') && params.output) ) {
70 try {
71 includeConfig "${params.workflowsconf}${params.fs}process${params.fs}${params.pipeline}.process.config"
72 } catch (Exception e) {
73 System.err.println('-'.multiply(params.linewidth) + "\n" +
74 "\033[0;31m${params.cfsanpipename} - ERROR\033[0m\n" +
75 '-'.multiply(params.linewidth) + "\n" + "\033[0;31mCould not load " +
76 "default pipeline's process configuration. Please provide a pipeline \n" +
77 "name using the --pipeline option.\n\033[0m" + '-'.multiply(params.linewidth) + "\n")
78 System.exit(1)
79 }
80 }
81
82 // Function will return after sleeping for some time.
83 // Sleep time increases exponentially by task attempt.
84 def dynamic_retry(task_retry_num, factor_by) {
85 // sleep(Math.pow(2, task_retry_num.toInteger()) * factor_by.toInteger() as long)
86 sleep(Math.pow(1.27, task_retry_num.toInteger()) as long)
87 return 'retry'
88 }
89
90 // Function that will adjust the minimum number of CPU
91 // cores depending as requested by the user.
92 def min_cpus(cores) {
93 return Math.min(cores as int, "${params.max_cpus}" as int)
94 }