Skip to content

Commit

Permalink
chore: replace snakemake message directives with comments
Browse files Browse the repository at this point in the history
This is a stylistic change to make the Snakemake code conform to documented
Nextstrain Snakemake Styleguide:

  Avoid the message rule attribute.
  When the message attribute is defined, Snakemake suppresses other
  critical details that otherwise get displayed by default (e.g., job id,
  rule name, input, output, etc.).
  • Loading branch information
j23414 committed May 12, 2023
1 parent 3b10860 commit 8545866
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rule files:
files = rules.files.params

rule parse:
message: "Parsing provided metadata & sequences into augur formats"
"""Parsing provided metadata & sequences into augur formats"""
input:
metadata = files.input_metadata,
sequences = files.input_sequences
Expand All @@ -34,11 +34,10 @@ rule parse:
"""

rule align:
message:
"""
Aligning sequences to {input.reference}
- filling gaps with N
"""
"""
Aligning sequences to {input.reference}
- filling gaps with N
"""
input:
sequences = "results/sequences.fasta",
reference = files.reference
Expand All @@ -55,7 +54,7 @@ rule align:
"""

rule tree:
message: "Building tree using IQ-TREE"
"""Building tree using IQ-TREE"""
input:
alignment = "results/aligned.fasta"
output:
Expand All @@ -68,11 +67,10 @@ rule tree:
"""

rule refine:
message:
"""
Refining tree to add names to internal nodes and inferring a timetree.
NOTE: this step can drop samples which are extreme outliers in the root-to-tip analysis
"""
"""
Refining tree to add names to internal nodes and inferring a timetree.
NOTE: this step can drop samples which are extreme outliers in the root-to-tip analysis
"""
input:
tree = "results/tree_raw.nwk",
alignment = "results/aligned.fasta",
Expand Down Expand Up @@ -102,7 +100,7 @@ rule refine:
"""

rule ancestral:
message: "Reconstructing ancestral sequences and mutations"
"""Reconstructing ancestral sequences and mutations"""
input:
tree = "results/tree.nwk",
alignment = "results/aligned.fasta",
Expand All @@ -120,7 +118,7 @@ rule ancestral:
"""

rule traits:
message: "Inferring ancestral traits for {params.columns!s}"
"""Inferring ancestral traits for {params.columns!s}"""
input:
tree = "results/tree.nwk",
metadata = "results/metadata.tsv",
Expand All @@ -140,7 +138,7 @@ rule traits:


rule export:
message: "Exporting data files for for auspice"
"""Exporting data files for for auspice"""
input:
tree = "results/tree.nwk",
metadata = "results/metadata.tsv",
Expand All @@ -166,7 +164,7 @@ rule export:
"""

rule clean:
message: "Removing directories: {params}"
"""Removing directories: {params}"""
params:
"results ",
"auspice"
Expand Down

0 comments on commit 8545866

Please sign in to comment.