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

@ -12,8 +12,8 @@ process BIOBAMBAM_BAMMERGE {
output: output:
tuple val(meta), path("${prefix}.bam") ,emit: bam tuple val(meta), path("${prefix}.bam") ,emit: bam
tuple val(meta), path("${indexfilename}") ,optional:true, emit: bam_index tuple val(meta), path("*.bai") ,optional:true, emit: bam_index
tuple val(meta), path("${md5filename}") ,optional:true, emit: checksum tuple val(meta), path("*.md5") ,optional:true, emit: checksum
path "versions.yml" ,emit: versions path "versions.yml" ,emit: versions
when: when:
@ -22,8 +22,6 @@ process BIOBAMBAM_BAMMERGE {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}" 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=") def input_string = bam.join(" I=")
""" """