Skip to content

Commit

Permalink
Use raw, triple-quoted shell blocks
Browse files Browse the repository at this point in the history
Per Nextstrain's Snakemake style guide.¹

I checked most strings for escape sequences but did not check the
complex ones that use params which get values dynamically from
function calls.

¹ https://docs.nextstrain.org/en/latest/reference/snakemake-style-guide.html#use-triple-quoted-command-definitions
  • Loading branch information
victorlin committed Aug 23, 2024
1 parent 408eef1 commit 9eee5e3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 46 deletions.
6 changes: 3 additions & 3 deletions workflow/snakemake_rules/export_for_nextstrain.smk
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ rule export_all_regions:
mem_mb=lambda wildcards, input: 5 * int(input.metadata.size / 1024 / 1024)
conda: config["conda_environment"]
shell:
"""
r"""
python3 ./scripts/check_missing_locations.py \
--metadata {input.metadata} \
--colors {input.colors} \
Expand Down Expand Up @@ -113,7 +113,7 @@ rule mutation_summary:
genes=config["genes"],
conda: config["conda_environment"]
shell:
"""
r"""
python3 scripts/mutation_summary.py \
--alignment {input.alignment} \
--insertions {input.insertions} \
Expand Down Expand Up @@ -345,7 +345,7 @@ rule dated_json:
date = r"\d{4}-\d{2}-\d{2}"
conda: config["conda_environment"]
shell:
"""
r"""
cp {input.auspice_json} {output.dated_auspice_json}
cp {input.tip_frequencies_json} {output.dated_tip_frequencies_json}
cp {input.root_sequence_json} {output.dated_root_sequence_json}
Expand Down
Loading

0 comments on commit 9eee5e3

Please sign in to comment.