diff --git a/CHANGELOG.md b/CHANGELOG.md index fab4ffb..fe7b8fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.2] - 2024/09/13 + +### `Changed` + +- Updated FILTER_QUERY to process query IDs from a file rather than passing them as a string, preventing errors caused by long argument strings [PR24](https://github.com/phac-nml/gasnomenclature/pull/24) + ## [0.2.1] - 2024/09/10 ### `Changed` @@ -29,3 +35,5 @@ Initial release of the Genomic Address Nomenclature pipeline to be used to assig [0.1.0]: https://github.com/phac-nml/gasnomenclature/releases/tag/0.1.0 [0.2.0]: https://github.com/phac-nml/gasnomenclature/releases/tag/0.2.0 +[0.2.1]: https://github.com/phac-nml/gasnomenclature/releases/tag/0.2.1 +[0.2.2]: https://github.com/phac-nml/gasnomenclature/releases/tag/0.2.2 diff --git a/modules/local/filter_query/main.nf b/modules/local/filter_query/main.nf index 9912ee5..1635296 100644 --- a/modules/local/filter_query/main.nf +++ b/modules/local/filter_query/main.nf @@ -22,14 +22,12 @@ process FILTER_QUERY { def out_delimiter = out_format == "tsv" ? "\t" : (out_format == "csv" ? "," : out_format) def out_extension = out_format == "tsv" ? 'tsv' : 'csv' - // Join the query IDs in the correct csvtk filter2 required format - def queryID = query_ids.collect { id -> "\$id == \"${id}\"" }.join(" || ") - """ # Filter the query samples only; keep only the 'id' and 'address' columns - csvtk filter2 \\ + csvtk grep \\ ${addresses} \\ - --filter '$queryID' \\ + -f 1 \\ + -P ${query_ids} \\ --delimiter "${delimiter}" \\ --out-delimiter "${out_delimiter}" | \\ csvtk cut -f id,address > ${outputFile}.${out_extension} @@ -39,7 +37,4 @@ process FILTER_QUERY { csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) END_VERSIONS """ - - } - diff --git a/nextflow.config b/nextflow.config index dbc1487..fe19697 100644 --- a/nextflow.config +++ b/nextflow.config @@ -222,7 +222,7 @@ manifest { description = """Gas Nomenclature assignment pipeline""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '0.2.1' + version = '0.2.2' doi = '' defaultBranch = 'main' } diff --git a/workflows/gas_nomenclature.nf b/workflows/gas_nomenclature.nf index 8972669..4daaf71 100644 --- a/workflows/gas_nomenclature.nf +++ b/workflows/gas_nomenclature.nf @@ -144,7 +144,7 @@ workflow GAS_NOMENCLATURE { ch_versions = ch_versions.mix(called_data.versions) // Filter the new queried samples and addresses into a CSV/JSON file for the IRIDANext plug in - query_ids = profiles.query.collect { it[0].id } + query_ids = profiles.query.collectFile { it[0].id + '\n' } new_addresses = FILTER_QUERY(query_ids, called_data.distances, "tsv", "csv") ch_versions = ch_versions.mix(new_addresses.versions)