-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
218 lines (137 loc) · 7.61 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
/*
This File contains parameters that can be changed to configure the pipeline
*/
// Max resource options
// Defaults only, expecting to be overwritten
params.max_memory = '100.GB'
params.max_cpus = 16
params.max_time = '24.h'
// Required Pipeline Config Settings
params.sample_sheet = '/bulk/ksilver/testing_data/balrong_ont/samplesheet_subset.csv'
params.project_name = 'ARK_QC'
params.publish_dir_mode = 'defualt' // Options: 'defualt', copy', 'symlink', 'link' Note: Defualt recommended (copy, exept on resume). When using link (Hardlink) output dir and work dir must be on the same filesystem
params.workflow_opt = 'sr_qc_only' // (shortread_meta, ont_meta, shortread_isolate, ont_meta_rna, shortread_meta_rna, sr_qc_only, sr_multiqc)
// Long Read Settings
params.ont_min_seq_len = '500' // Only applies to long read sequecning, affects seq len cutoff in chopper
params.ont_average_read_min_qscore = '20' // Minimum average read Qscore - Defualt Q20 - Applies to ONT Data only
params.run_metaassembly = true //Perform metagenomic assembly on ONT reads and annotate contigs
params.run_assembly_free = true // Convert reads to Fasta without Assembly and annotate converted reads
params.comebin_num_views = '6' // number of views for contrastive multiple-view learning (default=6)
params.rename_fastq = true // Renames fastq sequence names. Usefull for sequencing platforms that generate complex sequence names (ex. ONT)
//LR Binner Settings
params.lrbinner_kmmer_size = 3 // k value for k-mer frequency vector. Choose between 3 and 5 (default=3)
params.lrbinner_bin_size = 10 // Bin Size for coverage histogram (default=10)
params.lrbinner_bin_count = 32 // Bin Count for coverage histogram (default=32)
params.lrbinner_min_bin_size = 500 // Minimum number of reads a bin should have (default=10000)
params.lrbinner_bin_itterations = 1000 // Number of iterations for cluster search. Use 0 for exhaustive search (default=1000)
// Short Read Settings
params.sequencing_adapter_type = 'aviti' // (aviti, illumina, custom) - only applies to short read sequencing
params.custom_sequencing_adapter_r1 = null // Insert R1 sequencing adapter if custom was chosen
params.custom_sequencing_adapter_r1 = null // Insert R2 sequencing adapter if custom was chosen
params.fastp_q = '20' // Average Q score for fastp - Short read Only
params.fastp_minlen = '100'
/* Short Read Isolate specific settings */
params.busco_lineage = 'bacteria_odb10'
/*
Optional Steps Settings (True = Run Aditional Step, False = Don't run it):
*/
//Preform human sequence removal (Bowtie2 - Short Read / Minimap2 - Long Read)
params.human_removal =true
//Preform host sequence removal (Bowtie2 - Short Read / Minimap2 - Long Read)
params.single_host_removal =true
//Preform host sequence removal from multiple reference genomes (Kraken2 - Long and Short Reads) NOT IMPLEMENTED YET
params.multi_host_removal =false
//Preform metagenomic community analysis against GTDB with Sylph (Uses metaphlan scripts for analsysis)
params.meta_community_analysis =true
//Preform extra taxonomic classification (Kraken2 & GTDB) of sequences (Metagenome Recommend, but can be used on Fq2Fa samples as well)
params.meta_sequence_id = false
//Preform CARD database only annotation. If this is true multi_amr should be false.
params.card_only = false
//Preform multi amr database annoation (AMRFINDERPLUS,Resfinder,CARD). If this is true card_only should be false
params.multi_amr = true
//Preform mobile element finder, will also look to see if any AMR genes happend to be on mobile elements (plasmer already does plasmid, and is run by defualt.
//This should be used if you are intrested in other ME types)
params.mef = true
//Preform pathogen detection - kraken2 will be run to look for pathogens in host-depleted reads
params.pathogen_detection = true
//Preform binning of ont reads
params.bin_ont_reads = false
/* Other program Settings */
params.plasmer_min_len = '500' //== Setting the minimum size to be classified in plasmer (defualt/recommended = 500)
params.plasmer_max_len = '500000' //== Setting the length at which all contigs greater than this size are automatically considered chromomosomal in orgin (defualt = 500000)
/*
Database Settings (True = autodownload, False = supplied in corresponding folder)
*/
params.database_dir = ''
//Plasmer (recommend autodownload)
params.db_plasmer = true
//Busco (recommend autodownload)
params.db_buscov5 = true
//Kracken2 (recommend autodownload) If different database is used change RAM requirements as needed in config
params.db_kraken2 = true
//ViralVerify_pfam_db (Can be updated for more up to date plasmid searching, dependent on use)
params.db_viralverify = true
//GTDBtk (Can be updated for more up to date genome identification)
params.db_gtdbtk = true
//ViralVerify_pfam_db (Can be updated for more up to date plasmid searching, dependent on use)
params.db_ncbi16S = true
//resfinder (Reccomend updating for most up to date ARGs)
params.db_resfinder = true
//amrfinder (Reccomend updating for most up to date ARGs)
params.db_amrfinder = true
//argannot (Reccomend updating for most up to date ARGs)
params.db_argannot = true
//card (Reccomend updating for most up to date ARGs)
params.db_card = true
//megares (Reccomend updating for most up to date ARGs)
params.db_megares = true
//Kracken2 PlusPF for metagenomic community anlysis (recommend autodownload) If different database is used change RAM requirements as needed in config
params.db_kraken2_pluspf = true
//Kracken2 PlusPF for metagenomic community anlysis (recommend autodownload) If different database is used change RAM requirements as needed in config
params.db_virsorter = true
//Krackenuniq database for pathogen detection anlysis (recommend autodownload) If different database is used change RAM requirements as needed in config
params.db_krakenuniq = true
// Load base.config by default for all pipelines
includeConfig 'configs/base_config.cfg'
// Setting sequencing adapters based on previous settings
if (params.sequencing_adapter_type == 'aviti') {
params.fastp_adap1 = 'ATGTCGGAAGGTGTGCAGGCTACCGCTTGTCAACT'
params.fastp_adap2 = 'ATGTCGGAAGGTGTCTGGTGAGCCAATCCAGCACG'
params.fastqc_adapt = 'adapter_list_aviti.txt'
}
if (params.sequencing_adapter_type == 'custom') {
params.fastp_adap1 = params.custom_sequencing_adapter_r1
params.fastp_adap2 = params.custom_sequencing_adapter_r2
}
// 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
}
}
}