Skip to content

Commit

Permalink
Replace csvtk concat with augur merge
Browse files Browse the repository at this point in the history
Use our own tooling designed for this type of operation.

There is a slight change in behavior: augur merge adds quotes around
values with spaces whereas csvtk doesn't, but I think that's ok.
  • Loading branch information
victorlin committed Dec 7, 2024
1 parent 41991ff commit 14b8963
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions phylogenetic/rules/merge_sequences_usvi.smk
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ rule append_usvi:
"""
cat {input.sequences} {input.usvi_sequences} > {output.sequences}
csvtk concat -tl {input.metadata} {input.usvi_metadata} \
| tsv-select -H -f accession --rest last \
> {output.metadata}
augur merge \
--metadata ingest={input.metadata} usvi={input.usvi_metadata} \
--metadata-id-columns accession \
--output-metadata {output.metadata}
"""

0 comments on commit 14b8963

Please sign in to comment.