comparison 0.4.2/conf/modules.config @ 130:04f6ac8ca13c

planemo upload
author kkonganti
date Wed, 03 Jul 2024 15:16:39 -0400
parents
children cbb06f201be5
comparison
equal deleted inserted replaced
129:1bb0dacefa6d 130:04f6ac8ca13c
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.equals('versions.yml') ? null : filename }
11 ]
12
13 errorStrategy = {
14 ![0].contains(task.exitStatus) ? dynamic_retry(task.attempt, 10) : 'finish'
15 }
16
17 maxRetries = 5
18
19 withLabel: 'process_femto' {
20 cpus = 2
21 }
22
23 withLabel: 'process_pico' {
24 cpus = 2
25 }
26
27 withLabel: 'process_nano' {
28 cpus = 4
29 }
30
31 withLabel: 'process_micro' {
32 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 = 8
49 }
50
51 withLabel: 'process_medium' {
52 cpus = 8
53 }
54
55 withLabel: 'process_high' {
56 cpus = 8
57 }
58
59 withLabel: 'process_higher' {
60 cpus = 8
61 }
62
63 withLabel: 'process_gigantic' {
64 cpus = 8
65 }
66 }
67
68 if ( (params.input || params.metadata ) && params.pipeline ) {
69 try {
70 includeConfig "${params.workflowsconf}${params.fs}process${params.fs}${params.pipeline}.process.config"
71 } catch (Exception e) {
72 System.err.println('-'.multiply(params.linewidth) + "\n" +
73 "\033[0;31m${params.cfsanpipename} - ERROR\033[0m\n" +
74 '-'.multiply(params.linewidth) + "\n" + "\033[0;31mCould not load " +
75 "default pipeline's process configuration. Please provide a pipeline \n" +
76 "name using the --pipeline option.\n\033[0m" + '-'.multiply(params.linewidth) + "\n")
77 System.exit(1)
78 }
79 }
80
81 // Function will return after sleeping for some time.
82 // Sleep time increases exponentially by task attempt.
83 def dynamic_retry(task_retry_num, factor_by) {
84 // sleep(Math.pow(2, task_retry_num.toInteger()) * factor_by.toInteger() as long)
85 sleep(Math.pow(1.27, task_retry_num.toInteger()) as long)
86 return 'retry'
87 }