From 0c542de3739a310bba8495e611febc500743b781 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Thu, 2 May 2024 11:15:24 -0700 Subject: [PATCH] ingest: fix csvtk quotes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The automated ingest workflow failed with a csvtk quoting error.¹ Following https://github.com/nextstrain/docker-base/pull/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 --- ingest/rules/fetch_from_ncbi.smk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ingest/rules/fetch_from_ncbi.smk b/ingest/rules/fetch_from_ncbi.smk index c775819..3c32e42 100644 --- a/ingest/rules/fetch_from_ncbi.smk +++ b/ingest/rules/fetch_from_ncbi.smk @@ -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} """