-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextflow.config
More file actions
executable file
·173 lines (159 loc) · 5.72 KB
/
Copy pathnextflow.config
File metadata and controls
executable file
·173 lines (159 loc) · 5.72 KB
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
// Nextflow flags
nextflow.enable.moduleBinaries = true
// Unscoped options
cleanup = true
workDir = "nf-work"
// Global default params, used in configs
params {
// Process-specific parameters
output_dir = "results"
publish_mode = 'copy'
// Required parameters
sample_table = null
cells = "" // Only for version 0.2 when .h5 file or .mtx file is provided
droplets = "" // Only for version 0.2 when .h5 file or .mtx file is provided
// Optional parameters
help = false
version = "0.3"
on_irods = false
qc_mode = 3
estimator = "mckp"
exclude_features = ""
epochs = ""
fpr = ""
lr = ""
min_umi = ""
force_empty_umi_prior = ""
mapper_preset = false
starsolo_mapper = "GeneFull"
ignore_extensions = "bam,cram,fastq,fq,fastq.gz,fq.gz,fastq.bz2,fq.bz2,fastq.xz,fq.xz,fastq.lz4,fq.lz4,mate1.bz2,mate2.bz2"
}
// Singularity environment parameters
singularity {
enabled = true
autoMounts = true
cacheDir = '/nfs/cellgeni/singularity/images/'
runOptions = '-B /lustre,/nfs'
pullTimeout = '100m'
}
// Configuring LSF job submission parameters for each process
executor {
name = 'lsf'
perJobMemLimit = true
}
process {
errorStrategy = 'retry'
maxRetries = 5
withName: IRODS_LOADCATALOG {
ext.ignore_extensions = params.ignore_extensions
ext.args = '-f -v -K -X restartfile.txt --retries 5'
cpus = { 1 * task.attempt }
memory = { 2.GB * task.attempt }
array = 20
queue = 'transfer'
maxForks = 5
publishDir = [
path: { "${params.output_dir}/raw/" },
mode: "${params.publish_mode}",
]
}
withName: CELLBENDER_REMOVEBACKGROUND {
ext.version = params.version.toString()
ext.starsolo_mapper = params.starsolo_mapper
ext.mapper_preset = params.version.toString() == "0.3" ? params.mapper_preset : params.version.toString() == "0.2" && !(params.cells && params.droplets)
ext.expected_cells = params.cells
ext.total_droplets = params.droplets
ext.umi_threshold = params.min_umi
ext.args = {
[
params.exclude_features == "All" && task.ext.version == "0.2" ? "--exclude-antibody-capture" : '',
params.exclude_features && task.ext.version == "0.3" ? "--exclude-feature-type " + params.exclude_features.split(',').collect { "\"${it.trim()}\"" }.join(' '): '',
params.estimator && task.ext.version == "0.3" ? "--estimator ${params.estimator}" : '',
params.force_empty_umi_prior && task.ext.version == "0.3" ? "--force-empty-umi-prior ${params.force_empty_umi_prior}" : '',
params.epochs ? "--epochs ${params.epochs}" : '',
params.fpr ? "--fpr ${params.fpr}" : '',
params.lr ? "--learning-rate ${params.lr}" : '',
].join(' ')
}
clusterOptions = ' -gpu "mode=shared:j_exclusive=no:gmem=6000:num=1"'
containerOptions = '--nv'
cpus = { 2 * task.attempt }
memory = { 30.GB * task.attempt }
queue = 'gpu-cellgen-restricted'
publishDir = [
path: { "${params.output_dir}/cellbender/" },
mode: "${params.publish_mode}",
]
}
withName: QualityControl {
ext.qc_mode = params.qc_mode
container = "docker://quay.io/cellgeni/cellbender:${params.version}"
cpus = { 2 * task.attempt }
memory = { 8.GB * task.attempt }
queue = 'normal'
publishDir = [
path: { "${params.output_dir}/" },
mode: "${params.publish_mode}",
pattern: "qc_report",
]
}
}
// 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
file = "execution-reports/timeline.html"
overwrite = true
}
report {
enabled = true
file = "execution-reports/report.html"
overwrite = true
}
trace {
enabled = true
file = "execution-reports/trace.txt"
overwrite = true
}
// Manifest
manifest {
name = 'cellgeni/nf-cellbender'
homePage = 'https://github.com/cellgeni/nf-cellbender'
description = "Nextflow pipeline to run CellBender"
mainScript = 'main.nf'
nextflowVersion = '!>=25.04.4'
version = '25-280'
defaultBranch = 'main'
contributors = [
[
name: 'Simon Murray',
github: 'just-simon-5',
contribution: ['author'],
],
[
name: 'Aljes Binkevich',
email: 'ab76@sanger.ac.uk',
github: 'claptar',
contribution: ['maintainer', 'contributor'],
],
[
name: 'Batuhan Cakir',
email: 'bc8@sanger.ac.uk',
github: 'cakirb',
contribution: ['contributor'],
],
[
name: 'Pavel Mazin',
email: 'pm19@sanger.ac.uk',
github: 'iaaka',
contribution: ['contributor'],
],
[
name: 'Martin Prete',
email: 'martin.prete@sanger.ac.uk',
github: 'prete',
contribution: ['contributor'],
],
]
}