@@ -95,6 +95,20 @@ rule diversity_plot:
9595 "../scripts/report/diversity_plot.R"
9696
9797
98+ rule extract_genbank_regions :
99+ conda : "../envs/biopython.yaml"
100+ params :
101+ gb_qualifier = "gene" ,
102+ input :
103+ gb = OUTDIR / "reference.cds.gb" ,
104+ output :
105+ regions = temp (REPORT_DIR_TABLES / "genbank_regions.json" ),
106+ log :
107+ LOGDIR / "extract_genbank_regions" / "log.txt"
108+ script :
109+ "../scripts/report/extract_genbank_regions.py"
110+
111+
98112rule general_NV_description :
99113 conda : "../envs/renv.yaml"
100114 params :
@@ -104,15 +118,15 @@ rule general_NV_description:
104118 step = config ["WINDOW" ]["STEP" ],
105119 max_alt_freq = 1.0 - config ["VC" ]["IVAR_FREQ" ]
106120 input :
107- coordinates = config [ "COORDINATES_JSON" ] ,
121+ coordinates = REPORT_DIR_TABLES / "genbank_regions.json" ,
108122 regions = config ["PLOT_GENOME_REGIONS" ],
109123 window = OUTDIR / f"{ OUTPUT_NAME } .window.csv" ,
110124 vcf = OUTDIR / f"{ OUTPUT_NAME } .variants.tsv" ,
111125 metadata = config ["METADATA" ]
112126 output :
113- fig = report (REPORT_DIR_PLOTS / "figure_5a.png" ),
114- fig_s = report (REPORT_DIR_PLOTS / "figure_5b.png" ),
115- fig_cor = report (REPORT_DIR_PLOTS / "figure_4.png" ),
127+ fig = report (REPORT_DIR_PLOTS / "figure_5a.png" ), # panel
128+ fig_s = report (REPORT_DIR_PLOTS / "figure_5b.png" ), # panel spike
129+ fig_cor = report (REPORT_DIR_PLOTS / "figure_4.png" ), # SNPs vs time
116130 json = temp (OUTDIR / "summary_nv.json" ),
117131 table_1 = report (REPORT_DIR_TABLES / "figure_5a.csv" ),
118132 table_2 = report (REPORT_DIR_TABLES / "figure_5b.csv" ),
0 commit comments