TipTracker
Description
Tracks the status and locations of pipette tips within a tiprack.
Manages which tips are clean, used, and supports assigning tips to specific stock wells during operations (e.g., tracking which tip is associated with which stock during transfers).
Originally adapted from the Opentrons API.
Constructor
TipTracker(tips, start_well=None)| Parameter | Type | Description |
|---|---|---|
tips | list of Well | List of tip Well objects to track. |
start_well | Well, optional | Optional starting well for tip tracking. |
Key Properties
| Property | Type | Description |
|---|---|---|
_wells | list of Well | Full list of tips starting from start_well. |
_available_clean_tips | list of Well | Subset of tips that are clean and available for use. |
_tip_stock_mapping | dict | Mapping of stock wells to assigned tips (for reuse strategies like new_tip="once"). |
Important Methods
| Method | Returns | Description |
|---|---|---|
next_tip(start_well=None) | Well | Find the next available clean tip. |
use_tip(tip_well) | None | Mark a tip as used (no longer available). |
previous_tip() | Well or None | Get the last tip that was returned (if any). |
return_tip(well) | None | Mark a tip well as available again (i.e., tip returned to rack). |
assign_tip_to_stock(tip_well, stock_well) | None | Link a tip well to a stock well (for once-only reuse logic). |
Method Details
Next Tip
next_tip(start_well=None)Find the next clean tip in the tiprack starting optionally from a specified well.
Raises an assertion error if no tips are available.
Use Tip
use_tip(tip_well)Mark the given tip well as used (sets has_tip = False and clean_tip = False).
Previous Tip
previous_tip()Returns the most recently used tip that was returned to the rack (if any). Returns None if no returned tips are available.
Return Tip
return_tip(well)Mark a tip as available again in the tiprack (i.e., tip successfully returned after partial use).
Raises an assertion if the well already has a tip attached.
Assign Tip to Stock
assign_tip_to_stock(tip_well, stock_well)Associate a specific tip to a stock well, useful for workflows like new_tip='once' strategies where a tip needs to consistently match a specific source.
If already assigned, does nothing.
Usage Flow Example
# Initialize TipTracker with a list of wells
tip_tracker = TipTracker(tips_list)
# Pick up the next available tip
next_tip = tip_tracker.next_tip()
# Mark that tip as used after pickup
tip_tracker.use_tip(next_tip)
# Optionally, return a tip later
tip_tracker.return_tip(next_tip)Important Notes
- Tip cleanliness (
clean_tip) and availability (has_tip) are separately tracked. - Tip stock mapping (
_tip_stock_mapping) enables reusable pipetting workflows without constant re-picking tips. - When running transfers with strategies like
new_tip="once", the assigned tip will consistently map to the same source well.