Skip to content

Commit

Permalink
wip: try rooting by two nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
j23414 committed Jun 10, 2024
1 parent 03aea77 commit 2b5a0fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions nextclade/config/config_dengue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ outgroup: "config/outgroup.fasta"
refine:
root_id:
all: "Reconstructed_root_sequence_of_https_nextstrain_org_dengue/all/genome"
denv1: "Reconstructed_root_sequence_of_https_nextstrain_org_dengue/denv1/genome"
denv2: "Reconstructed_root_sequence_of_https_nextstrain_org_dengue/denv2/genome"
denv3: "Reconstructed_root_sequence_of_https_nextstrain_org_dengue/denv3/genome"
denv4: "Reconstructed_root_sequence_of_https_nextstrain_org_dengue/denv4/genome"
denv1: ['Reconstructed_root_sequence_of_https_nextstrain_org_dengue/denv1/genome', 'Reconstructed_root_sequence_of_https_nextstrain_org_dengue/all/genome']
denv2: ['Reconstructed_root_sequence_of_https_nextstrain_org_dengue/denv2/genome', 'Reconstructed_root_sequence_of_https_nextstrain_org_dengue/all/genome']
denv3: ['Reconstructed_root_sequence_of_https_nextstrain_org_dengue/denv3/genome', 'Reconstructed_root_sequence_of_https_nextstrain_org_dengue/all/genome']
denv4: ['Reconstructed_root_sequence_of_https_nextstrain_org_dengue/denv4/genome', 'Reconstructed_root_sequence_of_https_nextstrain_org_dengue/all/genome']

traits:
sampling_bias_correction: '3'
Expand Down
8 changes: 4 additions & 4 deletions nextclade/rules/construct_phylogeny.smk
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ rule refine:
date_inference = "marginal",
clock_filter_iqd = 4,
strain_id = config.get("strain_id_field", "strain"),
root_flag = lambda wildcard: (
f"--root '{config['refine']['root_id'][wildcard.serotype]}'"
root_args = lambda wildcard: (
" ".join(f"'{id}'" for id in config['refine']['root_id'][wildcard.serotype])
if wildcard.serotype in config["refine"]['root_id']
else "--root min_dev"
else "min_dev"
)
shell:
"""
Expand All @@ -63,5 +63,5 @@ rule refine:
--divergence-unit mutations \
--keep-polytomies \
--use-fft \
{params.root_flag}
--root {params.root_args}
"""

0 comments on commit 2b5a0fc

Please sign in to comment.