@@ -39,6 +39,7 @@ cat(readChar(file_param, 1e5))
3939
4040update_pr2 = FALSE
4141update_new_primer_sets = FALSE
42+ update_stats_primer_sets = FALSE
4243
4344# ===========================================================
4445# Primer database
@@ -116,7 +117,7 @@ export(primer_sets, file = here(file_name), firstActiveRow = 2)
116117
117118
118119# ===========================================================
119- # PR2 database version 4.12.
120+ # Update PR2 database - current version 4.12.
120121# ===========================================================
121122
122123if (update_pr2 ){
@@ -145,9 +146,9 @@ if (update_pr2){
145146
146147# ===========================================================
147148# Build the file for all primer sets
149+ #
150+ # Note: This is to be done only when new primer sets are computed
148151# ===========================================================
149-
150- # This is to be done only when new primer sets are computed
151152
152153if (update_new_primer_sets ){
153154
@@ -180,8 +181,17 @@ if (update_new_primer_sets){
180181
181182}
182183
184+
183185# ===========================================================
184- # Update primer sets and create labels
186+ # Update primer sets stats
187+ #
188+ # Note: This is to be done only when new primer sets are computed
189+ # ===========================================================
190+
191+
192+ if (update_stats_primer_sets ){
193+ # ===========================================================
194+ # 1- Update primer sets and create labels
185195# ===========================================================
186196
187197primer_sets <- primer_sets %> %
@@ -214,7 +224,7 @@ primer_sets_labels <- primer_sets %>%
214224 specificity )
215225
216226# ===========================================================
217- # Summarize matches
227+ # 2 - Summarize matches
218228# ===========================================================
219229
220230pr2_match_final <- readRDS(file = here(str_c(" R_paper/output/pr2_match_" , gene_selected ," _mismatches_" , max_mismatch , " .rds" )))
@@ -333,4 +343,8 @@ pr2_match_final <- readRDS(file=here(str_c("R_paper/output/pr2_match_", gene_sel
333343
334344 saveRDS(pr2_match_summary_primer_set , file = here(str_c(" R_paper/output/pr2_match_" , gene_selected ," _mismatches_" , max_mismatch , " _summary.rds" )))
335345 saveRDS(pr2_match_summary_primer_set_sg , file = here(str_c(" R_paper/output/pr2_match_" , gene_selected ," _mismatches_" , max_mismatch , " _summary_sg.rds" )))
336- saveRDS(pr2_match_summary_primer_set_class , file = here(str_c(" R_paper/output/pr2_match_" , gene_selected ," _mismatches_" , max_mismatch , " _summary_class.rds" )))
346+ saveRDS(pr2_match_summary_primer_set_class , file = here(str_c(" R_paper/output/pr2_match_" , gene_selected ," _mismatches_" , max_mismatch , " _summary_class.rds" )))
347+
348+ }
349+
350+
0 commit comments