Skip to content

Commit

Permalink
ingest/nextclade: Wrap csvtk with fix-quotes/del-quotes
Browse files Browse the repository at this point in the history
Similar to c0b9e50
we want to make sure csvtk does the right with the TSV file.
  • Loading branch information
joverlee521 committed Jul 13, 2024
1 parent b6f07a6 commit dc9ac25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ingest/rules/nextclade.smk
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ rule join_metadata_and_nextclade:
"""
export SUBSET_FIELDS=`grep -v '^#' {input.nextclade_field_map} | awk '{{print $1}}' | tr '\n' ',' | sed 's/,$//g'`
csvtk -tl cut -f $SUBSET_FIELDS \
csvtk fix-quotes -Ht \
{input.nextclade} \
| csvtk -tl rename2 \
| csvtk -t cut -f $SUBSET_FIELDS \
| csvtk -t rename2 \
-F \
-f '*' \
-p '(.+)' \
-r '{{kv}}' \
-k {input.nextclade_field_map} \
| csvtk del-quotes -t \
| tsv-join -H \
--filter-file - \
--key-fields {params.nextclade_id_field} \
Expand Down

0 comments on commit dc9ac25

Please sign in to comment.