-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextflow.config
120 lines (104 loc) · 2.96 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
// Global default params, used in configs
params {
// optional file paths [optional input](https://nextflow-io.github.io/patterns/optional-input/)
atac_file = "$projectDir/assets/NO_ATAC_FILE"
broad_fine_mapping = "$projectDir/assets/NO_FILE" // TODO: simplify, required if ATAC mode
// required parameters
studies = null // required input: "/path/to/your/studies.tsv"
tss_file = null // required input: "/path/to/your/tss_cell_type_exp.txt.gz"
cell_types = null // required input: "/path/to/your/tss_cell_type_exp.txt"
// other default values
gene_chunk_size = 100
vcf_files_1000G = "/nfs/cellgeni/pipeline-files/1000G/20190312/European/" // looking for `chr*.maf0.001.vcf.gz` in this folder
}
// Configuring LSF job submission parameters for each process
executor {
name = 'lsf'
perJobMemLimit = true
}
singularity {
enabled = true
autoMounts = true
cacheDir = '/nfs/cellgeni/singularity/images/'
runOptions = '-B /lustre,/nfs --nv'
}
process {
maxRetries = 3
errorStrategy = {
switch (task.exitStatus) {
case 130: // out of memory
retries = 3; break
default:
return 'terminate'
}
return (task.attempt <= retries) ? 'retry' : 'ignore'
}
beforeScript = "echo Queue: \$LSB_QUEUE"
withName: split_studies {
cpus = 1
memory = { 10.MB * task.attempt }
queue = "small"
maxForks = 10
}
withName: fetch_irods {
cpus = 4
memory = { 4.GB * task.attempt }
queue = "transfer"
maxForks = 5
}
withName: run_LDSC {
cpus = 1
errorStrategy = {
switch (task.exitStatus) {
case 130: // out of memory
retries = 3; break
case 140: // runtime limit
retries = 1; break
default:
return 'terminate'
}
memory = { 2.GB * task.attempt }
queue = { task.attempt > 1 && task.exitStatus == 140 ? 'week' : 'normal' }
maxForks = 1000
container = '/nfs/cellgeni/singularity/images/fgwas_v0-2.sif'
}
withName: collect_LDSC {
cpus = 1
memory = { 5.GB * task.attempt }
queue = "normal"
maxForks = 1000
}
withName: run_HM {
cpus = 1
memory = { 5.GB * task.attempt }
queue = "normal"
maxForks = 1000
container = '/nfs/cellgeni/singularity/images/fgwas_v0-2.sif'
}
withName: plot_forest {
cpus = 1
memory = { 250.MB * task.attempt }
queue = "small"
maxForks = 1000
container = '/nfs/cellgeni/singularity/images/fgwas_v0-2.sif'
}
}
// Capture exit codes from upstream processes when piping
process.shell = ['/bin/bash', '-euo', 'pipefail']
// Capturing Nextflow log files into a reports directory
timeline {
enabled = true
overwrite = true
file = "fgwas-reports/timeline.html"
}
report {
enabled = true
overwrite = true
fields = 'task_id,process,status,queue,exit,status,attempt,duration,realtime'
file = "fgwas-reports/report.html"
}
trace {
enabled = true
overwrite = true
file = "fgwas-reports/trace.txt"
}