Skip to content

Commit

Permalink
Use a config file to define hardcoded parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
kimandrews committed Jan 12, 2024
1 parent a39398b commit 4b207bf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Snakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
configfile: "config/config.yaml"

rule all:
input:
auspice_json = "auspice/measles.json",
Expand Down Expand Up @@ -55,10 +57,10 @@ rule filter:
output:
sequences = "results/filtered.fasta"
params:
group_by = "country year month",
sequences_per_group = 20,
min_date = 1950,
min_length = 5000
group_by = config["filter"]["group_by"],
sequences_per_group = config["filter"]["sequences_per_group"],
min_date = config["filter"]["min_date"],
min_length = config["filter"]["min_length"]
shell:
"""
augur filter \
Expand Down Expand Up @@ -121,9 +123,9 @@ rule refine:
tree = "results/tree.nwk",
node_data = "results/branch_lengths.json"
params:
coalescent = "opt",
date_inference = "marginal",
clock_filter_iqd = 4
coalescent = config["refine"]["coalescent"],
date_inference = config["refine"]["date_inference"],
clock_filter_iqd = config["refine"]["clock_filter_iqd"]
shell:
"""
augur refine \
Expand All @@ -147,7 +149,7 @@ rule ancestral:
output:
node_data = "results/nt_muts.json"
params:
inference = "joint"
inference = config["ancestral"]["inference"]
shell:
"""
augur ancestral \
Expand Down
11 changes: 11 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
filter:
group_by: "country year month"
sequences_per_group: 20
min_date: 1950
min_length: 5000
refine:
coalescent: "opt"
date_inference: "marginal"
clock_filter_iqd: 4
ancestral:
inference: "joint"

0 comments on commit 4b207bf

Please sign in to comment.