Skip to content

Commit

Permalink
trgt/merge: Made extension of stub test configurable (#7080)
Browse files Browse the repository at this point in the history
Made extension of stub test configurable
  • Loading branch information
Schmytzi authored Nov 25, 2024
1 parent 2db8d8f commit 8f77dd0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/nf-core/trgt/merge/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ process TRGT_MERGE {
stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" :
args.contains("--output-type u") || args.contains("-Ou") ? "bcf" :
args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" :
args.contains("--output-type v") || args.contains("-Ov") ? "vcf" :
"vcf"
def create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch"
"""
touch ${prefix}.vcf
$create_cmd ${prefix}.${extension}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down

0 comments on commit 8f77dd0

Please sign in to comment.