-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
202 lines (184 loc) · 5.59 KB
/
nextflow.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
manifest {
homePage = 'https://github.com/plantinformatics/pretzel-input-generator/'
description = 'Pipeline for generating data to be displayed in pretzel'
}
// Global default params, used in configs
params {
// Pipeline Options
outdir = "./results"
publishmode = "copy"
//NUMBER OF LINES TO BE PROOCESSED FOR TRIAL PURPOSES, DEFAULT null WILL PROCESS WHOLE DATASETS
subset = -1
//Generated dataset JSON files have 'public' field set to true by default, use --makePrivate or --make-private to set public to false
makePrivate = false
//PROTEIN SEQUENCE ALIGNMENT THRESHOLDS
minIdentity = 0.5
minCoverage = 0.6
//POST PROTEIN ALIGNMENT FILTERING THRESHOLDS FOR GENERATING ALIASES
minIdentityFilter = 0.7
minCoverageFilter = 0.8
//Empty params - may be used depending on execution profile or runtime use of -params-file json/yaml
sequencesToPlace = []
assembly = []
singularitydir = "./singularity-images"
}
process {
cache = 'lenient'
}
//Compute requirements
includeConfig 'conf/requirements.config'
profiles {
//INPUT AND LOGIC
BUSCOs { //BUSCO-based pipeline
includeConfig 'conf/dna_zoo.config'
process {
withLabel: BUSCO {
container = 'rsuchecki/busco:3.0.2_blast2.8.1'
}
}
}
EP { //EP+MMSeqs2 pipeline
includeConfig 'conf/ensembl-plants.config'
}
WHEATS11 { //EP+MMSeqs2 pipeline
includeConfig 'conf/11wheats.config'
}
TRITICEAE { //USe with EP+MMSeqs2 pipeline
// includeConfig 'conf/ensembl-plants.config'
// includeConfig 'conf/ensembl-plants-data.config'
includeConfig 'conf/triticeae.config'
}
YEAST {
includeConfig 'conf/ensembl-yeast.config'
}
MICROSPORIDIA {
includeConfig 'conf/microsporidia.config'
}
test {
includeConfig 'conf/test-data.config'
process {
errorStrategy = 'terminate'
maxRetries = 0
}
// docker {
// runOptions = "-u \$(id -u):\$(id -g)"
// }
}
//COMPUTE
standard {
process.executor = 'local'
}
docker {
includeConfig 'conf/containers.config'
docker {
enabled = true
fixOwnership = true
//runOptions = '-u $(id -u):$(id -g)'
// runOptions = '-u \$(id -u):\$(id -g)'
// runOptions = '-u root:root'
}
// process {
// withLabel: groovy {
// containerOptions = '--volume "$PWD":/home/groovy/.groovy' //otherwise grabbing grapes may fail with read-only filesystem error
// }
// }
}
CI {
docker.runOptions = '-u root:root' //apparently required for GH actions but only causes problems with process using bin/paf2pretzel.groovy due to Ivy limitations
process {
errorStrategy = 'terminate'
maxRetries = 0
}
includeConfig 'conf/microsporidia.config'
}
modules {
includeConfig 'conf/modules.config'
}
awsbatch {
aws.region = 'ap-southeast-2'
aws.batch.cliPath = '/home/ec2-user/miniconda/bin/aws'
includeConfig 'conf/containers.config'
process {
executor = 'awsbatch'
queue = 'flowq'
withLabel: '.*groovy.*' {
container = 'rsuchecki/groovy-conda-samtools:0.1' //currently not able to find aws cli when using container based on official groovy - likely requires user/workdir/entry reconf
}
}
}
slurm {
process.executor = 'slurm'
scratch = true
withLabel: 'rscript|rrender' {
executor = 'local'
}
}
singularity {
includeConfig 'conf/containers.config'
singularity {
enabled = true
autoMounts = true
cacheDir = "${params.singularitydir}" //when distibuting the pipeline probably should point under $workDir
}
process {
withLabel: groovy {
containerOptions = '-B "$PWD":/home/groovy/.groovy' //otherwise grabbing grapes may fail with read-only filesystem error
}
}
}
}
includeConfig 'conf/publish.config'
//GENERATE REPORT https://www.nextflow.io/docs/latest/tracing.html#trace-report
report {
enabled = true
file = "${params.outdir}/flowinfo/report.html"
}
//GENERATE TIMELINE https://www.nextflow.io/docs/latest/tracing.html#timeline-report
timeline {
enabled = true
timeline.file = "${params.outdir}/flowinfo/timeline.html"
}
//GENERATE PIPELINE TRACE https://www.nextflow.io/docs/latest/tracing.html#trace-report
trace {
enabled = true
file = "${params.outdir}/flowinfo/trace.txt"
}
//GENERATE GRAPH REPRESENTATION OF THE PIPELINE FLOW
dag {
enabled = true
file = "${params.outdir}/flowinfo/dag.png"
}
//FROM: https://github.com/nf-core/rnaseq/blob/master/nextflow.config
// Function to ensure that resource requirements don't go beyond a maximum limit
// Function to ensure that resource requirements don't go beyond
// a maximum limit
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
else
return obj
} catch (all) {
println " ### ERROR ### Max memory '${params.max_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
else
return obj
} catch (all) {
println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj"
return obj
}
} else if(type == 'cpus'){
try {
return Math.min( obj, params.max_cpus as int )
} catch (all) {
println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
return obj
}
}
}