-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsarek_gcp_example.config
126 lines (112 loc) · 3.47 KB
/
sarek_gcp_example.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
profiles {
gls {
process.executor = 'google-lifesciences'
workDir = 'gs://xxxx/run_name/workdir/'
google.location = 'europe-west2'
google.region = 'europe-west2'
google.project = 'xxxx-pipelines-dev'
google.lifeSciences.usePrivateAddress = 'true'
process.publishDir = 'gs://xxx/run_name/resultsdir/'
}
}
trace {
enabled = true
file = "pipeline_execution_trace.txt"
fields = 'task_id,hash,native_id,process,tag,name,status,exit,module,container,cpus,time,disk,memory,attempt,submit,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem,peak_rss,peak_vmem,rchar,syscr,syscw,read_bytes,write_bytes'
}
tower {
accessToken = 'xxxxxx'
enabled = true
}
params {
max_memory = 100.GB
max_time = 240.h
singleCPUMem = 6.5.GB
}
process {
// default machine type
machineType = 'n1-standard-4'
withLabel:cpus_1 {
machineType = 'n1-standard-1'
cpus = {check_resource(1)}
}
withLabel:cpus_2 {
machineType = 'n1-standard-2'
cpus = {check_resource(2)}
}
withLabel:cpus_4 {
machineType = 'n1-standard-4'
cpus = {check_resource(4)}
}
withLabel:cpus_8 {
machineType = 'n1-standard-8'
cpus = {check_resource(8)}
}
withLabel:cpus_16 {
machineType = 'n1-standard-16'
cpus = {check_resource(16)}
}
withLabel:cpus_max {
machineType = 'n1-standard-16'
cpus = {params.max_cpus}
}
withLabel:memory_singleCPU_2_task {
machineType = 'n1-highmem-4'
memory = {check_resource(16.GB * task.attempt)}
}
withLabel:memory_singleCPU_task_sq {
machineType = 'n1-highmem-4'
memory = {check_resource(8.GB * task.attempt * task.attempt)}
}
withLabel:memory_max {
machineType = 'n1-highmem-16'
memory = {params.max_memory}
}
withName:MapReads {
machineType = 'custom-20-81920'
memory = {check_resource(60.GB * task.attempt)}
time = {check_resource(48.h * task.attempt)}
disk = '1000 GB' // larger disk here for improved I/O
}
withName:FastQCFQ {
machineType = 'n1-standard-4'
}
withName:BamQC {
machineType = 'n1-highmem-16'
}
withName:MarkDuplicates {
machineType = 'n1-highmem-2'
cpus = {check_resource(2)}
disk = '2048 GB' // larger disk here for improved I/O
}
withName:BaseRecalibrator {
machineType = 'n1-highmem-2'
}
withName:ApplyBQSR {
machineType = 'n1-highmem-4'
}
withName:GenotypeGVCFs {
machineType = 'n1-standard-4'
disk = '1000 GB' // larger disk here for improved I/O
}
withName:HaplotypeCaller {
machineType = 'n1-standard-4'
disk = '1000 GB' // larger disk here for improved I/O
}
}
// THIS SHOULD BE DEFINED IN BASIC CONFIG BUT IT NEEDS IT HERE ANYWAY
// Return the minimum between requirements and a maximum limit to ensure that resource requirements don't go over
def check_resource(obj) {
try {
if (obj.getClass() == nextflow.util.MemoryUnit && obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
return params.max_memory as nextflow.util.MemoryUnit
else if (obj.getClass() == nextflow.util.Duration && obj.compareTo(params.max_time as nextflow.util.Duration) == 1)
return params.max_time as nextflow.util.Duration
else if (obj.getClass() == java.lang.Integer)
return Math.min(obj, params.max_cpus as int)
else
return obj
} catch (all) {
println " ### ERROR ### Max params max_memory:'${params.max_memory}', max_time:'${params.max_time}' or max_cpus:'${params.max_cpus}' is not valid! Using default value: $obj"
}
}