Example/Template File

Hello PyLabRobot people!

I just started looking into PyLabRobot. I’m not the best programmer (I mainly deal with and am most interested in opentrons units myself) and I was wondering if you just had a small template / example file of a protocol I could look at? Just to see the baisc structure? I couldn’t find any in the documentation.

Thanks!

While we don’t have a template specifically for Opentrons, I would recommend you look at the basic liquid handling guide. The repo’s README includes a diff showing what to change when moving from STAR to Opentrons. (Just the loading of the deck and creating backend for the LH instance.)

The README shows loading a deck from JSON, but you will most likely be creating a new one from scratch. I wrote a demo for PLR’s Opentrons backend a while ago which includes an example of setting up a deck. Take a look at executor.py. The API version I use there is slightly outdated, but you should be able to piece something together from that. The most important change is that resources is now a top level subpackage (pylabrobot.resources) rather than a subpackage of liquid_handling (pylabrobot.liquid_handling.resources).

Since you say you are already familiar with Opentrons, I should point out that PLR runs on your personal laptop / computer rather than the onboard Raspberry Pi. There is no ProtocolContext and you can run it like any order Python program. (This is so you can use it interactively.)

Happy to help if you have further questions!

1 Like