-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_ABI fast qpcr 96 well alum opentrons 100ul.py
119 lines (95 loc) · 14.5 KB
/
test_ABI fast qpcr 96 well alum opentrons 100ul.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import json
from opentrons import protocol_api, types
CALIBRATION_CROSS_COORDS = {
'1': {
'x': 12.13,
'y': 9.0,
'z': 0.0
},
'3': {
'x': 380.87,
'y': 9.0,
'z': 0.0
},
'7': {
'x': 12.13,
'y': 258.0,
'z': 0.0
}
}
CALIBRATION_CROSS_SLOTS = ['1', '3', '7']
TEST_LABWARE_SLOT = '3'
RATE = 0.25 # % of default speeds
SLOWER_RATE = 0.1
PIPETTE_MOUNT = 'right'
PIPETTE_NAME = 'p300_single'
TIPRACK_SLOT = '5'
TIPRACK_LOADNAME = 'opentrons_96_tiprack_300ul'
LABWARE_DEF_JSON = """{"ordering":[["A1","B1","C1","D1","E1","F1","G1","H1"],["A2","B2","C2","D2","E2","F2","G2","H2"],["A3","B3","C3","D3","E3","F3","G3","H3"],["A4","B4","C4","D4","E4","F4","G4","H4"],["A5","B5","C5","D5","E5","F5","G5","H5"],["A6","B6","C6","D6","E6","F6","G6","H6"],["A7","B7","C7","D7","E7","F7","G7","H7"],["A8","B8","C8","D8","E8","F8","G8","H8"],["A9","B9","C9","D9","E9","F9","G9","H9"],["A10","B10","C10","D10","E10","F10","G10","H10"],["A11","B11","C11","D11","E11","F11","G11","H11"],["A12","B12","C12","D12","E12","F12","G12","H12"]],"brand":{"brand":"ABI","brandId":["4346907"]},"metadata":{"displayName":"ABI fast qpcr 96 well alum opentrons 100ul","displayCategory":"aluminumBlock","displayVolumeUnits":"µL","tags":[]},"dimensions":{"xDimension":127.75,"yDimension":85.5,"zDimension":22},"wells":{"A1":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":14.38,"y":74.25,"z":8},"B1":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":14.38,"y":65.25,"z":8},"C1":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":14.38,"y":56.25,"z":8},"D1":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":14.38,"y":47.25,"z":8},"E1":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":14.38,"y":38.25,"z":8},"F1":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":14.38,"y":29.25,"z":8},"G1":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":14.38,"y":20.25,"z":8},"H1":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":14.38,"y":11.25,"z":8},"A2":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":23.38,"y":74.25,"z":8},"B2":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":23.38,"y":65.25,"z":8},"C2":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":23.38,"y":56.25,"z":8},"D2":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":23.38,"y":47.25,"z":8},"E2":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":23.38,"y":38.25,"z":8},"F2":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":23.38,"y":29.25,"z":8},"G2":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":23.38,"y":20.25,"z":8},"H2":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":23.38,"y":11.25,"z":8},"A3":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":32.38,"y":74.25,"z":8},"B3":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":32.38,"y":65.25,"z":8},"C3":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":32.38,"y":56.25,"z":8},"D3":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":32.38,"y":47.25,"z":8},"E3":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":32.38,"y":38.25,"z":8},"F3":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":32.38,"y":29.25,"z":8},"G3":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":32.38,"y":20.25,"z":8},"H3":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":32.38,"y":11.25,"z":8},"A4":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":41.38,"y":74.25,"z":8},"B4":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":41.38,"y":65.25,"z":8},"C4":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":41.38,"y":56.25,"z":8},"D4":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":41.38,"y":47.25,"z":8},"E4":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":41.38,"y":38.25,"z":8},"F4":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":41.38,"y":29.25,"z":8},"G4":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":41.38,"y":20.25,"z":8},"H4":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":41.38,"y":11.25,"z":8},"A5":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":50.38,"y":74.25,"z":8},"B5":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":50.38,"y":65.25,"z":8},"C5":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":50.38,"y":56.25,"z":8},"D5":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":50.38,"y":47.25,"z":8},"E5":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":50.38,"y":38.25,"z":8},"F5":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":50.38,"y":29.25,"z":8},"G5":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":50.38,"y":20.25,"z":8},"H5":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":50.38,"y":11.25,"z":8},"A6":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":59.38,"y":74.25,"z":8},"B6":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":59.38,"y":65.25,"z":8},"C6":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":59.38,"y":56.25,"z":8},"D6":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":59.38,"y":47.25,"z":8},"E6":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":59.38,"y":38.25,"z":8},"F6":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":59.38,"y":29.25,"z":8},"G6":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":59.38,"y":20.25,"z":8},"H6":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":59.38,"y":11.25,"z":8},"A7":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":68.38,"y":74.25,"z":8},"B7":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":68.38,"y":65.25,"z":8},"C7":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":68.38,"y":56.25,"z":8},"D7":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":68.38,"y":47.25,"z":8},"E7":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":68.38,"y":38.25,"z":8},"F7":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":68.38,"y":29.25,"z":8},"G7":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":68.38,"y":20.25,"z":8},"H7":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":68.38,"y":11.25,"z":8},"A8":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":77.38,"y":74.25,"z":8},"B8":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":77.38,"y":65.25,"z":8},"C8":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":77.38,"y":56.25,"z":8},"D8":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":77.38,"y":47.25,"z":8},"E8":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":77.38,"y":38.25,"z":8},"F8":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":77.38,"y":29.25,"z":8},"G8":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":77.38,"y":20.25,"z":8},"H8":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":77.38,"y":11.25,"z":8},"A9":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":86.38,"y":74.25,"z":8},"B9":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":86.38,"y":65.25,"z":8},"C9":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":86.38,"y":56.25,"z":8},"D9":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":86.38,"y":47.25,"z":8},"E9":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":86.38,"y":38.25,"z":8},"F9":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":86.38,"y":29.25,"z":8},"G9":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":86.38,"y":20.25,"z":8},"H9":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":86.38,"y":11.25,"z":8},"A10":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":95.38,"y":74.25,"z":8},"B10":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":95.38,"y":65.25,"z":8},"C10":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":95.38,"y":56.25,"z":8},"D10":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":95.38,"y":47.25,"z":8},"E10":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":95.38,"y":38.25,"z":8},"F10":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":95.38,"y":29.25,"z":8},"G10":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":95.38,"y":20.25,"z":8},"H10":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":95.38,"y":11.25,"z":8},"A11":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":104.38,"y":74.25,"z":8},"B11":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":104.38,"y":65.25,"z":8},"C11":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":104.38,"y":56.25,"z":8},"D11":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":104.38,"y":47.25,"z":8},"E11":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":104.38,"y":38.25,"z":8},"F11":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":104.38,"y":29.25,"z":8},"G11":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":104.38,"y":20.25,"z":8},"H11":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":104.38,"y":11.25,"z":8},"A12":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":113.38,"y":74.25,"z":8},"B12":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":113.38,"y":65.25,"z":8},"C12":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":113.38,"y":56.25,"z":8},"D12":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":113.38,"y":47.25,"z":8},"E12":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":113.38,"y":38.25,"z":8},"F12":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":113.38,"y":29.25,"z":8},"G12":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":113.38,"y":20.25,"z":8},"H12":{"depth":14,"totalLiquidVolume":100,"shape":"circular","diameter":5.5,"x":113.38,"y":11.25,"z":8}},"groups":[{"metadata":{"displayName":"ABI fast qpcr 96 well alum opentrons 100ul","displayCategory":"aluminumBlock","wellBottomShape":"v"},"brand":{"brand":"ABI","brandId":["4346907"]},"wells":["A1","B1","C1","D1","E1","F1","G1","H1","A2","B2","C2","D2","E2","F2","G2","H2","A3","B3","C3","D3","E3","F3","G3","H3","A4","B4","C4","D4","E4","F4","G4","H4","A5","B5","C5","D5","E5","F5","G5","H5","A6","B6","C6","D6","E6","F6","G6","H6","A7","B7","C7","D7","E7","F7","G7","H7","A8","B8","C8","D8","E8","F8","G8","H8","A9","B9","C9","D9","E9","F9","G9","H9","A10","B10","C10","D10","E10","F10","G10","H10","A11","B11","C11","D11","E11","F11","G11","H11","A12","B12","C12","D12","E12","F12","G12","H12"]}],"parameters":{"format":"irregular","quirks":[],"isTiprack":false,"isMagneticModuleCompatible":false,"loadName":"abi_96_aluminumblock_100ul"},"namespace":"custom_beta","version":1,"schemaVersion":2,"cornerOffsetFromSlot":{"x":0,"y":0,"z":0}}"""
LABWARE_DEF = json.loads(LABWARE_DEF_JSON)
LABWARE_LABEL = LABWARE_DEF.get('metadata', {}).get(
'displayName', 'test labware')
metadata = {'apiLevel': '2.0'}
def uniq(l):
res = []
for i in l:
if i not in res:
res.append(i)
return res
def run(protocol: protocol_api.ProtocolContext):
tiprack = protocol.load_labware(TIPRACK_LOADNAME, TIPRACK_SLOT)
pipette = protocol.load_instrument(
PIPETTE_NAME, PIPETTE_MOUNT, tip_racks=[tiprack])
test_labware = protocol.load_labware_from_definition(
LABWARE_DEF,
TEST_LABWARE_SLOT,
LABWARE_LABEL,
)
num_cols = len(LABWARE_DEF.get('ordering', [[]]))
num_rows = len(LABWARE_DEF.get('ordering', [[]])[0])
well_locs = uniq([
'A1',
'{}{}'.format(chr(ord('A') + num_rows - 1), str(num_cols))])
pipette.pick_up_tip()
def set_speeds(rate):
protocol.max_speeds.update({
'X': (600 * rate),
'Y': (400 * rate),
'Z': (125 * rate),
'A': (125 * rate),
})
speed_max = max(protocol.max_speeds.values())
for instr in protocol.loaded_instruments.values():
instr.default_speed = speed_max
set_speeds(RATE)
for slot in CALIBRATION_CROSS_SLOTS:
coordinate = CALIBRATION_CROSS_COORDS[slot]
location = types.Location(point=types.Point(**coordinate),
labware=None)
pipette.move_to(location)
protocol.pause(
f"Confirm {PIPETTE_MOUNT} pipette is at slot {slot} calibration cross")
pipette.home()
protocol.pause(f"Place your labware in Slot {TEST_LABWARE_SLOT}")
for well_loc in well_locs:
well = test_labware.well(well_loc)
all_4_edges = [
[well._from_center_cartesian(x=-1, y=0, z=1), 'left'],
[well._from_center_cartesian(x=1, y=0, z=1), 'right'],
[well._from_center_cartesian(x=0, y=-1, z=1), 'front'],
[well._from_center_cartesian(x=0, y=1, z=1), 'back']
]
set_speeds(RATE)
pipette.move_to(well.top())
protocol.pause("Moved to the top of the well")
for edge_pos, edge_name in all_4_edges:
set_speeds(SLOWER_RATE)
edge_location = types.Location(point=edge_pos, labware=None)
pipette.move_to(edge_location)
protocol.pause(f'Moved to {edge_name} edge')
set_speeds(RATE)
pipette.move_to(well.bottom())
protocol.pause("Moved to the bottom of the well")
pipette.blow_out(well)
set_speeds(1.0)
pipette.return_tip()