Skip to content

Generalize score generation and optimization #54

@banfai

Description

@banfai

this should not need the whole batch container, it should work on subset:

mk_plate_scoring_functions <- function(batch_container, plate = NULL, row, column, group, p = 2, penalize_lines = "soft") {

list of lists, should work with group_by:

scoring_funcs <- purrr::map(within_plate_variables, ~ mk_plate_scoring_functions(bc, plate = plate, row = row, column = column, group = .x)) |>

TODO:

  • decide how to proceed
    1. to act on a sample subset bc |> group_by() |> optimize(<bc>, scoring_fun = mk_scoring(batch_var))
    2. or do it like bc |> group_by() |> mk_scoring("osat") |> optimize()
  • batch container NEEDS grouping (write a method to group_by the samplesheet and add a key to the bc)
  • we NEED a new function to work on a subset of samplesheet -> grid_2d_score_generator()
  • how to name it?
  • scoring function might collide with the shuffling shuffling needs to act on the subset as well
  • what would this break? -
    osat_score_generator <- function(batch_vars, feature_vars, quiet = FALSE) {
  • remove the "group_by" variable from the batch_vars?
  • shuffle function should also respect this

<1.> bc |> optimize(scoring = "osat") |> group_by("plate") |> optimize(scoring = "2d")
<2.> bc |> add_scoring_fun("osat", "plate") |> optimize() |> group_by("plate") |> add_scoring_fun("2d") |> optimize()

this should be generalizable to any grouping by batch, etc.

even more general:
bc |> add_scoring_fun("osat", "plate") |> add_shuffling_fun("row_swap") |> optimize()

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions