replace regex with fixed extensions

This commit is contained in:
Matthias De Smet 2022-05-17 09:54:06 +02:00 committed by GitHub
parent 94733a85c0
commit f48790a728
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,10 +11,10 @@ process BIOBAMBAM_BAMMERGE {
tuple val(meta), path(bam)
output:
tuple val(meta), path("${prefix}.bam") ,emit: bam
tuple val(meta), path("${indexfilename}") ,optional:true, emit: bam_index
tuple val(meta), path("${md5filename}") ,optional:true, emit: checksum
path "versions.yml" ,emit: versions
tuple val(meta), path("${prefix}.bam") ,emit: bam
tuple val(meta), path("*.bai") ,optional:true, emit: bam_index
tuple val(meta), path("*.md5") ,optional:true, emit: checksum
path "versions.yml" ,emit: versions
when:
task.ext.when == null || task.ext.when
@ -22,8 +22,6 @@ process BIOBAMBAM_BAMMERGE {
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
indexfilename = args.contains("indexfilename=") ? (args =~ /indexfilename=([^\s]+)/)[0][1] : ""
md5filename = args.contains("md5filename=") ? (args =~ /md5filename=([^\s]+)/)[0][1] : ""
def input_string = bam.join(" I=")
"""