Diff of /nextflow.config [000000] .. [13a70a]

Switch to unified view

a b/nextflow.config
1
/*
2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
    nf-core/deepmodeloptim Nextflow config file
4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
    Default config options for all compute environments
6
----------------------------------------------------------------------------------------
7
*/
8
9
// Global default params, used in configs
10
params {
11
12
    // Input options
13
    data                    = null // TODO either change one of the params above by input or create a samplesheet containing the info of them
14
    model                   = null                   // the model file in python, the model that will be tested by this pipeline
15
    data_config             = null                   // the config file that specifies all the parameters relative to the data manipulation
16
    model_config            = null                   // the config file with all the hyperparameter directives (choiches) and all ray tune specs
17
    preprocessing_config    = null                   // the config file that specifies the data preprocessing steps
18
19
    // Optional inputs
20
    initial_weights         = null                   // the initial weights of the model. These files can be used to start the training instead of random initialization. One can provide several files, each of them will be used for a different run.
21
22
    // Input options for data preprocessing protocols
23
    genome                  = null
24
    igenomes_base           = 's3://ngi-igenomes/igenomes/'
25
    bed_peak_size           = 300                   // the size of the region around the peak that will be centered
26
27
    // Tuning options
28
    tune_trials_range       = null                  // the number of trials for the tuning step e.g. "10,20,5" will do 10, 15 and 20 trials
29
    tune_replicates         = 1                     // the number of replicates for each trial #
30
    prediction_data         = null                  // the file with the data to predict for evaluation purposes
31
32
    // Output options
33
    outdir                  = "./results/"          // the outdir has to be the one the user specify _ the unique name of the run _ the time so that multiple runs will not overlap
34
    publish_dir_mode        = "copy"
35
    save_data               = false                 // save transformed data or not
36
37
    // Computational resources
38
    max_gpus                = 1                      // requesting the gpus for the tuning steps.
39
    // TODO this should not be in the nextflow config but in each config
40
    // max_cpus                = 12                      // this flasg and the following are for regulating resources, profiles can overwrite these.
41
    // max_memory              = 32.GB
42
    // max_time                = "72.h"
43
44
    // Error options
45
    max_retries             = 0
46
    err_start               = 'finish'
47
48
    // Optional flags
49
    check_model             = true                   // flag to tell whether to check or not if the model can be tuned and trained. It does one call of the batch function, (predicting), of the model importing and using everything needed for that. Default run such a check.
50
    check_model_num_samples = null                   // optional flag to do a more extensive check during check_model. This will override user given num_sample value for the tune run. This will give the user control on how extensive it wants the check to be.
51
    shuffle                 = true                   // flag to tell wether to shuffle or not the data and run a train on it. Sanity check always run on default. (If the way we think at shuffle change maybe is better to remove this flag and make it into a parameter of the user given json for noise nad split)
52
    debug_mode              = false                  // flag used to switch to debug mode for the pipeline.
53
54
    // Development stage options
55
    // please change them in dev.config
56
    container_dev           = null
57
58
    // General
59
    help                    = false
60
    validate_params         = true                     // tells wether or not to validate input values using nf-schema.
61
62
63
    // Boilerplate options
64
    outdir                       = null
65
    publish_dir_mode             = 'copy'
66
    email                        = null
67
    email_on_fail                = null
68
    plaintext_email              = false
69
    monochrome_logs              = false
70
    hook_url                     = null
71
    help                         = false
72
    help_full                    = false
73
    show_hidden                  = false
74
    version                      = false
75
    pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/'
76
    trace_report_suffix          = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')// Config options
77
    config_profile_name        = null
78
    config_profile_description = null
79
80
    custom_config_version      = 'master'
81
    custom_config_base         = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
82
    config_profile_contact     = null
83
    config_profile_url         = null
84
85
    // Schema validation default options
86
    validate_params            = true
87
}
88
89
// Load base.config by default for all pipelines
90
includeConfig 'conf/base.config'
91
92
profiles {
93
    debug {
94
        dumpHashes              = true
95
        process.beforeScript    = 'echo $HOSTNAME'
96
        cleanup                 = false
97
        nextflow.enable.configProcessNamesValidation = true
98
    }
99
    conda {
100
        conda.enabled           = true
101
        docker.enabled          = false
102
        singularity.enabled     = false
103
        podman.enabled          = false
104
        shifter.enabled         = false
105
        charliecloud.enabled    = false
106
        conda.channels          = ['conda-forge', 'bioconda']
107
        apptainer.enabled       = false
108
    }
109
    mamba {
110
        conda.enabled           = true
111
        conda.useMamba          = true
112
        docker.enabled          = false
113
        singularity.enabled     = false
114
        podman.enabled          = false
115
        shifter.enabled         = false
116
        charliecloud.enabled    = false
117
        apptainer.enabled       = false
118
    }
119
    docker {
120
        docker.enabled          = true
121
        conda.enabled           = false
122
        singularity.enabled     = false
123
        podman.enabled          = false
124
        shifter.enabled         = false
125
        charliecloud.enabled    = false
126
        apptainer.enabled       = false
127
        docker.runOptions       = '-u $(id -u):$(id -g)'
128
    }
129
    arm {
130
        docker.runOptions       = '-u $(id -u):$(id -g) --platform=linux/amd64'
131
    }
132
    singularity {
133
        singularity.enabled     = true
134
        singularity.autoMounts  = true
135
        conda.enabled           = false
136
        docker.enabled          = false
137
        podman.enabled          = false
138
        shifter.enabled         = false
139
        charliecloud.enabled    = false
140
        apptainer.enabled       = false
141
    }
142
    podman {
143
        podman.enabled          = true
144
        conda.enabled           = false
145
        docker.enabled          = false
146
        singularity.enabled     = false
147
        shifter.enabled         = false
148
        charliecloud.enabled    = false
149
        apptainer.enabled       = false
150
    }
151
    shifter {
152
        shifter.enabled         = true
153
        conda.enabled           = false
154
        docker.enabled          = false
155
        singularity.enabled     = false
156
        podman.enabled          = false
157
        charliecloud.enabled    = false
158
        apptainer.enabled       = false
159
    }
160
    charliecloud {
161
        charliecloud.enabled    = true
162
        conda.enabled           = false
163
        docker.enabled          = false
164
        singularity.enabled     = false
165
        podman.enabled          = false
166
        shifter.enabled         = false
167
        apptainer.enabled       = false
168
    }
169
    apptainer {
170
        apptainer.enabled       = true
171
        apptainer.autoMounts    = true
172
        conda.enabled           = false
173
        docker.enabled          = false
174
        singularity.enabled     = false
175
        podman.enabled          = false
176
        shifter.enabled         = false
177
        charliecloud.enabled    = false
178
    }
179
    wave {
180
        apptainer.ociAutoPull   = true
181
        singularity.ociAutoPull = true
182
        wave.enabled            = true
183
        wave.freeze             = true
184
        wave.strategy           = 'conda,container'
185
    }
186
    gitpod {
187
        executor.name           = 'local'
188
        executor.cpus           = 4
189
        executor.memory         = 8.GB
190
        process {
191
            resourceLimits = [
192
                memory: 8.GB,
193
                cpus  : 4,
194
                time  : 1.h
195
            ]
196
        }
197
    }
198
    test         { includeConfig "conf/test.config"       }
199
    test_stub    { includeConfig "conf/test_stub.config"  }
200
    test_ibis    { includeConfig "conf/test_ibis.config"  }
201
    test_ibis_with_preprocessing { includeConfig "conf/test_ibis_with_preprocessing.config" }
202
    test_noise_eval { includeConfig "conf/test_noise_eval.config" }
203
    local        { includeConfig "conf/local.config"      }
204
    dev          { includeConfig "conf/dev.config"        }
205
}
206
207
// Load nf-core custom profiles from different Institutions
208
includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null"
209
210
// Load igenomes.config if required
211
if (params.genome == null) {
212
    params.genomes = [:]
213
} else {
214
    includeConfig 'conf/igenomes.config'
215
}
216
217
// Load nf-core/deepmodeloptim custom profiles from different institutions.
218
// TODO This line can be uncommented once you move the pipeline to nf-core. A file deepmodeloptim.config will be automatically created at the nf-core/configs repo. This is to allow having a pipeline specific config.
219
// includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/deepmodeloptim.config" : "/dev/null"
220
221
// Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile
222
// Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled
223
// Set to your registry if you have a mirror of containers
224
apptainer.registry    = 'quay.io'
225
docker.registry       = 'quay.io'
226
podman.registry       = 'quay.io'
227
singularity.registry  = 'quay.io'
228
charliecloud.registry = 'quay.io'
229
230
231
232
// Export these variables to prevent local Python/R libraries from conflicting with those in the container
233
// The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container.
234
// See https://apeltzer.github.io/post/03-julia-lang-nextflow/ for details on that. Once we have a common agreement on where to keep Julia packages, this is adjustable.
235
236
env {
237
    PYTHONNOUSERSITE = 1
238
    R_PROFILE_USER   = "/.Rprofile"
239
    R_ENVIRON_USER   = "/.Renviron"
240
    JULIA_DEPOT_PATH = "/usr/local/share/julia"
241
}
242
243
// Set bash options
244
process.shell = [
245
    "bash",
246
    "-C",         // No clobber - prevent output redirection from overwriting files.
247
    "-e",         // Exit if a tool returns a non-zero status/exit code
248
    "-u",         // Treat unset variables and parameters as an error
249
    "-o",         // Returns the status of the last command to exit..
250
    "pipefail"    //   ..with a non-zero status or zero if all successfully execute
251
]
252
253
// Disable process selector warnings by default. Use debug profile to enable warnings.
254
nextflow.enable.configProcessNamesValidation = false
255
256
timeline {
257
    enabled = true
258
    file    = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html"
259
}
260
report {
261
    enabled = true
262
    file    = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html"
263
}
264
trace {
265
    enabled = true
266
    file    = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt"
267
}
268
dag {
269
    enabled = true
270
    file    = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html"
271
}
272
273
manifest {
274
    name            = 'nf-core/deepmodeloptim'
275
    author          = """Mathys Grapotte""" // The author field is deprecated from Nextflow version 24.10.0, use contributors instead
276
    contributors    = [
277
        // TODO nf-core: Update the field with the details of the contributors to your pipeline. New with Nextflow version 24.10.0
278
        [
279
            name: 'Mathys Grapotte',
280
            affiliation: '',
281
            email: '',
282
            github: '',
283
            contribution: [], // List of contribution types ('author', 'maintainer' or 'contributor')
284
            orcid: ''
285
        ],
286
    ]
287
    homePage        = 'https://github.com/nf-core/deepmodeloptim'
288
    description     = """nf-core/deepmodeloptim is an end-to-end pipeline designed to facilitate the testing and development of deep learning models for genomics."""
289
    mainScript      = 'main.nf'
290
    defaultBranch   = 'master'
291
    nextflowVersion = '!>=24.04.2'
292
    version         = '1.0.0dev'
293
    doi             = ''
294
}
295
296
// Nextflow plugins
297
plugins {
298
    id 'nf-schema@2.3.0' // Validation of pipeline parameters and creation of an input channel from a sample sheet
299
}
300
301
validation {
302
    defaultIgnoreParams = ["genomes", "data", "data_config", "model_config"]
303
    monochromeLogs = params.monochrome_logs
304
    help {
305
        enabled = true
306
        command = "nextflow run nf-core/deepmodeloptim -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>"
307
        fullParameter = "help_full"
308
        showHiddenParameter = "show_hidden"
309
        beforeText = """
310
-\033[2m----------------------------------------------------\033[0m-
311
                                        \033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m
312
\033[0;34m        ___     __   __   __   ___     \033[0;32m/,-._.--~\'\033[0m
313
\033[0;34m  |\\ | |__  __ /  ` /  \\ |__) |__         \033[0;33m}  {\033[0m
314
\033[0;34m  | \\| |       \\__, \\__/ |  \\ |___     \033[0;32m\\`-._,-`-,\033[0m
315
                                        \033[0;32m`._,._,\'\033[0m
316
\033[0;35m  nf-core/deepmodeloptim ${manifest.version}\033[0m
317
-\033[2m----------------------------------------------------\033[0m-
318
"""
319
        afterText = """${manifest.doi ? "\n* The pipeline\n" : ""}${manifest.doi.tokenize(",").collect { "    https://doi.org/${it.trim().replace('https://doi.org/','')}"}.join("\n")}${manifest.doi ? "\n" : ""}
320
* The nf-core framework
321
    https://doi.org/10.1038/s41587-020-0439-x
322
323
* Software dependencies
324
    https://github.com/nf-core/deepmodeloptim/blob/master/CITATIONS.md
325
"""
326
    }
327
    summary {
328
        beforeText = validation.help.beforeText
329
        afterText = validation.help.afterText
330
    }
331
}
332
333
// Load modules.config for DSL2 module specific options
334
includeConfig 'conf/modules.config'