Skip to content

Commit 7695535

Browse files
committed
[ebov-2025] root tree
also updates how we pass through parameters from the config to `augur refine` to allow more control
1 parent 24eac91 commit 7695535

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

phylogenetic/outbreak-specific/config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ build_params:
3030

3131
refine:
3232
timetree: false
33-
coalescent: skyline
34-
date_inference: marginal
33+
root: PP_000PHH3 # Yambuku_Mayinga_Reference, force-included in include.txt
34+
remove_outgroup: true
3535

3636
translate:
3737
reference: *Yambuku_Mayinga_Reference
@@ -71,6 +71,7 @@ build_params:
7171

7272
refine:
7373
timetree: true
74+
confidence: true
7475
coalescent: skyline
7576
date_inference: marginal
7677

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PP_000PHH3 # Reference / root. INSDC NC_002549. Yambuku 1976 outbreak.

phylogenetic/rules/construct_phylogeny.smk

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ rule refine:
5555
tree = "results/{build}/tree.nwk",
5656
node_data = "results/{build}/branch_lengths.json"
5757
params:
58-
coalescent = lambda w: config["build_params"][w.build]["refine"]["coalescent"],
59-
date_inference = lambda w: config["build_params"][w.build]["refine"]["date_inference"],
58+
coalescent = conditional_config("--coalescent", "refine", "coalescent"),
59+
date_inference = conditional_config("--date-inference", "refine", "date_inference"),
60+
confidence = conditional_config("--date-confidence", "refine", "confidence"),
6061
timetree = conditional_config("--timetree", "refine", "timetree"),
62+
root = conditional_config("--root", "refine", "root"),
63+
remove_outgroup = conditional_config("--remove-outgroup", "refine", "remove_outgroup"),
6164
id_column = config["id_column"],
6265
benchmark:
6366
"benchmarks/{build}/refine.txt"
@@ -72,10 +75,12 @@ rule refine:
7275
--alignment {input.alignment:q} \
7376
--metadata {input.metadata:q} \
7477
--metadata-id-columns {params.id_column:q} \
75-
--output-tree {output.tree:q} \
76-
--output-node-data {output.node_data:q} \
7778
{params.timetree:q} \
78-
--coalescent {params.coalescent:q} \
79-
--date-confidence \
80-
--date-inference {params.date_inference:q}
79+
{params.date_inference:q} \
80+
{params.coalescent:q} \
81+
{params.confidence:q} \
82+
{params.root:q} \
83+
{params.remove_outgroup:q} \
84+
--output-tree {output.tree:q} \
85+
--output-node-data {output.node_data:q}
8186
"""

0 commit comments

Comments
 (0)