Closed banfai closed 2 months ago
hi @banfai .
in the current version we only use excluded
upon creation of a BatchContainer
. we call the non-exported function locations_table_from_dimensions()
to create a new tibble()
. so in the current design there is no way to recover excluded locations after the batch-container was created.
I will close it for now, but if you think it it worth rewriting the internals to store excluded locations in order handle this, please feel free to reopen.
I'm using exclusions to leave out some wells on a plate for fixed controls (it's easier this way than shuffling with constraints). After the optimization I need to fill up the excluded wells with the controls, so it would be nice to get them again.
I'll look into it if it would be possible to solve this easily.
I was also thinking about a function to manually "unexclude" locations and assign some value (so excluded locations are untouchable by the optimization, but allowed to be manipulated manually). I'm not sure yet if this is a good idea.
I think the possibilities you have already:
shuffle_with_contraints(
src = sample_type != "control",
dst = sapmle_type != "control"
)
bc$get_samples() |>
bind_rows(control_locations)
I'm currently not convinced that a separate function is needed.
- just bind rows
bc$get_samples() |> bind_rows(control_locations)
this is what I'm doing now, but I felt it would be more robust to get these from the BatchContainer...
After discussing it with @julianesiebourg a different approach might be better:
$get_samples()
(and maybe used in the scoring, if needed)For this we probably need an extra column in the internal samples table (maybe .fixed
), and an argument in $get_samples()
.
Wouldn't we achieve the same with shuffle_with_constraints(src=!fixed, dst=!fixed)
? Without the need to increase complexity of BatchContainer
.
$get_locations()
omits the excluded locations, it would be useful to be able to get these