@@ -4,7 +4,7 @@ rule demix_plot_data:
44 summary_demixing = "<results>/<dataset>/demixing/summary.csv" ,
55 metadata = config ["METADATA" ]
66 output :
7- data = REPORT_DIR_TABLES / " demix.csv"
7+ data = "<results>/<dataset>/report/tables/ demix.csv"
88 log :
99 "<logs>/<dataset>/demix_plot_data/log.txt"
1010 script :
@@ -18,9 +18,9 @@ rule demix_plot:
1818 plot_width_mm = 159.2 ,
1919 plot_height_mm = 119.4 ,
2020 input :
21- data = REPORT_DIR_TABLES / " demix.csv"
21+ data = "<results>/<dataset>/report/tables/ demix.csv"
2222 output :
23- plot = report (REPORT_DIR_PLOTS / " demix.png" )
23+ plot = report ("<results>/<dataset>/report/plots/ demix.png" )
2424 log :
2525 "<logs>/<dataset>/demix_plot/log.txt"
2626 script :
@@ -38,8 +38,8 @@ rule diversity_data:
3838 study_fasta = "<results>/<dataset>/aligned.masked.fasta" ,
3939 context_fasta = "<results>/<dataset>/context/nextalign/context_sequences.aligned.masked.fasta" ,
4040 output :
41- divs = REPORT_DIR_TABLES / " diversity.txt" ,
42- json = REPORT_DIR_TABLES / " diversity.json" ,
41+ divs = "<results>/<dataset>/report/tables/ diversity.txt" ,
42+ json = "<results>/<dataset>/report/tables/ diversity.json" ,
4343 log :
4444 "<logs>/<dataset>/diversity_data/log.txt"
4545 script :
@@ -54,10 +54,10 @@ rule diversity_plot:
5454 plot_width_mm = 159.2 ,
5555 plot_height_mm = 119.4 ,
5656 input :
57- divs = REPORT_DIR_TABLES / " diversity.txt" ,
58- json = REPORT_DIR_TABLES / " diversity.json" ,
57+ divs = "<results>/<dataset>/report/tables/ diversity.txt" ,
58+ json = "<results>/<dataset>/report/tables/ diversity.json" ,
5959 output :
60- plot = report (REPORT_DIR_PLOTS / " diversity.png" ),
60+ plot = report ("<results>/<dataset>/report/plots/ diversity.png" ),
6161 log :
6262 "<logs>/<dataset>/diversity_plot/log.txt"
6363 script :
@@ -71,7 +71,7 @@ rule extract_genbank_regions:
7171 input :
7272 gb = "<results>/<dataset>/reference.cds.gb" ,
7373 output :
74- regions = temp (REPORT_DIR_TABLES / " genbank_regions.json" ),
74+ regions = temp ("<results>/<dataset>/report/tables/ genbank_regions.json" ),
7575 log :
7676 "<logs>/<dataset>/extract_genbank_regions/log.txt"
7777 script :
@@ -85,9 +85,9 @@ rule polymorphic_sites_over_time_plot:
8585 plot_width_mm = 159.2 ,
8686 plot_height_mm = 119.4 ,
8787 input :
88- table = REPORT_DIR_PLOTS / " polymorphic_sites_over_time.csv" ,
88+ table = "<results>/<dataset>/report/tables/ polymorphic_sites_over_time.csv" ,
8989 output :
90- plot = report (REPORT_DIR_PLOTS / " polymorphic_sites_over_time.png" ),
90+ plot = report ("<results>/<dataset>/report/plots/ polymorphic_sites_over_time.png" ),
9191 log :
9292 "<logs>/<dataset>/polymorphic_sites_over_time_plot/log.txt"
9393 script :
@@ -102,12 +102,12 @@ rule nv_panel_plot:
102102 plot_height_mm = 250.0 ,
103103 plot_width_mm = 240.0 ,
104104 input :
105- panel = REPORT_DIR_TABLES / " nv_panel.csv" ,
106- window = REPORT_DIR_TABLES / " window.csv" ,
107- regions = REPORT_DIR_TABLES / " genbank_regions.json" ,
105+ panel = "<results>/<dataset>/report/tables/ nv_panel.csv" ,
106+ window = "<results>/<dataset>/report/tables/ window.csv" ,
107+ regions = "<results>/<dataset>/report/tables/ genbank_regions.json" ,
108108 highlight_window_regions = config ["PLOT_GENOME_REGIONS" ],
109109 output :
110- plot = report (REPORT_DIR_PLOTS / " nv_panel.png" ),
110+ plot = report ("<results>/<dataset>/report/plots/ nv_panel.png" ),
111111 log :
112112 "<logs>/<dataset>/nv_panel_plot/log.txt"
113113 script :
@@ -116,23 +116,23 @@ rule nv_panel_plot:
116116
117117use rule nv_panel_plot as nv_panel_plot_S with :
118118 input :
119- panel = REPORT_DIR_TABLES / " nv_panel.S.csv" ,
120- window = REPORT_DIR_TABLES / " window.S.csv" ,
121- regions = REPORT_DIR_TABLES / " genbank_regions.json" ,
119+ panel = "<results>/<dataset>/report/tables/ nv_panel.S.csv" ,
120+ window = "<results>/<dataset>/report/tables/ window.S.csv" ,
121+ regions = "<results>/<dataset>/report/tables/ genbank_regions.json" ,
122122 highlight_window_regions = "<results>/<dataset>/empty.txt" ,
123123 output :
124- plot = report (REPORT_DIR_PLOTS / " nv_panel.S.png" ),
124+ plot = report ("<results>/<dataset>/report/plots/ nv_panel.S.png" ),
125125 log :
126126 "<logs>/<dataset>/nv_panel_plot_S/log.txt"
127127
128128
129129rule merge_json_files :
130130 input :
131- REPORT_DIR_TABLES / " nv_panel.json" ,
132- REPORT_DIR_TABLES / " polymorphic_sites_over_time.json" ,
133- REPORT_DIR_TABLES / " window.json" ,
131+ "<results>/<dataset>/report/tables/ nv_panel.json" ,
132+ "<results>/<dataset>/report/tables/ polymorphic_sites_over_time.json" ,
133+ "<results>/<dataset>/report/tables/ window.json" ,
134134 output :
135- json = REPORT_DIR_TABLES / " nv_panel_summary.json" ,
135+ json = "<results>/<dataset>/report/tables/ nv_panel_summary.json" ,
136136 run :
137137 import json
138138 result = {}
@@ -155,8 +155,8 @@ rule context_phylogeny_data:
155155 target_fasta = "<results>/<dataset>/sequences.fasta" ,
156156 tree = "<results>/<dataset>/tree_context/context.treefile" ,
157157 output :
158- json = REPORT_DIR_TABLES / " context_phylogeny.json" ,
159- annotation = REPORT_DIR_TABLES / " context_phylogeny.csv" ,
158+ json = "<results>/<dataset>/report/tables/ context_phylogeny.json" ,
159+ annotation = "<results>/<dataset>/report/tables/ context_phylogeny.csv" ,
160160 log :
161161 "<logs>/<dataset>/context_phylogeny_data/log.txt"
162162 script :
@@ -173,10 +173,10 @@ rule context_phylogeny_plot:
173173 alrt_th = config ["SHALRT" ]["THRESHOLD" ],
174174 input :
175175 tree = "<results>/<dataset>/tree_context/context.treefile" ,
176- json = REPORT_DIR_TABLES / " context_phylogeny.json" ,
177- annotation = REPORT_DIR_TABLES / " context_phylogeny.csv"
176+ json = "<results>/<dataset>/report/tables/ context_phylogeny.json" ,
177+ annotation = "<results>/<dataset>/report/tables/ context_phylogeny.csv"
178178 output :
179- plot = report (REPORT_DIR_PLOTS / " context_phylogeny.png" ),
179+ plot = report ("<results>/<dataset>/report/plots/ context_phylogeny.png" ),
180180 log :
181181 "<logs>/<dataset>/context_phylogeny_plot/log.txt"
182182 script :
@@ -191,11 +191,11 @@ rule allele_freq_tree_plot:
191191 plot_height_mm = 119.4 ,
192192 plot_width_mm = 159.2 ,
193193 input :
194- tree = report (REPORT_DIR_TABLES / " allele_freq_tree.nwk" ),
194+ tree = report ("<results>/<dataset>/report/tables/ allele_freq_tree.nwk" ),
195195 study_fasta = "<results>/<dataset>/sequences.fasta" ,
196196 metadata = config ["METADATA" ],
197197 output :
198- plot = report (REPORT_DIR_PLOTS / " allele_freq_tree.png" ),
198+ plot = report ("<results>/<dataset>/report/plots/ allele_freq_tree.png" ),
199199 log :
200200 "<logs>/<dataset>/allele_freq_tree_plot/log.txt"
201201 script :
@@ -209,9 +209,9 @@ rule time_signal_plot:
209209 plot_height_mm = 119.4 ,
210210 plot_width_mm = 159.2 ,
211211 input :
212- table = report (REPORT_DIR_TABLES / " time_signal.csv" ),
212+ table = report ("<results>/<dataset>/report/tables/ time_signal.csv" ),
213213 output :
214- plot = report (REPORT_DIR_PLOTS / " time_signal.png" ),
214+ plot = report ("<results>/<dataset>/report/plots/ time_signal.png" ),
215215 log :
216216 "<logs>/<dataset>/time_signal_plot/log.txt"
217217 script :
@@ -227,8 +227,8 @@ rule dnds_plots:
227227 input :
228228 table = "<results>/<dataset>/dnds.csv" ,
229229 output :
230- plot_dn_ds = report (REPORT_DIR_PLOTS / " dn_and_ds.png" ),
231- plot_omega = report (REPORT_DIR_PLOTS / " dnds.png" ),
230+ plot_dn_ds = report ("<results>/<dataset>/report/plots/ dn_and_ds.png" ),
231+ plot_omega = report ("<results>/<dataset>/report/plots/ dnds.png" ),
232232 log :
233233 "<logs>/<dataset>/evo_plots/log.txt"
234234 script :
@@ -242,9 +242,9 @@ rule af_time_correlation_plot:
242242 plot_height_mm = 119.4 ,
243243 plot_width_mm = 159.2 ,
244244 input :
245- correlations = REPORT_DIR_TABLES / " af_time_correlation.csv" ,
245+ correlations = "<results>/<dataset>/report/tables/ af_time_correlation.csv" ,
246246 output :
247- plot = report (REPORT_DIR_PLOTS / " af_time_correlation.png" ),
247+ plot = report ("<results>/<dataset>/report/plots/ af_time_correlation.png" ),
248248 log :
249249 "<logs>/<dataset>/af_time_correlation_plot/log.txt"
250250 script :
@@ -260,10 +260,10 @@ rule af_trajectory_panel_plot:
260260 plot_width_mm = 159.2 ,
261261 random_color_seed = 7291 ,
262262 input :
263- fmt_variants = REPORT_DIR_TABLES / " variants.filled.dated.tsv" ,
264- subset = REPORT_DIR_TABLES / " af_time_correlation.subset.txt"
263+ fmt_variants = "<results>/<dataset>/report/tables/ variants.filled.dated.tsv" ,
264+ subset = "<results>/<dataset>/report/tables/ af_time_correlation.subset.txt"
265265 output :
266- plot = report (REPORT_DIR_PLOTS / " af_trajectory_panel.png" ),
266+ plot = report ("<results>/<dataset>/report/plots/ af_trajectory_panel.png" ),
267267 log :
268268 "<logs>/<dataset>/af_trajectory_panel_plot/log.txt"
269269 script :
@@ -276,7 +276,7 @@ rule summary_table:
276276 report = report ("<results>/<dataset>/lineage_report.csv" ),
277277 metadata = config ["METADATA" ]
278278 output :
279- table = REPORT_DIR_TABLES / " summary_table.csv"
279+ table = "<results>/<dataset>/report/tables/ summary_table.csv"
280280 log :
281281 "<logs>/<dataset>/summary_table/log.txt"
282282 script :
@@ -289,25 +289,25 @@ rule report:
289289 input :
290290 qmd = Path (config ["REPORT_QMD" ]).resolve (),
291291 css = Path (config ["REPORT_CSS" ]).resolve (),
292- demix = report (REPORT_DIR_PLOTS / " demix.png" ),
293- tree_ml = report (REPORT_DIR_PLOTS / " context_phylogeny.png" ),
294- diversity = report (REPORT_DIR_PLOTS / " diversity.png" ),
295- fig_cor = report (REPORT_DIR_PLOTS / " polymorphic_sites_over_time.png" ),
296- SNV = report (REPORT_DIR_PLOTS / " nv_panel.png" ),
297- SNV_spike = report (REPORT_DIR_PLOTS / " nv_panel.S.png" ),
298- volcano = report (REPORT_DIR_PLOTS / " af_time_correlation.png" ),
299- panel = report (REPORT_DIR_PLOTS / " af_trajectory_panel.png" ),
300- tree = report (REPORT_DIR_PLOTS / " allele_freq_tree.png" ),
301- temest = report (REPORT_DIR_PLOTS / " time_signal.png" ),
302- evo = report (REPORT_DIR_PLOTS / " dn_and_ds.png" ),
303- omega_plot = report (REPORT_DIR_PLOTS / " dnds.png" ),
304- heat_table = report (REPORT_DIR_TABLES / " pairwise_trajectory_correlation_matrix.csv" ),
292+ demix = report ("<results>/<dataset>/report/plots/ demix.png" ),
293+ tree_ml = report ("<results>/<dataset>/report/plots/ context_phylogeny.png" ),
294+ diversity = report ("<results>/<dataset>/report/plots/ diversity.png" ),
295+ fig_cor = report ("<results>/<dataset>/report/plots/ polymorphic_sites_over_time.png" ),
296+ SNV = report ("<results>/<dataset>/report/plots/ nv_panel.png" ),
297+ SNV_spike = report ("<results>/<dataset>/report/plots/ nv_panel.S.png" ),
298+ volcano = report ("<results>/<dataset>/report/plots/ af_time_correlation.png" ),
299+ panel = report ("<results>/<dataset>/report/plots/ af_trajectory_panel.png" ),
300+ tree = report ("<results>/<dataset>/report/plots/ allele_freq_tree.png" ),
301+ temest = report ("<results>/<dataset>/report/plots/ time_signal.png" ),
302+ evo = report ("<results>/<dataset>/report/plots/ dn_and_ds.png" ),
303+ omega_plot = report ("<results>/<dataset>/report/plots/ dnds.png" ),
304+ heat_table = report ("<results>/<dataset>/report/tables/ pairwise_trajectory_correlation_matrix.csv" ),
305305 freyja_ts = "<results>/<dataset>/demixing/freyja_data/last_barcode_update.txt" ,
306- value = REPORT_DIR_TABLES / " diversity.json" ,
307- stats_lm = REPORT_DIR_TABLES / " time_signal.json" ,
308- stats_ml = REPORT_DIR_TABLES / " context_phylogeny.json" ,
309- table = REPORT_DIR_TABLES / " summary_table.csv" ,
310- sum_nv = REPORT_DIR_TABLES / " nv_panel_summary.json" ,
306+ value = "<results>/<dataset>/report/tables/ diversity.json" ,
307+ stats_lm = "<results>/<dataset>/report/tables/ time_signal.json" ,
308+ stats_ml = "<results>/<dataset>/report/tables/ context_phylogeny.json" ,
309+ table = "<results>/<dataset>/report/tables/ summary_table.csv" ,
310+ sum_nv = "<results>/<dataset>/report/tables/ nv_panel_summary.json" ,
311311 params :
312312 workflow_version = get_repo_version (Path (workflow .basedir ).parent , __version__ ),
313313 min_ivar_freq = config ["VC" ]["MIN_FREQ" ],
0 commit comments