robotools.utils#

Module with robot-agnostic utilities.

class robotools.utils.DilutionPlan(*, xmin: float, xmax: float, R: int, C: int, stock: float, mode: str, vmax: float | Sequence[float], min_transfer: float)#

Bases: object

Represents the result of a dilution series planning.

Methods

to_worklist(*, worklist, stock[, ...])

Writes the DilutionPlan to a Worklist.

to_worklist(*, worklist: BaseWorklist, stock: Labware, stock_column: int = 0, diluent: Labware, diluent_column: int = 0, dilution_plate: Labware, destination_plate: Labware | None = None, v_destination: float | None = None, pre_mix_hook: Callable[[int, BaseWorklist], BaseWorklist | None] | None = None, post_mix_hook: Callable[[int, BaseWorklist], BaseWorklist | None] | None = None, mix_threshold: float = 0.05, mix_wash: int = 2, mix_repeat: int = 2, mix_volume: float = 0.8, lc_stock_trough: str = 'Trough_Water_FD_AspLLT', lc_diluent_trough: str = 'Trough_Water_FD_AspLLT', lc_mix: str = 'Water_DispZmax-3_AspZmax-5', lc_transfer: str = 'Water_FD_AspZmax-1') None#

Writes the DilutionPlan to a Worklist.

The stock is assumed to be non-sedimenting (e.g. by stirring), but all aspirations from freshly diluted wells are done right away. Mixing is done after dilution and before transfer whenever the diluted volume is more than mix_threshold * self.vmax. The volume aspirated for mixing may be parameterized with mix_volume. Mixing is repeated mix_repeat times and inbetween, the mix_wash scheme is applied (see below).

Stock and diluent troughs may have less rows than the dilution plate.

Parameters:
worklistWorklist

A Worklist that will be appended

stockLabware

A trough containing the highly concentrated stock solution

stock_columnint

0-based column number of the stock solution in the stock labware

diluentLabware

A trough containing the diluent for the dilution series

diluent_columnint

0-based column number of the diluent solution in the stock labware

dilution_plateLabware

An (empty) labware to use for the dilution series (begins in top left corner)

destination_plateLabware, optional

An (empty) labware to transfer to. Consider passing a post_mix_hook if you want to have more control over these transfers.

v_destinationfloat

Volume [µl] to transfer to the destination_plate (if set)

pre_mix_hookcallable, optional
Arguments of the callable, if specified:

The 0-indexed number of the freshly DILUTED column. The currently active worklist.

It may return a Worklist which will be used for subsequent steps.

Can be used as a more flexible alternative to mix_* settings, for example to perform custom mixing, or switch to another worklist for subsequent steps.

post_mix_hookcallable, optional
Arguments of the callable, if specified:

The 0-indexed number of the freshly MIXED column. The currently active worklist.

It may return a Worklist which will be used for subsequent steps.

Can be used as a more flexible alternative to specifying a destination_plate, for example to transfer to multiple destinations.

mix_thresholdfloat

Maximum fraction of total dilution volume (self.vmax) that may be diluted without subsequent mixing (defaults to 0.05 or 5%)

mix_washint

Number of the wash scheme inbetween mixing steps The recommended wash scheme is 0 mL + 1 mL with fast wash.

mix_repeatint

How often to mix after diluting. May be set to 0, particularly when combined with a pre_mix_hook.

mix_volumefloat

Fraction of well volume to mix with (upper bound is the Worklist.max_volume)

lc_stock_troughstr

Liquid class to use for transfer of stock solution to the dilution plate

lc_diluent_troughstr

Liquid class to use for transfer of diluent to dilution plate

lc_mixstr

Liquid class for mixing steps

lc_transferstr

Liquid class for transfers within the dilution_plate and to the destination_plate

robotools.utils.get_trough_wells(n: int, trough_wells: Iterable[str] | ndarray) List[str]#

Creates a list that re-uses trough wells if needed.

When n > trough.virtual_rows, the available wells are repeated.

Parameters:
nint

Number of trough wells to work with

trough_wellslist

Trough well IDs that may be used

Returns:
wellslist

n virtual wells in the trough