-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ingest: properly handle TSVs with
csvtk
Following Nextstrain data format docs to update handling of TSVs with `csvtk`.¹ Instead of going through extra `csv2tsv`/`csvtk fix-quotes` commands, just replace `tsv-select` with `csvtk`. Note that NCBI uses IANA TSVs,² so the `dataformat` output must go through `csvtk fix-quotes` to be properly quoted as CSV-like TSVs. - `tsv-select` to subset columns is directly replaced with `csvtk cut -t`. - `tsv-select` to reorder columns is replaced with `csvtk mutate --at 1` to insert the new `accession` column as the first column. ¹ <https://docs.nextstrain.org/en/latest/reference/data-formats.html#id1> ² <https://www.ncbi.nlm.nih.gov/datasets/docs/v2/reference-docs/file-formats/metadata-files/about-json-and-tabular/>
- Loading branch information
1 parent
f55c6c2
commit 241b1bb
Showing
3 changed files
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters