-
Notifications
You must be signed in to change notification settings - Fork 4
/
nextflow.config
307 lines (267 loc) · 14.4 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
//Daniel Stribling
//Renne Lab, University of Florida
//CnR-flow Configuration File
//
// Config syntax:
// This config file uses the syntax described here:
// https://www.nextflow.io/docs/latest/config.html
// Primarily, "//" acts as a comment and allows removal/deactivation of lines.
//
// Settings within scopes, Ex:
// params {
// setting = value
// ...
// }
// are equivalent to:
// params.setting = value"
//
// Configuration Hierarchy:
// Different Nextflow configuration files have the precedence order:
// task-dir > pipe-dir > user-default > pipe-default
//
// (presumably) This configruation is in the CnR-flow/nextflow.config,
// and will therefore superceed user and pipe defaults,
// but be overridden by the task-specific configuration file
// in the case of conflicting settings.
// For more detail visit: https://www.nextflow.io/docs/latest/config.html
//
// Users wishing to modify dependency configuration should specifically
// direct attention to the conda/module section.
// Other default parameters are provided below.
// Pipeline Details
manifest {
author = 'Daniel Stribling, Rolf Renne'
defaultBranch = 'master'
description = """\
CUT&RUN-Flow, A Nextflow pipeline for QC, tag trimming, normalization, and peak
calling for paired-end sequence data from CUT&RUN experiments.
""".stripIndent()
//doi
homePage = 'http://www.RenneLab.com'
mainScript = 'CnR-flow.nf'
name = 'CUT&RUN-Flow'
nextflowVersion = '>=20.10.6'
version = '0.11-dev'
}
// Process Settings (For use of PBS, SLURM, etc)
process {
// --Executor, see: https://www.nextflow.io/docs/latest/executor.html
//executor = 'slurm' // for running processes using SLURM (Default: 'local')
// Process Walltime, See https://www.nextflow.io/docs/latest/process.html#process-time
//time = '12h'
// Process CPUs, See https://www.nextflow.io/docs/latest/process.html#cpus
//cpus = 8
//
// Memory: See https://www.nextflow.io/docs/latest/process.html#process-memory
// Set Memory for specific task sizes (1n/2n/4n scheme recommended)
//withLabel: big_mem { memory = '16 GB' }
//withLabel: norm_mem { memory = '4 GB' }
//withLabel: small_mem { memory = '2 GB' }
// -*OR*- Set Memory for all processes
//memory = "16 GB"
ext.ph = null //Placeholder to prevent errors.
}
// ------- Dependency Configuration --------
// Standard configuration is setup using conda.
// Docker / Singularity execution is preferred where available.
// Environment Modules also supported.
// Where defined, dependencies are used in order [dep]_container > [dep]_module > [dep]_conda
profiles {
standard {
// Dependency Configuration Using Anaconda
params.facount_conda = 'bioconda::ucsc-facount=366'
params.bowtie2_conda = 'bioconda::bowtie2=2.4.4 conda-forge::libgcc-ng=9.3'
params.fastqc_conda = 'bioconda::fastqc=0.11.9'
params.trimmomatic_conda = 'bioconda::trimmomatic=0.39'
params.bedtools_conda = 'bioconda::bedtools=2.29.2'
params.macs2_conda = 'bioconda::macs2=2.2.6'
params.seacr_conda = "r=3.6.0 bioconda::seacr=1.3 ${params.bedtools_conda}"
params.samtools_conda = 'bioconda::samtools=1.9'
params.bedgraphtobigwig_conda = 'conda-forge::libpng conda-forge::libuuid conda-forge::mysql-connector-c conda-forge::openssl conda-forge::zlib bioconda::ucsc-bedgraphtobigwig=377'
params.trimmomatic_adapterpath = "${projectDir}/ref_dbs/trimmomatic_adapters/TruSeq3-PE-2.fa"
}
singularity {
// Dependency Configuration Using Containers with Singularity:
singularity.enabled = true
params.facount_container = "docker://quay.io/biocontainers/ucsc-facount:366--h5eb252a_0"
params.bowtie2_container = "docker://quay.io/biocontainers/bowtie2:2.4.4--py38he5f0661_1"
params.bowtie2_samtools_container = "docker://quay.io/biocontainers/mulled-v2-c742dccc9d8fabfcff2af0d8d6799dbc711366cf:b6524911af823c7c52518f6c886b86916d062940-0"
// Mulled: bowtie2=2.4.4,samtools=1.13
params.fastqc_container = "docker://quay.io/biocontainers/fastqc:0.11.9--hdfd78af_1"
params.trimmomatic_container = "docker://quay.io/biocontainers/trimmomatic:0.39--1"
params.macs2_container = "docker://quay.io/biocontainers/macs2:2.2.6--py37h516909a_0"
params.seacr_container = "docker://quay.io/biocontainers/seacr:1.3--hdfd78af_2"
params.samtools_container = "docker://quay.io/biocontainers/samtools:1.13--h8c37831_0"
params.bedgraphtobigwig_container = "docker://quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h0b8a92a_2"
params.samtools_bedtools_container = "docker://quay.io/biocontainers/mulled-v2-fc325951871d402a00bdf9d0e712a5b81b8e0cb3:38034b9703d6561a40bcaf2f1ec16f8b158fde97-0"
// Mulled: samtools=1.14.0,bedtools=2.30.0,ucsc-facount=377,python=3.8
params.samtools_facount_container = "${params.samtools_bedtools_container}"
params.bedtools_container = "${params.samtools_bedtools_container}"
params.trimmomatic_adapterpath = "/usr/local/share/trimmomatic/adapters/TruSeq3-PE-2.fa"
}
docker {
// Dependency Configuration Using Containers with Docker:
docker.enabled = true
docker.runOptions = "-v ${launchDir}:${launchDir}"
//docker.runOptions = "-v ${params.refs_dir}:${params.refs_dir}"
params.facount_container = "quay.io/biocontainers/ucsc-facount:366--h5eb252a_0"
params.bowtie2_container = "quay.io/biocontainers/bowtie2:2.4.4--py38he5f0661_1"
params.bowtie2_samtools_container = "quay.io/biocontainers/mulled-v2-c742dccc9d8fabfcff2af0d8d6799dbc711366cf:b6524911af823c7c52518f6c886b86916d062940-0"
// Mulled: bowtie2=2.4.4,samtools=1.13
params.fastqc_container = "quay.io/biocontainers/fastqc:0.11.9--hdfd78af_1"
params.trimmomatic_container = "quay.io/biocontainers/trimmomatic:0.39--1"
params.macs2_container = "quay.io/biocontainers/macs2:2.2.6--py37h516909a_0"
params.seacr_container = "quay.io/biocontainers/seacr:1.3--hdfd78af_2"
params.samtools_container = "quay.io/biocontainers/samtools:1.13--h8c37831_0"
params.bedgraphtobigwig_container = "quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h0b8a92a_2"
params.samtools_bedtools_container = "quay.io/biocontainers/mulled-v2-fc325951871d402a00bdf9d0e712a5b81b8e0cb3:38034b9703d6561a40bcaf2f1ec16f8b158fde97-0"
// Mulled: samtools=1.14.0,bedtools=2.30.0,ucsc-facount=377,python=3.8
params.samtools_facount_container = "${params.samtools_bedtools_container}"
params.bedtools_container = "${params.samtools_bedtools_container}"
params.trimmomatic_adapterpath = "/usr/local/share/trimmomatic/adapters/TruSeq3-PE-2.fa"
}
module {
// Dependency Configuration Using Environment Modules
// (values will vary depending on system)
params.facount_module = "" // Ex: "ucsc/20200320"
params.bowtie2_module = "" // Ex: "bowtie2/2.3.5.1"
params.fastqc_module = "" // Ex: "fastqc/0.11.7"
params.trimmomatic_module = "" // Ex: "trimmomatic/0.39"
params.bedtools_module = "" // Ex: "bedtools/2.29.2"
params.macs2_module = "" // Ex: "macs/2.2.7.1"
params.seacr_module = "" // Ex: "R/4.0 seacr/1.3 ${params.bedtools_module}"
params.bedgraphtobigwig_module = "" // Ex: "ucsc/20200320"
params.trimmomatic_adapterpath = "${projectDir}/ref_dbs/trimmomatic_adapters/TruSeq3-PE-2.fa"
}
}
params {
// System Call Settings
// Call executed on the system, defaults assume that each tool is available
// on the system PATH
// Can replace with direct path as desired:
// Ex:
// samtools_call = "samtools"
// or samtools_call = "/path/to/samtools/dir/samtools"
java_call = "java"
bowtie2_build_call = "bowtie2-build"
facount_call = "faCount"
samtools_call = "samtools"
fastqc_call = "fastqc"
trimmomatic_call = "trimmomatic"
bowtie2_call = "bowtie2"
bedtools_call = "bedtools"
macs2_call = "macs2"
bedgraphtobigwig_call = "bedGraphToBigWig"
seacr_call = "SEACR_1.3.sh"
seacr_R_script = "SEACR_1.3.R"
// ------- Step-Specific Pipeline Paramaters --------
// Step Settings:
do_merge_lanes = true // Merge sample names differing only by lane-ID (Ex: L001, L002)
do_fastqc = true // Perform FastQC Analysis
do_trim = true // Trim tags using Trimmomatic
do_norm_spike = true // Normalize using aligment count to a spike-in reference
do_norm_cpm = false // Normalize using millions of reads per sample
do_make_bigwig = true // Create UCSC bigWig files from final alignments
// FastQC Settings:
fastqc_flags = ''
// Alignment Mode Options (params.use_aln_modes) :
// "all" : Use all reads
// "all_dedup" : Use all reads, and remove duplicates.
// "less_120" : Use trimmed reads <= 120 bp
// "less_120_dedup" : Use trimmed reads <= 120 bp and remove duplicates.
// (Multiple modes can be performed in parallel. Ex: ['all', 'less_120'])
use_aln_modes = ["all"] // Options: ["all", "all_dedup", "less_120", "less_120_dedup"]
// Peak Caller Options (params.peak_callers):
// "macs2" : Call Peaks with Macs2
// "seacr" : Call Peaks with SEACR
// (Multiple callers can be used in parallel. Ex: ['macs2', 'seacr'])
peak_callers = ['macs', 'seacr'] // Options: ['macs', 'seacr']
// Trimmomatic Trim Settings
// --Trimmomatic Adapter Path, Downloaded after "nextflow CnR-flow --mode initiate"
//trimmomatic_adapterpath = "${projectDir}/ref_dbs/trimmomatic_adapters/TruSeq3-PE-2.fa"
trimmomatic_adapter_mode = "ILLUMINACLIP:"
trimmomatic_adapter_params = ":2:15:4:4:true"
trimmomatic_settings = "LEADING:20 TRAILING:20 SLIDINGWINDOW:4:15 MINLEN:25"
trimmomatic_flags = "-phred33"
// Bowtie2 Alignment Settings
aln_ref_flags = "--local --very-sensitive-local --phred33 -I 10 -X 700 --dovetail --no-unal --no-mixed --no-discordant"
// Normalization Settings
aln_norm_flags = params.aln_ref_flags
norm_scale = 1000 // Arbitrary value for scaling of normalized counts.
norm_mode = 'adj' // Options: ['adj', 'all']
// CPM Normalization Settings
norm_cpm_scale = 1000 // Arbitrary value for scaling of normalized counts.
// Macs2 Settings
macs_qval = '0.01'
macs_flags = ''
// SEACR Settings
seacr_fdr_threshhold = "0.01"
seacr_norm_mode = "auto" // Options: "auto", "norm", "non"
seacr_call_stringent = true
seacr_call_relaxed = true
// ------- General Pipeline Output Paramaters --------
publish_files = 'default' // Options: ["minimal", "default", "all"]
publish_mode = 'copy' // Options: ["symlink", "copy"]
// Name trim guide: ( regex-based )
// ~/groovy-slashy-string/ ; "~" denotes groovy pattern type.
// ~/^/ matches beginning ; ~/$/ matches end
trim_name_prefix = '' // Example: ~/^myprefix./ removes "myprefix." prefix.
trim_name_suffix = '' // Example: ~/_mysuffix$/ removes "_mysuffix" suffix.
// Workflow Output Default Naming Scheme:
// Absolute paths for output:
out_dir = "${launchDir}/cnr_output"
refs_dir = "${launchDir}/cnr_references"
// Subdirectory Settigns:
log_dir = 'logs'
merge_fastqs_dir = 'S0_B_merged_reads'
fastqc_pre_dir = 'S0_C_FastQC_pre'
trim_dir = 'S1_A_fastq_trimomatic'
fastqc_post_dir = 'S1_C_FastQC_post'
aln_dir_ref = 'S2_A_aln_ref'
aln_dir_mod = 'S2_B_aln_mod'
aln_dir_bdg = 'S2_C_aln_bdg'
aln_dir_spike = 'S3_A_aln_spikein'
aln_dir_norm = 'S3_B_aln_norm'
aln_dir_norm_cpm = 'S3_X_aln_normCPM'
aln_bigwig_dir = 'S4_A_aln_bigWig'
peaks_dir_macs = 'S5_A_peaks_macs'
peaks_dir_seacr = 'S5_B_peaks_seacr'
prep_bt2db_suf = 'bt2_db'
}
// Locations to store conda and/or singularity environments for reuse.
conda.cacheDir = "${projectDir}/envs_conda/"
singularity.cacheDir = "${projectDir}/envs_singularity/"
singularity.enabled = false
// ------- Individual Task Settings, Included for Completeness --------
//params {
// REQUIRED values to enter (all others should work as default):
// ref_fasta (or some other ref-mode/location)
// treat_fastqs (input paired-end fastq[.gz] file paths)
// [OR fastq_groups] (mutli-group input paired-end .fastq[.gz] file paths)
// Automatic alignment reference preparation/usage settings:
//ref_mode = 'fasta' // Options: ['name', 'fasta', 'manual']
//ref_fasta = '' // REQUIRED: Ex: '/path/to/my/reference.fasta[.gz]'
// Default Pre-Supplied Normalization library is Ecoli:
//norm_ref_fasta = "${projectDir}/ref_dbs/GCF_000005845.2_ASM584v2_genomic.fna.gz"
// CnR-flow Input Files:
// Provided fastqs must be in glob pattern matching pairs.
// Example: ['./relpath/to/base*R{1,2}*.fastq']
// Example: ['/abs/path/to/other*R{1,2}*.fastq']
//treat_fastqs = [] // REQUIRED, Single-group Treatment fastq Pattern
//ctrl_fastqs = [] // Single-group Control fastq pattern
// Can specify multiple treat/control groups as Groovy mapping.
// Specified INSTEAD of treat_fasts/ctrl_fastqs parameters.
// Note: There should be only one control sample per group
// (after optional lane combination)
// Example:
// fastq_groups = [
// 'group_1_name': ['treat': 'relpath/to/treat1*R{1,2}*',
// 'ctrl': 'relpath/to/ctrl1*R{1,2}*'
// ],
// 'group_2_name': ['treat': ['relpath/to/g2_treat1*R{1,2}*',
// '/abs/path/to/g2_treat2*R{1,2}*'
// ],
// 'ctrl': 'relpath/to/g2_ctrl1*R{1,2}*'
// ]
// ]
//fastq_groups = []