Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to version 0.2.2 #25

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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
11 changes: 3 additions & 8 deletions modules/local/filter_query/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -39,7 +37,4 @@ process FILTER_QUERY {
csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" ))
END_VERSIONS
"""


}

2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
2 changes: 1 addition & 1 deletion workflows/gas_nomenclature.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading