From bd393f11ae575755b941d4358386390216538bdd Mon Sep 17 00:00:00 2001 From: Thomas Sibley Date: Wed, 4 Sep 2024 11:37:07 -0700 Subject: [PATCH] ingest: Use raw-string for Nextclade metadata merge rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Preserving the line-breaks makes the command much more readable in Snakemake output¹, which is important since I'm changing this rule right now. The \n previously interpreted by Python is now interpreted by `tr`, which is preferable. ¹ Ported-from: Related-to: Related-to: --- ingest/rules/nextclade.smk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingest/rules/nextclade.smk b/ingest/rules/nextclade.smk index 8bda056..3117028 100644 --- a/ingest/rules/nextclade.smk +++ b/ingest/rules/nextclade.smk @@ -72,7 +72,7 @@ rule join_metadata_and_nextclade: metadata_id_field=config["curate"]["output_id_field"], nextclade_id_field=config["nextclade"]["id_field"], shell: - """ + r""" export SUBSET_FIELDS=`grep -v '^#' {input.nextclade_field_map} | awk '{{print $1}}' | tr '\n' ',' | sed 's/,$//g'` csvtk -tl cut -f $SUBSET_FIELDS \