hershey50 commited on
Commit
dcd76cc
1 Parent(s): 3a3280b

Create test_protocol.py

Browse files
Files changed (1) hide show
  1. test_protocol.py +48 -0
test_protocol.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from opentrons import protocol_api
2
+
3
+ metadata = {
4
+ 'protocolName': 'My Protocol',
5
+ 'author': 'Your Name',
6
+ 'description': 'Description of the protocol',
7
+ 'apiLevel': '2.12'
8
+ }
9
+
10
+ def run(protocol: protocol_api.ProtocolContext):
11
+ # Labware
12
+ plate = protocol.load_labware('corning_96_wellplate_360ul_flat', '1')
13
+ tiprack = protocol.load_labware('opentrons_96_tiprack_300ul', '2')
14
+ pipette = protocol.load_instrument('p300_single_gen2', 'right', tip_racks=[tiprack])
15
+
16
+ # Parameters
17
+ num_samples = 96
18
+ sample_volume = 200
19
+ reagent_volume = 50
20
+
21
+ # Reagent reservoirs
22
+ reagent_reservoir = protocol.load_labware('usascientific_12_reservoir_22ml', '3')
23
+
24
+ # Transfer reagent to samples
25
+ for well in plate.wells()[:num_samples]:
26
+ pipette.pick_up_tip()
27
+ pipette.aspirate(reagent_volume, reagent_reservoir.wells()[0])
28
+ pipette.dispense(reagent_volume, well)
29
+ pipette.blow_out(well.top())
30
+ pipette.drop_tip()
31
+
32
+ # Mix samples
33
+ for well in plate.wells()[:num_samples]:
34
+ pipette.pick_up_tip()
35
+ pipette.mix(5, sample_volume, well)
36
+ pipette.drop_tip()
37
+
38
+ # Incubate samples
39
+ protocol.delay(minutes=30) # Incubate for 30 minutes
40
+
41
+ # Transfer samples to a new plate
42
+ output_plate = protocol.load_labware('corning_96_wellplate_360ul_flat', '4')
43
+ for src_well, dest_well in zip(plate.wells()[:num_samples], output_plate.wells()[:num_samples]):
44
+ pipette.pick_up_tip()
45
+ pipette.aspirate(sample_volume, src_well)
46
+ pipette.dispense(sample_volume, dest_well)
47
+ pipette.blow_out(dest_well.top())
48
+ pipette.drop_tip()