@@ -211,6 +211,21 @@ if ( workflow.profile.tokenize(",").contains("test") ){
211
211
212
212
} else {
213
213
214
+
215
+ // STAGE BEDGRAPH CHANNELS
216
+ CpG = params. noCpG ? Channel . empty() : Channel
217
+ .fromPath(CpG_path )
218
+ .map{ tuple(it. baseName, it) }
219
+
220
+ CHG = params. noCHG ? Channel . empty() : Channel
221
+ .fromPath(CHG_path )
222
+ .map{ tuple(it. baseName, it) }
223
+
224
+ CHH = params. noCHH ? Channel . empty() : Channel
225
+ .fromPath(CHH_path )
226
+ .map{ tuple(it. baseName, it) }
227
+
228
+ /*
214
229
// STAGE BEDGRAPH CHANNELS
215
230
CpG = params.noCpG ? Channel.empty() : Channel
216
231
.fromPath(CpG_path)
@@ -232,6 +247,7 @@ if ( workflow.profile.tokenize(",").contains("test") ){
232
247
-Please check files exist or specify --noCHH\n \
233
248
-Please check sample names match: ${params.samples}"}
234
249
.map{ tuple(it.baseName, it) }
250
+ */
235
251
}
236
252
237
253
// ASSIGN GROUP AND REP NAMES TO CHANNELS
@@ -241,6 +257,10 @@ CHH_channel = CHH.combine(samples_channel, by: 0).map{tuple("CHH", *it)}
241
257
242
258
// STAGE FINAL INPUT CHANNEL
243
259
input_channel = CpG_channel . mix(CHG_channel ,CHH_channel )
260
+ .ifEmpty{ exit 1 , " ERROR: cannot find valid *.bedGraph files in dir: ${ params.input} /\n\n \
261
+ -Please check files exist in {CpG,CHG,CHH} directories\n \
262
+ -Please check --noCpG --noCHG --noCHH parameters\n \
263
+ -Please check sample names match: ${ params.samples} " }
244
264
245
265
246
266
// //////////////////
0 commit comments