2  Recipe index

Recipes are indexed by what you are trying to do, not by which module the function lives in. If you know the API name but not the task, the cheat sheet is the faster route.

Task Ch. APIs used
Get a liquid handler running with no hardware 1 LiquidHandler, LiquidHandlerChatterboxBackend, STARLetDeck, setup, stop
Inspect what is on the deck 1 lh.summary, deck.get_all_children
See the deck 1 Visualizer, websocket, pylabrobot.visualizer
Shut down cleanly 1 LiquidHandler.setup, LiquidHandler.stop, async with, asyncio.run
Simulate a whole workcell 1 Thermocycler, ThermocyclerChatterboxBackend, Incubator, IncubatorChatterboxBackend, run_pcr_profile
Start independent machines at the same time 1 asyncio.gather, setup, stop
Decode a labware name 2 nest_1_troughplate_195000uL_Vb, cor_96_wellplate_360uL_Fb, naming convention
Find a part by vendor and catalog number 2 docstring, catalog, corning, alpaqua
Look up a resource by name 2 Resource.get_resource, get_all_children, ResourceNotFoundError
Search the library 2 resources.utils.query, regex
Build a deck from carriers 3 assign_child_resource, rails, assign_child_at_slot, PlateCarrier, setitem
Rotate a plate 3 Resource.rotated, Rotation
Where is this thing, really 3 Resource.location, get_absolute_location, Coordinate
Will it fit 3 check_can_drop_resource_here, get_highest_known_point, ignore_collision
Aspirate and dispense 4 lh.aspirate, lh.dispense, Container
Aspirate from one trough with 8 channels 4 spread, use_channels, compute_channel_offsets
Control speed and height 4 flow_rates, liquid_height, blow_out_air_volume
Mix during a transfer 4 Mix, mix, surface_following_distance
Put a tip on and take it off 4 lh.pick_up_tips, lh.drop_tips, lh.return_tips, lh.discard_tips, lh.get_mounted_tips
Target a position within a well 4 offsets, Coordinate, center, get_anchor
When channels do not fit 4 ChannelsDoNotFitError, get_channel_spacings, no_go_zones
Convert a linear index to a grid position 5 divmod, num_items_y, get_item, column-major, Coordinate, get_absolute_location
Convert between labels and indices 5 row_index_to_label, label_to_row_index, split_identifier
Map 96 wells into a 384-well quadrant 5 Plate.get_quadrant, checkerboard, block
Print an occupancy map 5 summary, occupied_func, get_used_volume, set_volume
Rows and columns 5 ItemizedResource.row, ItemizedResource.column
Select wells 5 getitem, get_item, get_items, slicing, plate[A1:H1]
Stream, pair, and batch a plan 5 itertools.cycle, itertools.islice, itertools.product, itertools.groupby, traverse, get_identifier, get_item, row, column, get_all_items, set
Walk a plate in batches 5 ItemizedResource.traverse, itertools.islice, snake
96-head operations 6 aspirate96, dispense96, pick_up_tips96, drop_tips96
One call instead of twenty lines 6 lh.transfer, source_vol, target_vols, ratios
Set default channels 6 lh.use_channels
Aspirate once per source, not once per row 7 itertools.groupby, sorted, lh.aspirate, lh.dispense, use_channels, multi-dispense
Compute volumes from a plate map 7 list comprehension, dict comprehension, csv.DictReader, zip strict, vols, normalization
Drive a run from a CSV 7 csv, csv.DictReader, lh.transfer, worklist
Group rows into channel-parallel batches 7 sort_by_xy_and_chunk_by_x, batching, multi-channel
Pick a format 7 csv, json, logging, file formats
Turn rows into call arguments 7 zip, zip strict, transpose, enumerate, vols, use_channels
Drop, return, or discard 8 lh.drop_tips, lh.return_tips, lh.discard_tips, allow_nonzero_volume, return_tips96, discard_tips96, deck.get_trash_area
Find the next free tips from the rack itself 8 TipRack.get_all_items, TipSpot.has_tip, TipRack.summary, TipRack.set_tip_state, lh.pick_up_tips
Move tips between racks 8 lh.move_tips, NestedTipRack, stacking_z_height, hamilton_96_tiprack_50uL_NTR
Probe and consolidate tip inventory 8 lh.probe_tip_inventory, lh.probe_tip_presence_via_pickup, lh.consolidate_tip_inventory, lh.move_tips
Scope tips to a block 8 lh.use_tips, lh.get_mounted_tips, asynccontextmanager
Set what the rack model believes 8 TipRack.empty, TipRack.fill, TipRack.set_tip_state, TipRack.disable_tip_trackers, TipSpot.has_tip, set_tip_tracking
Stream tips across several racks 8 F.get_all_tip_spots, F.linear_tip_spot_generator, F.randomized_tip_spot_generator, cache_file_path, get_num_tips_left, set_index, reset, get, async for, TipRack.traverse, resources.functional
Tell PLR what is on the head 8 lh.clear_head_state, lh.update_head_state, lh.get_mounted_tips, lh.head
What a tip is 8 Tip, maximal_volume, nominal_volume, total_tip_length, fitting_depth, has_filter, HamiltonTip, TipSize, TipPickupMethod, TipRack.get_tip, get_all_tips, TipSpot.make_tip
Gripper parameters 9 pickup_distance_from_top, pickup_offset, destination_offset, intermediate_locations, GripDirection, pickup_direction, drop_direction, ResourcePickup, ResourceMove, ResourceDrop
Move a plate onto a magnetic bead stand 9 lh.move_plate, PlateAdapter, alpaqua_96_plateadapter_magnum_flx
Move a plate to a carrier position 9 lh.move_plate, PlateCarrier
Take the lid off a plate and put it back 9 lh.move_lid, Liddable.has_lid, Lid
Take the top plate off a stack 9 ResourceStack.get_top_item, lh.move_plate
Tell PLR a plate moved while it was off-deck 9 Resource.unassign, Resource.assign_child_resource
Where a resource is gripped 9 preferred_pickup_location, pick_up_resource, pickup_distance_from_top, Coordinate
Continue a worklist past a bad row 10 TooLittleLiquidError, TooLittleVolumeError, try/except, lh.aspirate, lh.dispense
CrossContaminationError is never raised 10 CrossContaminationError, set_cross_contamination_tracking, liquid_history
Read a partial multichannel failure 10 ChannelizedError, ChannelizedError.errors, tracker.commit, tracker.rollback, lh.probe_tip_presence_via_pickup
Suppress tracking for a block 10 no_volume_tracking, no_tip_tracking, set_volume_tracking, set_tip_tracking, does_volume_tracking
The portable errors 10 ResourceNotFoundError, NoLocationError, TooLittleLiquidError, TooLittleVolumeError, NoTipError, HasTipError, NoChannelError, ChannelsDoNotFitError, BlowOutVolumeError, ResourceDefinitionIncompleteError, resources.errors, liquid_handling.errors
Load a layout that uses classes you defined 11 find_subclass, utils.object_parsing, Resource.deserialize, allow_marshal, subclasses
Save a deck layout 11 Resource.save, Resource.serialize, Resource.deserialize, Deck.load_from_json_file, deck.get_all_resources
Save and restore contents 11 save_state_to_file, load_state_from_file, serialize_state, serialize_all_state, load_state, load_all_state
Why layout and state are two files 11 Deck.load_from_json_file, load_state_from_file, tracker.get_used_volume
Jog a channel by hand 12 lh.prepare_for_manual_channel_operation, lh.move_channel_x, lh.move_channel_y, lh.move_channel_z
Pass vendor-specific options 12 backend_kwargs, STARBackend.aspirate, jet, blow_out, lld_mode, surface_following_distance
Read a backend error family 12 STARFirmwareError, STARModuleError, ClotDetectedError, star_firmware_string_to_error, TecanError, VantageFirmwareError
Run the protocol against a STAR without a STAR 12 STARChatterboxBackend, STARBackend, MachineConfiguration, ExtendedConfiguration, opentrons_chatterbox
Why the chatterbox accepts anything 12 Strictness, set_strictness, get_strictness, _check_args, liquid_handling.strictness
Log at process, command, and firmware levels 13 logging, LOG_LEVEL_IO, pylabrobot logger, logger.exception, propagate, FileHandler, StreamHandler
Organize data by experiment and run 13 pathlib, datetime, run id, manifest.json, deck.save, save_state_to_file, provenance, config.json
Keep the scheduler queue in SQLite 14 sqlite3, job queue, submit, next_job, claim, complete, fail, priority, resource, not_before, persistent queue
Track samples and plate maps in SQLite 14 sqlite3, connect, executemany, commit, PRIMARY KEY, datetime.isoformat, plate map, sample_events
Compose behaviour with decorators 15 decorator order, functools.wraps, handle_errors, ChannelizedError.errors, partial retry, with_fresh_tip, reuse_tip, try_next_tip, try_next_source, NoTipError, TooLittleLiquidError, record_step, executions
Build a normalization cell from unit operations 16 unit operations, ResourceStack, move_plate, use_channels, volume tracking, arrivals generator, sample flow, run directory, process logging
Make simulated time and data explicit 16 SimClock, quantify, random.Random, seeded RNG, synthetic data, measurement noise, reproducible draws
Run a cell against simulated or real time 16 simulation switch, Clock, poll interval, get_top_item, invariants, queue discipline, LCFS
Check a custom definition behaves like a plate 17 num_items_x, num_items_y, row, column, get_quadrant, ResourceDefinitionIncompleteError
Choose a labware base class 17 Resource, Container, ItemizedResource, Plate, ContainerRack, Liddable, _get_grid_size
Contribute a definition upstream 17 resources vendor package, init exports, contributing-new-resources
Lay out wells in a grid 17 create_ordered_items_2d, Well, WellBottomType, CrossSectionType, ordered_items
Make a plate sit at the right height 17 PlateHolder, pedestal_size_z, PlateAdapter, compute_plate_location
Measure a plate for a definition 17 size_x, size_y, size_z, item_dx, item_dy, dx, dy, dz, material_z_thickness, SBS footprint
Wrap a definition in a factory function 17 Plate, plate_type, model, factory function, naming convention
Write volume and height functions 17 height_volume_functions, calculate_liquid_volume_container_2segments_round_vbottom, calculate_liquid_height_in_container_2segments_round_vbottom, compute_volume_from_height, compute_height_from_volume, height_volume_data, functools.partial
Declare capabilities a backend lacks 18 NotImplementedError, head96_installed, pick_up_tips96, pick_up_resource, move_picked_up_resource, drop_resource
Define a custom deck 18 Deck, ResourceHolder, assign_child_at_slot, OTDeck, STARLetDeck, get_slot, Coordinate
Implement the core backend methods 18 num_channels, can_pick_up_tip, pick_up_tips, drop_tips, aspirate, dispense, Pickup, Drop, SingleChannelAspiration, SingleChannelDispense
Map deck coordinates to machine coordinates 18 get_absolute_location, Coordinate, homing, Deck subclass, assign_child_at_slot
Read the smallest complete backend 18 LiquidHandlerChatterboxBackend, backends/chatterbox.py
Run a protocol through a custom backend 18 LiquidHandler, lh.head, set_volume_tracking, custom backend
See what the backend interface demands 18 LiquidHandlerBackend, abstractmethods, abstractmethod, ABC, setup, stop, get_channel_spacings, request_tip_presence
Talk to a real device over pylabrobot.io 18 pylabrobot.io, Serial, USB, HID, FTDI, Socket, LOG_LEVEL_IO, capturer.record
No matching items