Skip to content
Merged
2 changes: 2 additions & 0 deletions phylogenetic/Snakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
genes = ['N450', 'genome']

configfile: "defaults/config.yaml"

rule all:
Expand Down
12 changes: 6 additions & 6 deletions phylogenetic/rules/construct_phylogeny.smk
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ See Augur's usage docs for these commands for more details.
rule tree:
"""Building tree"""
input:
alignment = "results/aligned.fasta"
alignment = "results/aligned_{gene}.fasta"
output:
tree = "results/tree_raw.nwk"
tree = "results/tree_raw_{gene}.nwk"
shell:
"""
augur tree \
Expand All @@ -26,12 +26,12 @@ rule refine:
- filter tips more than {params.clock_filter_iqd} IQDs from clock expectation
"""
input:
tree = "results/tree_raw.nwk",
alignment = "results/aligned.fasta",
tree = "results/tree_raw_{gene}.nwk",
alignment = "results/aligned_{gene}.fasta",
metadata = "data/metadata.tsv"
output:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The temporal signal is much better in this build (and the build Trevor showed me) than the one we looked at mid-week - do you know what changed? This gives me more confidence that the (temporal) rooting is working ok for the N450 build - it's broadly similar to the genome build - and so there's no longer a need to start in "unrooted" view if you'd prefer to go back to the more typical rectangular view.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lower temporal signal for the tree I showed you last week seems to be related to the subsampling method I had used. Here is the subsampling method I used for that tree:

filter_N450:
group_by: "country year month"
sequences_per_group: 2
min_date: 1950
min_length: 400

And here is the clock view for a tree I generated today using that subsampling method:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed default display back to rooted time-tree in 862dbaf

tree = "results/tree.nwk",
node_data = "results/branch_lengths.json"
tree = "results/tree_{gene}.nwk",
node_data = "results/branch_lengths_{gene}.json"
params:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following deprecation notice is present when running refine:

        DEPRECATION WARNING. TreeTime.resolve_polytomies: You are resolving
        polytomies using the old 'greedy' mode. This is not well suited for large
        polytomies. Stochastic resolution will become the default in future
        versions. To switch now, rerun with the flag `--stochastic-resolve`. To
        keep using the greedy method in the future, run with `--greedy-resolve`

Especially for the N450 build where we will have large polytomies we should use --stochastic-resolve.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f39ba8b

coalescent = config["refine"]["coalescent"],
date_inference = config["refine"]["date_inference"],
Expand Down