Skip to content

Commit

Permalink
Assign clades using augur clades
Browse files Browse the repository at this point in the history
Clades are defined based on the "major clades" of Troupin et al 2016: https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1006041
  • Loading branch information
kimandrews committed Jan 2, 2025
1 parent 01f492a commit 717a487
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
51 changes: 51 additions & 0 deletions phylogenetic/defaults/clades.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
clade gene site alt
Africa-2 nuc 499 G
Africa-2 nuc 708 A
Africa-2 nuc 3746 G
Africa-2 nuc 3914 A
Africa-2 nuc 4440 C
Africa-2 nuc 4628 G
Africa-2 nuc 4844 A
Africa-3 nuc 332 A
Africa-3 nuc 392 A
Africa-3 nuc 821 T
Africa-3 nuc 1209 T
Africa-3 nuc 1258 G
Africa-3 nuc 4473 T
Africa-3 nuc 4940 A
Arctic-related nuc 248 T
Arctic-related nuc 1030 G
Arctic-related nuc 1036 A
Arctic-related nuc 3363 A
Arctic-related nuc 3494 T
Arctic-related nuc 3657 C
Arctic-related nuc 4775 C
Asian nuc 1471 A
Asian nuc 8234 C
Asian nuc 8837 G
Asian nuc 9038 G
Asian nuc 9113 G
Asian nuc 9773 T
Asian nuc 9965 T
Asian nuc 10773 A
Bat nuc 331 T
Bat nuc 413 A
Bat nuc 1879 C
Bat nuc 2449 C
Bat nuc 2594 A
Bat nuc 2955 G
Bat nuc 5083 T
Bat nuc 11189 T
Cosmopolitan nuc 781 A
Cosmopolitan nuc 1057 T
Cosmopolitan nuc 1470 A
Cosmopolitan nuc 3998 C
Cosmopolitan nuc 4697 A
Cosmopolitan nuc 4949 T
Indian Subcontinent nuc 1207 T
Indian Subcontinent nuc 3548 C
Indian Subcontinent nuc 5054 G
RAC-SK nuc 574 T
RAC-SK nuc 844 T
RAC-SK nuc 1207 C
RAC-SK nuc 3924 G
1 change: 1 addition & 0 deletions phylogenetic/defaults/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ files:
colors: "defaults/colors.tsv"
auspice_config: "defaults/auspice_config.json"
description: "defaults/description.md"
clades: "defaults/clades.tsv"
filter:
group_by: "country year"
sequences_per_group: 20
Expand Down
17 changes: 17 additions & 0 deletions phylogenetic/rules/annotate_phylogeny.smk
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ rule translate:
2>&1 | tee {log}
"""

rule clades:
input:
tree = "results/tree.nwk",
nt_muts = "results/nt_muts.json",
aa_muts = "results/aa_muts.json",
clade_defs = config["files"]["clades"]
output:
clades = "results/clades.json"
shell:
"""
augur clades \
--tree {input.tree} \
--mutations {input.nt_muts} {input.aa_muts} \
--clades {input.clade_defs} \
--output {output.clades}
"""

rule add_year_metadata:
input:
metadata = "data/metadata.tsv",
Expand Down
3 changes: 2 additions & 1 deletion phylogenetic/rules/export.smk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rule export:
branch_lengths = "results/branch_lengths.json",
nt_muts = "results/nt_muts.json",
aa_muts = "results/aa_muts.json",
clades = "results/clades.json",
year = "results/year.json",
colors = config["files"]["colors"],
auspice_config = config["files"]["auspice_config"],
Expand All @@ -31,7 +32,7 @@ rule export:
--tree {input.tree} \
--metadata {input.metadata} \
--metadata-id-columns {params.strain_id} \
--node-data {input.branch_lengths} {input.nt_muts} {input.aa_muts} {input.year} \
--node-data {input.branch_lengths} {input.nt_muts} {input.aa_muts} {input.year} {input.clades} \
--colors {input.colors} \
--auspice-config {input.auspice_config} \
--include-root-sequence-inline \
Expand Down

0 comments on commit 717a487

Please sign in to comment.