Skip to content

Commit

Permalink
fixup replace: use a nextclade config section
Browse files Browse the repository at this point in the history
  • Loading branch information
j23414 committed Oct 11, 2023
1 parent 5b879a1 commit 9817e6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions ingest/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ transform:
annotations: 'source-data/annotations.tsv'
# ID field used to merge annotations
annotations_id: 'accession'
# Field to use as the sequence ID in the Nextclade file
nextclade_id_field: 'seqName'
# Field to use as the sequence ID in the FASTA file
id_field: 'accession'
# Field to use as the sequence in the FASTA file
Expand All @@ -68,3 +66,10 @@ transform:
'authors',
'institution'
]

# Params for Nextclade related rules
nextclade:
# Field to use as the sequence ID in the Nextclade file
id_field: 'seqName'
# Fields from a Nextclade file to be renamed (if desired) and appended to a metadata file
field_map: 'source-data/nextclade-field-map.tsv'
4 changes: 2 additions & 2 deletions ingest/workflow/snakemake_rules/nextclade.smk
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ rule join_metadata_clades:
input:
nextclade="data/nextclade.tsv",
metadata="data/metadata_raw.tsv",
nextclade_field_map="source-data/nextclade-field-map.tsv",
nextclade_field_map=config["nextclade"]["field_map"],
output:
metadata="data/metadata.tsv",
params:
id_field=config["transform"]["id_field"],
nextclade_id_field=config["transform"]["nextclade_id_field"],
nextclade_id_field=config["nextclade"]["id_field"],
shell:
"""
export SUBSET_FIELDS=`awk 'NR>1 {{print $1}}' {input.nextclade_field_map} | tr '\n' ',' | sed 's/,$//g'`
Expand Down

0 comments on commit 9817e6e

Please sign in to comment.