-
Notifications
You must be signed in to change notification settings - Fork 88
Build lh.consolidate_tip_inventory()
#519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rickwierenga
merged 29 commits into
PyLabRobot:main
from
BioCam:Build-lh.consolidate_tip_inventory()
Jun 11, 2025
Merged
Build lh.consolidate_tip_inventory()
#519
rickwierenga
merged 29 commits into
PyLabRobot:main
from
BioCam:Build-lh.consolidate_tip_inventory()
Jun 11, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bfb6265
to
bfe41ef
Compare
very very useful & works amazingly! |
PLR summarised in one line :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi everyone,
It is time to free PyLabRobot users - no matter what liquid handling machine they are using - from the torture of manual tip re-racking.
In this PR I am adding a new
LiquidHandler()
method:This is step 4 of a multi-feature generation process:
lh.probe_tip_presence_via_pickup()
measured_tip_inventory = lh.probe_tip_inventory(probing_mode=lh.probe_tip_presence_via_pickup)
lh.update_tip_inventory(measured_tip_inventory)
lh.consolidate_tip_inventory()
lh.consolidate_tip_inventory()
, step 4, is independent of the previous steps.It assumes that the liquid handler's tip_tracking information is correct, and consolidates tip_racks based on PLR's tip_tracking system (you therefore have to
set_tip_tracking(True)
at the beginning of your script!).This has the opportunity to save operators enormous amounts of time: most automation runs don't use up all tips.
Particularly if one uses multiple tipracks of the same model (e.g. 1000ul tips) across an automation run, leaving each partially-filled, operators can spend multiple minutes per run on manual reracking, amounting to hours of operator time lost per month.
(and let's not forget the mental fatigue...)
Note: "tip inventory" is defined as the subset of all resources in the deck/resource tree that is of type
Tip
and whether it's parent resource, theTipSpot
has or does not have a tip.Examples
I have generated some showcases and added the notebook with which I generated the showcases into the docs.
Showcase 1: STARlet
lh.consolidate_tip_inventory()
(no method argument given)tested on the machine:
Note: the automated protocol here is a stress-test of various aspects of this new method while not wasting tips :)
(This is why I'm making the
.consolidate_tip_inventory()
method solve random tip usage. In more realistic runs random tip usage would be considered madness.)Modification with specification on what tip_racks to ignore
lh.consolidate_tip_inventory(ignore_tiprack_list = ["teaching_tip_rack", "tip_rack_1000ul_3"])
(exclude specific tip_racks from consolidation process)Machine Agnosticity
PyLabRobot focuses on the commonalities between different lab machines, including liquid handlers.
Therefore a method that is implemented at
LiquidHandler
level applies to all PLR-integrated liquid handlers.Since all liquid handlers can - by definition - perform tip_pickups and tip_drops (they are 2 of a liquid handler's atomic command), all PLR-integrated liquid handlers can execute
lh.consolidate_tip_inventory()
!In silico example of the same process on an OT-2 (note: I don't have access to an OT-2 to test on the machine):