Skip to content

Commit

Permalink
ingest: fix csvtk quotes
Browse files Browse the repository at this point in the history
The automated ingest workflow failed with a csvtk quoting error.¹
Following nextstrain/docker-base#209, we can now
use `csvtk fix-quotes` and `csvtk del-quotes` to work around the quoting
issue.

¹ https://github.com/nextstrain/zika/actions/runs/8926866948/job/24518932039#step:8:139
  • Loading branch information
joverlee521 committed May 2, 2024
1 parent fe37759 commit 0c542de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ingest/rules/fetch_from_ncbi.smk
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ rule format_ncbi_dataset_report:
--package {input.dataset_package} \
--fields {params.ncbi_datasets_fields:q} \
--elide-header \
| csvtk fix-quotes -Ht \
| csvtk add-header -t -n {params.ncbi_datasets_fields:q} \
| csvtk rename -t -f accession -n accession-rev \
| csvtk -tl mutate -f accession-rev -n accession -p "^(.+?)\." \
| csvtk -t mutate -f accession-rev -n accession -p "^(.+?)\." \
| csvtk del-quotes -t \
| tsv-select -H -f accession --rest last \
> {output.ncbi_dataset_tsv}
"""
Expand Down

0 comments on commit 0c542de

Please sign in to comment.