Skill Tracer
Skills › Scientific Agent Skills › opentrons-integration › absorbance_reader_template.py

absorbance_reader_template.py

82 lines · skills/opentrons-integration/scripts/absorbance_reader_template.py at 5f2bc03

1"""Opentrons Flex Absorbance Plate Reader workflow template.
2
3The module is Flex-only. Confirm plate compatibility, wavelengths, sample
4volume, optical method, Gripper setup, and deck clearances. Simulated readings
5are zeros and simulated runs do not write CSV output.
6"""
7
8from opentrons import protocol_api
9
10metadata = {
11 "protocolName": "Flex Absorbance Reader Template",
12 "author": "Customize before use",
13 "description": "Initialize the reader, move a plate, and export a read.",
16requirements = {
17 "robotType": "Flex",
18 "apiLevel": "2.29",
22def run(protocol: protocol_api.ProtocolContext) -> None:
23 """Read a compatible 96-well plate at 450 and 650 nm."""
24 reader = protocol.load_module(
25 module_name="absorbanceReaderV1",
26 location="D3",
27 )
28 plate = protocol.load_labware(
29 load_name="corning_96_wellplate_360ul_flat",
30 location="C2",
31 label="Assay Plate",
32 )
34 sample = protocol.define_liquid(
35 name="Assay samples",
36 description="Example plate-reader samples",
37 display_color="#9467BD",
38 )
39 plate.load_liquid(
40 wells=plate.wells(),
41 volume=100,
42 liquid=sample,
43 )
45 with protocol.group_steps(
46 name="Initialize Reader",
47 description="Close the empty reader and initialize two wavelengths.",
48 ):
49 # Required even if the physical lid begins in the closed position.
50 reader.close_lid()
51 reader.initialize(
52 mode="multi",
53 wavelengths=[450, 650],
54 )
56 with protocol.group_steps(
57 name="Load and Read Plate",
58 description="Move the plate onto the reader and export measurements.",
59 ):
60 reader.open_lid()
61 protocol.move_labware(
62 labware=plate,
63 new_location=reader,
64 use_gripper=True,
65 )
66 reader.close_lid()
67 reader.read(export_filename="absorbance")
69 with protocol.group_steps(
70 name="Unload Plate",
71 description="Return the assay plate to slot C2.",
72 ):
73 reader.open_lid()
74 protocol.move_labware(
75 labware=plate,
76 new_location="C2",
77 use_gripper=True,
78 )
80 protocol.comment(
81 "Reader workflow complete. Retrieve CSV files from Recent Protocol Runs."
82 )