Skip to content

Commit 3182733

Browse files
committed
Revert input read handling to old version
1 parent f82692c commit 3182733

2 files changed

Lines changed: 28 additions & 6 deletions

File tree

conf/test.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ params {
1414
genome = "Custom"
1515
//Input data
1616
singleEnd = false
17-
reads = ['https://github.com/nf-core/test-datasets/raw/eager2/testdata/Mammoth/JK2782_TGGCCGATCAACGA_L008_R1_001.fastq.gz.tengrand.fq.gz','https://github.com/nf-core/test-datasets/raw/eager2/testdata/Mammoth/JK2782_TGGCCGATCAACGA_L008_R2_001.fastq.gz.tengrand.fq.gz']
17+
readPaths = [['JK2782_TGGCCGATCAACGA_L008', ['https://github.com/nf-core/test-datasets/raw/eager2/testdata/Mammoth/JK2782_TGGCCGATCAACGA_L008_R1_001.fastq.gz.tengrand.fq.gz','https://github.com/nf-core/test-datasets/raw/eager2/testdata/Mammoth/JK2782_TGGCCGATCAACGA_L008_R2_001.fastq.gz.tengrand.fq.gz']],
18+
]
1819
// Genome references
1920
fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/eager2/reference/Mammoth_MT_Krause.fasta'
2021
}

main.nf

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,32 @@ if( !(workflow.runName ==~ /[a-z]+_[a-z]+/) ){
289289
* Dump can be used for debugging purposes, e.g. using the -dump-channels operator on run
290290
*/
291291

292-
Channel
293-
.fromFilePairs( params.reads, size: params.singleEnd ? 1 : 2 )
294-
.ifEmpty { exit 1, "Cannot find any reads matching: ${params.reads}\nNB: Path needs to be enclosed in quotes!\nNB: Path requires at least one * wildcard!\nIf this is single-end data, please specify --singleEnd on the command line." }
295-
.dump(tag:'input')
296-
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filtering }
292+
if(params.readPaths){
293+
if(params.singleEnd){
294+
Channel
295+
.from(params.readPaths)
296+
.map { row -> [ row[0], [file(row[1][0])]] }
297+
.ifEmpty { exit 1, "params.readPaths was empty - no input files supplied" }
298+
.dump(tag:'input')
299+
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filtering }
300+
301+
} else {
302+
Channel
303+
.from(params.readPaths)
304+
.map { row -> [ row[0], [file(row[1][0]), file(row[1][1])]] }
305+
.ifEmpty { exit 1, "params.readPaths was empty - no input files supplied" }
306+
.dump(tag:'input')
307+
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filtering }
308+
309+
}
310+
} else {
311+
Channel
312+
.fromFilePairs( params.reads, size: params.singleEnd ? 1 : 2 )
313+
.ifEmpty { exit 1, "Cannot find any reads matching: ${params.reads}\nNB: Path needs to be enclosed in quotes!\nNB: Path requires at least one * wildcard!\nIf this is single-end data, please specify --singleEnd on the command line." }
314+
.dump(tag:'input')
315+
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filtering }
316+
317+
}
297318

298319

299320

0 commit comments

Comments
 (0)