mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
patch output extension in csvtk/concat (#797)
* patch output extension * Update main.nf * Update main.nf * Update main.nf * whitespace * Update main.nf * Update main.nf * Update modules/csvtk/concat/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
parent
0ba88fb869
commit
ad0f4d2e24
1 changed files with 5 additions and 4 deletions
|
@ -24,13 +24,14 @@ process CSVTK_CONCAT {
|
|||
val out_format
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.${out_format}"), emit: csv
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path("${prefix}.${out_extension}"), emit: csv
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def delimiter = in_format == "tsv" ? "\t" : (in_format == "csv" ? "," : in_format)
|
||||
def out_delimiter = out_format == "tsv" ? "\t" : (out_format == "csv" ? "," : out_format)
|
||||
out_extension = out_format == "tsv" ? 'tsv' : 'csv'
|
||||
"""
|
||||
csvtk \\
|
||||
concat \\
|
||||
|
@ -38,7 +39,7 @@ process CSVTK_CONCAT {
|
|||
--num-cpus $task.cpus \\
|
||||
--delimiter "${delimiter}" \\
|
||||
--out-delimiter "${out_delimiter}" \\
|
||||
--out-file ${prefix}.${out_format} \\
|
||||
--out-file ${prefix}.${out_extension} \\
|
||||
$csv
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
|
|
Loading…
Reference in a new issue