fix: picard filtersamreads input (#610)

* Move readlist into same input channel as bam

* Update test reflecting input restructuring

* Update tests/modules/picard/filtersamreads/main.nf

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* fix test

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
James A. Fellows Yates 2021-07-22 12:19:51 +02:00 committed by GitHub
parent 3cc43838e1
commit 553f51d6bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -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

View file

@ -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 )
}