Schedule microplate layouts and place optimal controls for detecting errors.
PlateArrays is available in the Jensen Lab Registry. Follow the instructions to add the registry before continuing.
Once the registry has been added, run the following command:
# once JensenLabRegistry has been added
using Pkg
Pkg.add(url= "https://github.com/jensenlab/PlateArrays")Then, load the pckage:
using PlateArraysPlace optimal controls for detecting errors in microplate experiments
wells: A BitMatrix indicating the shape and active wells, usetrues(n,m)for a full n x m plate.P: The integer number of positive controlsN: The integer number of negative controls
solver: The algoritm used to place the controls. There are currently two solvers available:- exchange (default)
- MILP
objective: The objective the solver uses to score plate array candidates.- minimax -> Minimize the maximmum distance in wells from an active well to its nearest control.
- LHS -> Find an approximate latin hypercube sample of the available wells in the plate.
- hybrid (default) -> a weighted combination of both criteria
Note: MILP solvers return globally optimal solutions but their runtimes can be unpredictable; conversely, coordinate exchange algorithms are not gauranteed to be globally optimal but scale more favorably for large problems. In practice, we find that the exchange algorithm returns near optimal solutions in a fraction of the time of the MILP solver for 384 and 1536 well plate problems. See documentation for solver hyperparameters.
using PlateArrays , DataFrames
plate = trues(8,12) # 96 well plate
# place 12 positive and 12 negative controls with a minimax objective and exchange algorithm
design=place_controls(plate,12,12;solver = "exchange", objective="hybrid")
plot(design)
# save design as a dataframe and vice-versa
df = DataFrame(design)
new_design = PlateArray(df) The solvers can handle situations when certain wells are "blocked". Here, wells A1-E2 are unavailable. The algorithms place controls that fill the new geometry of available wells.
plate[:,1].=false
plate[1:5,2].=false
design=place_controls(plate,12,12;solver = exchange, objective=hybrid)
plot(design)Create microplate layouts for multiple experiments in three steps:
- assign all experiments to as few plates as possible
- partition plates that contain multiple experiments and select wells to hold each run. Use central wells first.
- place a full complement of controls on each plate that has a given experiment
wells: A BitMatrix of active wells on each plate (block any inactive wells by setting them to false)experiments: Array a variable number ofExperimentobjects
using PlateArrays
expt1 = Experiment(92,12,12) # an experiment that has 92 total runs. Each plate that has runs from this experiment should have 12 positive and 12 negative controls
expt2 = Experiment(24, 6,6)
expt3 = Experiment(72,12,12)
plate = trues(8,12) # a standard 96 well plate
plate_arrays = arrayer(plate,expt1,expt2,expt3)
array_plots = plot(plate_arrays)