Skip to content

Commit

Permalink
Revert "relist plate scoring functions and only use the functions of …
Browse files Browse the repository at this point in the history
…the current plate in the loop."

This reverts commit a61c823.
  • Loading branch information
banfai committed Nov 13, 2023
1 parent a61c823 commit b9f6c60
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/score_plates.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@ optimize_multi_plate_design <- function(batch_container, across_plates_variables

if (!is.null(within_plate_variables)) {
plate_levels <- unique(bc$get_locations()[[plate]])
scoring_funcs <- purrr::map(within_plate_variables, ~ mk_plate_scoring_functions(bc, plate = plate, row = row, column = column, group = .x))
names(scoring_funcs) <- within_plate_variables
scoring_funcs <- purrr::map(within_plate_variables, ~ mk_plate_scoring_functions(bc, plate = plate, row = row, column = column, group = .x)) %>%
unlist()
names(scoring_funcs) <- paste(rep(within_plate_variables, each = length(plate_levels)), names(scoring_funcs))


if (!quiet) {
message(
Expand All @@ -264,7 +266,7 @@ optimize_multi_plate_design <- function(batch_container, across_plates_variables
if (!quiet && length(plate_levels) > 1) cat(curr_plate, "... ")

bc <- optimize_design(bc,
scoring = scoring_funcs %>% purrr::map(curr_plate) %>% rlang::set_names(paste(names(.), " Plate_", curr_plate)),
scoring = scoring_funcs,
max_iter = max_iter,
quiet = TRUE,
shuffle_proposal_func = mk_subgroup_shuffling_function(
Expand Down

0 comments on commit b9f6c60

Please sign in to comment.