-
Notifications
You must be signed in to change notification settings - Fork 3
/
Snakefile
executable file
·137 lines (124 loc) · 2.91 KB
/
Snakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
samples = ["ERR260275", "ERR260214", "ERR260174"]
rule all:
input:
"data/growth_rates.csv",
"data/knockouts.csv",
"figures/gcs.svg",
"figures/circos.svg",
"figures/media.png",
"figures/elasticities.png"
rule collapse:
input:
"data/abundances.csv"
output:
"data/genera.csv"
threads: 1
script:
"workflows/genera.py"
rule build_models:
input:
"data/genera.csv",
"data/western_diet.csv"
output:
directory("data/models")
threads: 32
script:
"workflows/build_models.py"
rule build_species_models:
input:
"data/species.csv",
"data/western_diet.csv"
output:
directory("data/species_models")
threads: 32
script:
"workflows/build_models.py"
rule tradeoff:
input:
"data/models",
"data/recent.csv"
output:
"data/tradeoff.csv"
threads: 32
script:
"workflows/tradeoff.py"
rule media_and_rates:
input:
"data/models"
output:
"data/growth_rates.csv",
"data/minimal_imports.csv",
"data/minimal_fluxes.csv.gz"
threads: 32
script:
"workflows/media_and_gcs.py"
rule knockouts:
input:
"data/models"
output:
"data/knockouts.csv"
threads: 32
script:
"workflows/knockouts.py"
rule elasticities:
input:
"data/models"
output:
expand("data/elasticities_{s}.csv", s=samples)
threads: 3
script:
"workflows/elasticities.py"
rule tradeoff_figures:
input:
"data/replication_rates.csv",
"data/tradeoff.csv"
output:
"figures/dists.svg",
"figures/non_zero.svg",
"figures/percent_growing.svg",
"figures/within_sample_correlations.svg",
"figures/across_sample_correlations.svg"
threads: 1
script:
"workflows/tradeoff_figs.py"
rule rate_figures:
input:
"data/tradeoff.csv"
output:
"figures/gcs.svg",
"figures/rate_vs_abundance.png"
threads: 1
script:
"workflows/growth_rate_figs.py"
rule knockout_figures:
input:
"data/knockouts.csv"
output:
"figures/circos.svg"
threads: 1
script:
"workflows/knockout_figs.py"
rule exchange_figures:
input:
"data/growth_rates.csv",
"data/minimal_imports.csv",
"data/minimal_fluxes.csv.gz",
"data/metabolites.csv"
output:
"figures/media.png",
"figures/scfas_prod.svg",
"figures/scfas_consumption.svg",
"figures/scfas_net.svg",
"figures/scfas.svg",
"figures/individual_media.png"
threads: 1
script:
"workflows/exchange_figs.py"
rule elasticity_figures:
input:
expand("data/elasticities_{s}.csv", s=samples)
output:
"figures/elasticities.png"
threads: 1
script:
"workflows/elasticity_figs.py"