Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relist plate scoring functions and only use the functions of the current plate in the loop #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

banfai
Copy link
Collaborator

@banfai banfai commented Nov 13, 2023

This reverts the revert commit b9f6c60.

Can this be rebased/squashed to somehow remove these idiotic commits?

fixes #32

…ions of the current plate in the loop.""

This reverts commit b9f6c60.
@banfai banfai changed the title Revert "Revert "relist plate scoring functions and only use the funct… Relist plate scoring functions and only use the functions of the current plate in the loop Nov 13, 2023
@@ -266,7 +264,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,
scoring = scoring_funcs %>% purrr::map(curr_plate) %>% rlang::set_names(paste(names(.), " Plate_", curr_plate)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I understand this code.

scoring_funcs is a list of lists now, and curr_plate is a a plate id (character or numeric). right?

what does scoring_funcs %>% purrr::map(curr_plate) do?

maybe we need to transpose the scoring_funcs first with purrr::list_transpose, and then we:

  1. assert_that length of plate_levels is the same of scoring_funcs?
  2. for (plate_index in seq_len(length(plate_levels)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I understand this code.

scoring_funcs is a list of lists now, and curr_plate is a a plate id (character or numeric). right?

what does scoring_funcs %>% purrr::map(curr_plate) do?

First part is correct.
purrr::map(curr_plate) is equivalent to purrr::map(purrr::pluck, curr_plate)
Maybe it should be written like that for readability.

maybe we need to transpose the scoring_funcs first with purrr::list_transpose, and then we:

  1. assert_that length of plate_levels is the same of scoring_funcs?
  2. for (plate_index in seq_len(length(plate_levels)

I need to check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multiplate wrapper iterate only on current plate scores
2 participants