From df524f689554174381044291eba4af96ad2f2a53 Mon Sep 17 00:00:00 2001 From: kylacochrane Date: Thu, 16 May 2024 15:18:13 -0400 Subject: [PATCH] Improvements to the FILTER_QUERY module --- modules/local/filter/main.nf | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/local/filter/main.nf b/modules/local/filter/main.nf index 305af37..72aacbc 100644 --- a/modules/local/filter/main.nf +++ b/modules/local/filter/main.nf @@ -13,7 +13,7 @@ process FILTER_QUERY { val out_format output: - path("new_addresses.csv"), emit: csv + path("new_addresses.*"), emit: csv path("versions.yml"), emit: versions script: @@ -31,12 +31,9 @@ process FILTER_QUERY { ${addresses} \\ --filter '\$id == \"$queryID\"' \\ --delimiter "${delimiter}" \\ - --out-delimiter "${out_delimiter}" \\ - --out-file ${outputFile}.tmp - - csvtk cut -f 1,2 ${outputFile}.tmp > ${outputFile}.${out_extension} - rm ${outputFile}.tmp - + --out-delimiter "${out_delimiter}" | \\ + csvtk cut -f id,address > ${outputFile}.${out_extension} + cat <<-END_VERSIONS > versions.yml "${task.process}": csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" ))