diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index b7c00349..c22bbaa3 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -19,9 +19,8 @@ process PICARD_FILTERSAMREADS { } input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(readlist) val filter - path readlist output: tuple val(meta), path("*.bam"), emit: bam diff --git a/tests/modules/picard/filtersamreads/main.nf b/tests/modules/picard/filtersamreads/main.nf index b09594cc..a03471dd 100644 --- a/tests/modules/picard/filtersamreads/main.nf +++ b/tests/modules/picard/filtersamreads/main.nf @@ -13,15 +13,20 @@ workflow test_picard_filtersamreads { filter = 'includeAligned' PICARD_SORTSAM ( input, sort_order ) - PICARD_FILTERSAMREADS ( PICARD_SORTSAM.out.bam, filter, [] ) + PICARD_SORTSAM.out.bam + .map { + [ it[0], it[1], [] ] + } + .set{ ch_sorted_for_filtersamreads } + PICARD_FILTERSAMREADS ( ch_sorted_for_filtersamreads, filter ) } workflow test_picard_filtersamreads_readlist { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_single_end_bam_readlist_txt'], checkIfExists: true) ] filter = 'includeReadList' - readlist = file(params.test_data['sarscov2']['illumina']['test_single_end_bam_readlist_txt'], checkIfExists: true) - PICARD_FILTERSAMREADS ( input, filter, readlist ) + PICARD_FILTERSAMREADS ( input, filter ) }