@@ -120,6 +120,59 @@ rule general_NV_description:
120120 "../scripts/report/NV_description.R"
121121
122122
123+ rule context_phylogeny_data :
124+ conda : "../envs/renv.yaml"
125+ params :
126+ design = config ["PLOTS" ],
127+ ref_name = config ["ALIGNMENT_REFERENCE" ],
128+ boot_th = 95.0 ,
129+ alrt_th = 80.0 ,
130+ input :
131+ target_fasta = OUTDIR / f"{ OUTPUT_NAME } .fasta" ,
132+ tree = OUTDIR / f"tree_context/{ OUTPUT_NAME } .treefile" ,
133+ output :
134+ json = REPORT_DIR_TABLES / "context_phylogeny.json" ,
135+ annotation = REPORT_DIR_TABLES / "context_phylogeny.csv" ,
136+ log :
137+ LOGDIR / "context_phylogeny_data" / "log.txt"
138+ script :
139+ "../scripts/report/context_phylogeny_data.R"
140+
141+
142+ rule context_phylogeny_plot :
143+ conda : "../envs/renv.yaml"
144+ params :
145+ design = config ["PLOTS" ],
146+ plot_height_mm = 119.4 ,
147+ plot_width_mm = 159.2 ,
148+ input :
149+ tree = OUTDIR / f"tree_context/{ OUTPUT_NAME } .treefile" ,
150+ json = REPORT_DIR_TABLES / "context_phylogeny.json" ,
151+ annotation = REPORT_DIR_TABLES / "context_phylogeny.csv"
152+ output :
153+ plot = report (REPORT_DIR_PLOTS / "context_phylogeny.png" ),
154+ log :
155+ LOGDIR / "context_phylogeny_plot" / "log.txt"
156+ script :
157+ "../scripts/report/context_phylogeny_plot.R"
158+
159+
160+ # rule allele_freq_phylogeny_data: # nj
161+ # ...
162+
163+
164+ # rule allele_freq_phylogeny_plot:
165+ # ...
166+
167+
168+ # rule time_signal_data: # tempest
169+ # ...
170+
171+
172+ # rule time_signal_plot: # tempest
173+ # ...
174+
175+
123176rule phylo_plots :
124177 conda : "../envs/renv.yaml"
125178 params :
@@ -131,14 +184,13 @@ rule phylo_plots:
131184 plot_width_mm = 159.2 ,
132185 use_bionj = config ["USE_BIONJ" ]
133186 input :
134- dist = REPORT_DIR_TABLES / f"figure_8 .csv" ,
187+ dist = REPORT_DIR_TABLES / f"distances .csv" ,
135188 study_fasta = OUTDIR / f"{ OUTPUT_NAME } .fasta" ,
136189 ml = OUTDIR / f"tree_context/{ OUTPUT_NAME } .treefile" ,
137190 metadata = config ["METADATA" ]
138191 output :
139192 temest = report (REPORT_DIR_PLOTS / "figure_9.png" ),
140193 tree = report (REPORT_DIR_PLOTS / "figure_8.png" ),
141- tree_ml = report (REPORT_DIR_PLOTS / "figure_2.png" ),
142194 table = report (REPORT_DIR_TABLES / "figure_9.csv" ),
143195 json = temp (OUTDIR / "stats.lm.json" )
144196 log :
@@ -204,7 +256,7 @@ rule report:
204256 input :
205257 qmd = Path (config ["REPORT_QMD" ]).resolve (),
206258 demix = report (REPORT_DIR_PLOTS / "demix.png" ),
207- tree_ml = report (REPORT_DIR_PLOTS / "figure_2 .png" ),
259+ tree_ml = report (REPORT_DIR_PLOTS / "context_phylogeny .png" ),
208260 diversity = report (REPORT_DIR_PLOTS / "diversity.png" ),
209261 fig_cor = report (REPORT_DIR_PLOTS / "figure_4.png" ),
210262 SNV = report (REPORT_DIR_PLOTS / "figure_5a.png" ),
@@ -219,6 +271,7 @@ rule report:
219271 freyja_ts = OUTDIR / "demixing" / "freyja_data" / "last_barcode_update.txt" ,
220272 value = REPORT_DIR_TABLES / "diversity.json" ,
221273 stats_lm = OUTDIR / "stats.lm.json" ,
274+ stats_ml = REPORT_DIR_TABLES / "context_phylogeny.json" ,
222275 table = OUTDIR / "summary_table.csv" ,
223276 sum_nv = OUTDIR / "summary_nv.json" ,
224277 params :
@@ -258,6 +311,7 @@ rule report:
258311 "tree_ml = '{input.tree_ml}', "
259312 "fig_cor_snp = '{input.fig_cor}', "
260313 "stats_lm = '{input.stats_lm}', "
314+ "stats_ml = '{input.stats_ml}', "
261315 "table = '{input.table}', "
262316 "sum_nv = '{input.sum_nv}', "
263317 "heat_tab = '{input.heat_table}', "
0 commit comments