Skip to content

Commit cb85df3

Browse files
committed
insert epitope information into workflow
1 parent 032ea5d commit cb85df3

File tree

17 files changed

+1308
-124
lines changed

17 files changed

+1308
-124
lines changed

Snakefile

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,55 @@
1+
import pandas as pd
2+
13
configfile: "config/configfile.yaml"
24

5+
36
wildcard_constraints:
4-
a_or_b = r"a|b"
7+
a_or_b=r"a|b",
8+
9+
10+
build_dir = "results"
11+
auspice_dir = "auspice"
12+
13+
distance_map_config = pd.read_table("config/distance_maps.tsv")
514

6-
build_dir = 'results'
7-
auspice_dir = 'auspice'
815

916
rule all:
1017
input:
11-
expand("auspice/rsv_{subtype}_{build}_{resolution}.json",
12-
subtype = config.get("subtypes",['a']),
13-
build = config.get("builds_to_run", ['genome']),
14-
resolution = config.get("resolutions_to_run", ["all-time"])),
18+
expand(
19+
"auspice/rsv_{subtype}_{build}_{resolution}.json",
20+
subtype=config.get("subtypes", ["a"]),
21+
build=config.get("builds_to_run", ["genome"]),
22+
resolution=config.get("resolutions_to_run", ["all-time"]),
23+
),
1524

16-
include: "workflow/snakemake_rules/chores.smk"
1725

18-
include: "workflow/snakemake_rules/core.smk"
26+
# include: "workflow/snakemake_rules/chores.smk"
1927

20-
include: "workflow/snakemake_rules/export.smk"
2128

29+
include: "workflow/snakemake_rules/core.smk"
30+
include: "workflow/snakemake_rules/export.smk"
2231
include: "workflow/snakemake_rules/download.smk"
23-
2432
include: "workflow/snakemake_rules/glycosylation.smk"
25-
2633
include: "workflow/snakemake_rules/clades.smk"
2734

2835

2936
if "deploy_url" in config:
37+
3038
include: "workflow/snakemake_rules/nextstrain_automation.smk"
3139

40+
3241
rule clean:
3342
params:
34-
targets = ["auspice", "results"]
43+
targets=["auspice", "results"],
3544
shell:
3645
"""
3746
rm -rf {params.targets}
3847
"""
3948

49+
4050
rule clobber:
4151
params:
42-
targets = ["data", "auspice", "results"]
52+
targets=["data", "auspice", "results"],
4353
shell:
4454
"""
4555
rm -rf {params.targets}

config/auspice_config.json

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
22
"title": "Genomic epidemiology of RSV",
33
"maintainers": [
4-
{"name": "Laura Urbanska", "url": "http://nextstrain.org"},
5-
{"name": "Richard Neher", "url": "http://nextstrain.org"}
6-
4+
{
5+
"name": "Laura Urbanska",
6+
"url": "http://nextstrain.org"
7+
},
8+
{
9+
"name": "Richard Neher",
10+
"url": "http://nextstrain.org"
11+
}
712
],
813
"data_provenance": [
914
{
@@ -12,7 +17,6 @@
1217
}
1318
],
1419
"build_url": "https://github.com/nextstrain/rsv",
15-
1620
"colorings": [
1721
{
1822
"key": "gt",
@@ -38,24 +42,70 @@
3842
"key": "glyc",
3943
"title": "Glycosylation",
4044
"type": "ordinal"
41-
} ],
45+
},
46+
{
47+
"key": "epi_00",
48+
"title": "Epitope 0",
49+
"type": "continuous"
50+
},
51+
{
52+
"key": "epi_01",
53+
"title": "Epitope 1",
54+
"type": "continuous"
55+
},
56+
{
57+
"key": "epi_02",
58+
"title": "Epitope 2",
59+
"type": "continuous"
60+
},
61+
{
62+
"key": "epi_03",
63+
"title": "Epitope 3",
64+
"type": "continuous"
65+
},
66+
{
67+
"key": "epi_04",
68+
"title": "Epitope 4",
69+
"type": "continuous"
70+
},
71+
{
72+
"key": "epi_05",
73+
"title": "Epitope 5",
74+
"type": "continuous"
75+
},
76+
{
77+
"key": "epi_all",
78+
"title": "All Epitopes",
79+
"type": "continuous"
80+
},
81+
{
82+
"key": "surface_residues_postf",
83+
"title": "Postfusion Surface Residues",
84+
"type": "continuous"
85+
},
86+
{
87+
"key": "surface_residues_pref",
88+
"title": "Prefusion Surface Residues",
89+
"type": "continuous"
90+
}
91+
],
4292
"geo_resolutions": [
4393
"country",
4494
"region"
4595
],
4696
"panels": [
47-
"tree",
48-
"map",
49-
"entropy"
97+
"tree",
98+
"map",
99+
"entropy"
50100
],
51101
"display_defaults": {
52102
"map_triplicate": true,
53-
"color_by" : "clade_membership",
103+
"color_by": "clade_membership",
54104
"transmission_lines": false
55-
},
105+
},
56106
"filters": [
57107
"country",
58108
"region",
59109
"clade_membership"
60110
]
61-
}
111+
}

config/configfile.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ refine:
5353
ancestral:
5454
inference: "joint"
5555

56+
cds:
57+
F: "F"
58+
G: "G"
59+
genome: "F"
60+
5661
traits:
5762
columns: "country"
5863

config/distance_maps.tsv

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
a_or_b build_name resolution compare_to attribute distance_map
2+
a F all-time root epi_00 epi_00
3+
a F all-time root epi_01 epi_01
4+
a F all-time root epi_02 epi_02
5+
a F all-time root epi_03 epi_03
6+
a F all-time root epi_04 epi_04
7+
a F all-time root epi_05 epi_05
8+
a F all-time root epi_all epi_all
9+
a F all-time root surface_residues_postf surface_residues_postf
10+
a F all-time root surface_residues_pref surface_residues_pref
11+
b F all-time root epi_00 epi_00
12+
b F all-time root epi_01 epi_01
13+
b F all-time root epi_02 epi_02
14+
b F all-time root epi_03 epi_03
15+
b F all-time root epi_04 epi_04
16+
b F all-time root epi_05 epi_05
17+
b F all-time root epi_all epi_all
18+
b F all-time root surface_residues_postf surface_residues_postf
19+
b F all-time root surface_residues_pref surface_residues_pref
20+
a F 3y root epi_00 epi_00
21+
a F 3y root epi_01 epi_01
22+
a F 3y root epi_02 epi_02
23+
a F 3y root epi_03 epi_03
24+
a F 3y root epi_04 epi_04
25+
a F 3y root epi_05 epi_05
26+
a F 3y root epi_all epi_all
27+
a F 3y root surface_residues_postf surface_residues_postf
28+
a F 3y root surface_residues_pref surface_residues_pref
29+
b F 3y root epi_00 epi_00
30+
b F 3y root epi_01 epi_01
31+
b F 3y root epi_02 epi_02
32+
b F 3y root epi_03 epi_03
33+
b F 3y root epi_04 epi_04
34+
b F 3y root epi_05 epi_05
35+
b F 3y root epi_all epi_all
36+
b F 3y root surface_residues_postf surface_residues_postf
37+
b F 3y root surface_residues_pref surface_residues_pref
38+
a F 6y root epi_00 epi_00
39+
a F 6y root epi_01 epi_01
40+
a F 6y root epi_02 epi_02
41+
a F 6y root epi_03 epi_03
42+
a F 6y root epi_04 epi_04
43+
a F 6y root epi_05 epi_05
44+
a F 6y root epi_all epi_all
45+
a F 6y root surface_residues_postf surface_residues_postf
46+
a F 6y root surface_residues_pref surface_residues_pref
47+
b F 6y root epi_00 epi_00
48+
b F 6y root epi_01 epi_01
49+
b F 6y root epi_02 epi_02
50+
b F 6y root epi_03 epi_03
51+
b F 6y root epi_04 epi_04
52+
b F 6y root epi_05 epi_05
53+
b F 6y root epi_all epi_all
54+
b F 6y root surface_residues_postf surface_residues_postf
55+
b F 6y root surface_residues_pref surface_residues_pref
56+

config/distance_maps/F/epi_00.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"default": 0,
3+
"map": {
4+
"F": {
5+
"62": 1,
6+
"63": 1,
7+
"64": 1,
8+
"65": 1,
9+
"66": 1,
10+
"67": 1,
11+
"68": 1,
12+
"69": 1,
13+
"196": 1,
14+
"197": 1,
15+
"198": 1,
16+
"199": 1,
17+
"200": 1,
18+
"201": 1,
19+
"202": 1,
20+
"203": 1,
21+
"204": 1,
22+
"205": 1,
23+
"206": 1,
24+
"207": 1,
25+
"208": 1,
26+
"209": 1,
27+
"210": 1
28+
}
29+
},
30+
"name": "epi_00"
31+
}

config/distance_maps/F/epi_01.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"default": 0,
3+
"map": {
4+
"F": {
5+
"31": 1,
6+
"378": 1,
7+
"344": 1,
8+
"380": 1
9+
}
10+
},
11+
"name": "epi_01"
12+
}

config/distance_maps/F/epi_02.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"default": 0,
3+
"map": {
4+
"F": {
5+
"254": 1,
6+
"255": 1,
7+
"256": 1,
8+
"257": 1,
9+
"258": 1,
10+
"259": 1,
11+
"260": 1,
12+
"261": 1,
13+
"262": 1,
14+
"263": 1,
15+
"264": 1,
16+
"265": 1,
17+
"266": 1,
18+
"267": 1,
19+
"268": 1,
20+
"269": 1,
21+
"270": 1,
22+
"271": 1,
23+
"272": 1,
24+
"273": 1,
25+
"274": 1,
26+
"275": 1,
27+
"276": 1,
28+
"277": 1
29+
}
30+
},
31+
"name": "epi_02"
32+
}

config/distance_maps/F/epi_03.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"default": 0,
3+
"map": {
4+
"F": {
5+
"44": 1,
6+
"45": 1,
7+
"46": 1,
8+
"47": 1,
9+
"48": 1,
10+
"49": 1,
11+
"50": 1,
12+
"305": 1,
13+
"306": 1,
14+
"307": 1,
15+
"308": 1,
16+
"309": 1,
17+
"310": 1
18+
}
19+
},
20+
"name": "epi_03"
21+
}

config/distance_maps/F/epi_04.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"default": 0,
3+
"map": {
4+
"F": {
5+
"422": 1,
6+
"423": 1,
7+
"424": 1,
8+
"425": 1,
9+
"426": 1,
10+
"427": 1,
11+
"428": 1,
12+
"429": 1,
13+
"430": 1,
14+
"431": 1,
15+
"432": 1,
16+
"433": 1,
17+
"434": 1,
18+
"435": 1,
19+
"436": 1
20+
}
21+
},
22+
"name": "epi_04"
23+
}

0 commit comments

Comments
 (0)