From 3ddefcf046e4d2fd6c3e00eebe86ab82129d70bc Mon Sep 17 00:00:00 2001 From: Jennifer Chang Date: Mon, 12 Feb 2024 09:37:37 -0500 Subject: [PATCH] fixup: directly access serotype wildcard value Co-authored-by: Jover Lee --- ingest/workflow/snakemake_rules/split_serotypes.smk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ingest/workflow/snakemake_rules/split_serotypes.smk b/ingest/workflow/snakemake_rules/split_serotypes.smk index 6ac75767..6d22e887 100644 --- a/ingest/workflow/snakemake_rules/split_serotypes.smk +++ b/ingest/workflow/snakemake_rules/split_serotypes.smk @@ -24,11 +24,10 @@ rule split_by_ncbi_serotype: metadata = "results/metadata_{serotype}.tsv", sequences = "results/sequences_{serotype}.fasta" params: - ncbi_serotype = lambda wildcards: wildcards.serotype, id_field = config["transform"]["id_field"] shell: """ - if [[ "{params.ncbi_serotype}" == "all" ]]; then + if [[ "{wildcards.serotype}" == "all" ]]; then cp {input.metadata} {output.metadata} cp {input.sequences} {output.sequences} else @@ -36,7 +35,7 @@ rule split_by_ncbi_serotype: --sequences {input.sequences} \ --metadata {input.metadata} \ --metadata-id-columns {params.id_field} \ - --query "ncbi_serotype=='{params.ncbi_serotype}'" \ + --query "ncbi_serotype=='{wildcards.serotype}'" \ --output-sequences {output.sequences} \ --output-metadata {output.metadata} fi