API Reference


Full docstrings

PlateArrays.ExperimentType
struct Experiment
    runs::Int
    positive_controls::Int
    negative_controls::Int
end 

Collect the number of runs and controls in an experiment.
source
PlateArrays.PlateArrayType
struct PlateArray
    wells::BitMatrix
    positives::BitMatrix 
    negatives::BitMatrix
end

A PlateArray object describes the layout of a microwell plate that includes the active experimental wells and controls.
source
Base.sizeMethod
size(p::PlateArray)

Return the size (rows x colummns) of the BitMatrices that define the PlateArray

source
PlateArrays.MILPMethod
function MILP(P::Int,N::Int,wells::BitMatrix;objective::Function=hybrid,minimize=true,timelimit=100)

MILP solver for control placment. Requires Gurobi licence.

Arguments

  • wells: A BitMatrix indicating the shape and active wells, use trues(n,m) for a full n x m plate.
  • P: The integer number of positive controls
  • N: The integer number of negative controls

Keyword Arguments

  • objective: the objective type for the MILP solver. Must be either 'minimax' or 'hybrid'.
  • timelimit: time limit in seconds for the solver to return a suboptimal solution if it hasn't found an optimal one
  • minimize: if true, the solver minimizes the distance from experiment wells to control wells. if false, it will maximize (this is not useful for practical purposes but is helpful for assessing performance)
source
PlateArrays.arrayerMethod
arrayer(wells::BitMatrix,experiments::Vararg{Experiment};kwargs...)

Array Experiment objects onto plates in three steps:

  1. assign all experiments to as few plates as possible
  2. partition plates that contain multiple experiments and select wells to hold each run. Use central wells first.
  3. place a full complement of controls on each plate that has a given experiment

Arguments

  • wells: A BitMatrix of active wells on each plate (block any inactive wells by setting them to false)
  • experiments: Array a variable number of Experiment objects

Returns a Matrix of PlateArray objects with dimensions E x P, where E is the number of experimens and P the number of plates.

source
PlateArrays.exchangeMethod
exchange(wells::BitMatrix,P::Int,N::Int;objective::Function=hybrid,minimize=true,restarts::Int=10,iterations::Int=1000,kwargs...)

Exchange solver for control placment

Arguments

  • plate: A BitMatrix indicating the shape and active wells, use trues(n,m) for a full n x m plate.
  • P: The integer number of positive controls
  • N: The integer number of negative controls

Keyword Arguments

  • objective : The objective function criteria, choose from minimax, LHS, and hybrid. The hybrid objective is slower than the other objectives because it calculates bounds to balance two objectives.
  • minimize : flip the objective sign
  • restarts : Number of solver restarts. The solver returns the best solution among the restarts
  • iterations: number of exchange iterations per run.
source
PlateArrays.partitionMethod
function partition(wells::BitMatrix,expts::Vararg{Int})

Partition experiments onto a plate of active wells. Use center wells before using edge wells, and place the experiments into contiguous blocks.

Arguments

  • wells a BitMatrix where each active well has a value of 'true'
  • expts a Vararg Int indicating how many runs are present in each experiment
source
PlateArrays.place_controlsMethod
function place_controls(wells::BitMatrix,expt::Experiment;kwargs...)

Place optimal controls for detecting errors in microplate experiments

Arguments

  • wells: A BitMatrix mask indicating the shape and active wells, use trues(n,m) for a full n x m plate.
  • expt : An Experiment type indicating the number of runs as well as positive and negative controls

Keyword Arguments

  • solver: The algorithm used to place the controls. There are currently two solvers available:
    1. exchange (default):
    2. MILP :
  • objective: The objective the solver uses to score plate array candidates.
    1. minimax -> Minimize the maximum distance in wells from an active well to its nearest control.
    2. LHS -> Find an approximate latin hypercube sample of the available wells in the plate.
    3. hybrid (default) -> a weighted combination of both criteria
source
PlateArrays.place_controlsMethod
place_controls(wells::BitMatrix,P::Int,N::Int;solver::String="exchange",objective::String="hybrid",kwargs...)

Place optimal controls for detecting errors in microplate experiments

Arguments

  • wells: A BitMatrix mask indicating the shape and active wells, use trues(n,m) for a full n x m plate.
  • P: The integer number of positive controls
  • N: The integer number of negative controls

Keyword Arguments

  • solver: The algorithm used to place the controls. There are currently two solvers available:
    1. exchange (default):
    2. MILP :
  • objective: The objective the solver uses to score plate array candidates.
    1. minimax -> Minimize the maximum distance in wells from an active well to its nearest control.
    2. LHS -> Find an approximate latin hypercube sample of the available wells in the plate.
    3. hybrid (default) -> a weighted combination of both criteria
source
PlateArrays.runsMethod
runs(platearray::PlateArray)

Compute the non-control active wells of a PlateArray.

source