### Opentrons OT-1 Precision Pipetting - Start Source: https://docs.opentrons.com/ot1/examples This snippet is the beginning of an example demonstrating precision pipetting on the Opentrons OT-1, specifically showing how to deposit liquid around the edge of a well. It starts by picking up a tip. ```python p200.pick_up_tip() ``` -------------------------------- ### Opentrons OT-1 Setup and Pipette Initialization Source: https://docs.opentrons.com/ot1/examples Initializes the Opentrons robot environment, loads containers (a 96-well plate and a trough), and sets up two tip racks and a 200uL pipette. This is a prerequisite for most liquid handling operations. ```python from opentrons import robot, containers, instruments plate = containers.load('96-flat', 'B1') trough = containers.load('trough-12row', 'C1') tiprack_1 = containers.load('tiprack-200ul', 'A1') tiprack_2 = containers.load('tiprack-200ul', 'A2') p200 = instruments.Pipette( axis="b", max_volume=200, tip_racks=[tiprack_2]) ``` -------------------------------- ### Setup for Tip Iteration Source: https://docs.opentrons.com/ot1/pipettes This setup code imports necessary modules and loads multiple tip racks and a trash container. It prepares the environment for demonstrating automatic tip iteration and disposal. ```python from opentrons import containers, instruments trash = containers.load('point', 'D2') tip_rack_1 = containers.load('tiprack-200ul', 'B1') tip_rack_2 = containers.load('tiprack-200ul', 'B2') ``` -------------------------------- ### Pipette Starting Tip Selection Source: https://docs.opentrons.com/ot1/pipettes Illustrates how to set a specific tip to start iterating from using the `start_at_tip()` method. This allows for more control over which tip the pipette initially uses. ```python pipette.reset() pipette.start_at_tip(tip_rack_1['C3']) pipette.pick_up_tip() # pick up C3 from "tip_rack_1" pipette.return_tip() ``` -------------------------------- ### Initialize Opentrons API and Load Labware Source: https://docs.opentrons.com/ot1/robot This snippet demonstrates the initial setup required for advanced control. It imports necessary modules and loads a plate and tiprack onto the robot's deck, then initializes a pipette. This setup is a prerequisite for most advanced control operations. ```python ''' Examples in this section require the following ''' from opentrons import robot, containers, instruments plate = containers.load('96-flat', 'B1', 'my-plate') tiprack = containers.load('tiprack-200ul', 'A1', 'my-rack') pipette = instruments.Pipette(axis='b', max_volume=200, name='my-pipette') ``` -------------------------------- ### Opentrons OT-1 Looping and Distribution Source: https://docs.opentrons.com/ot1/examples Illustrates using Python loops to automate liquid distribution from a trough to multiple rows of a plate. This example distributes 20uL from specific wells in the trough to corresponding rows on the plate. ```python # distribute 20uL from trough:A1 -> plate:row:1 # distribute 20uL from trough:A2 -> plate:row:2 # etc... # ranges() starts at 0 and stops at 12, creating a range of 0-11 for i in range(12): p200.distribute(20, trough.wells(i), plate.rows(i)) ``` -------------------------------- ### Pipette Pick Up Tip Example Source: https://docs.opentrons.com/ot1/api Shows how to pick up a pipette tip, either manually specified or automatically from a tip rack. Includes returning the tip. ```python `pick_up_tip`(_location=None_ , _presses=3_)¶ Pick up a tip for the Pipette to run liquid-handling commands with Notes A tip can be manually set by passing a location. If no location is passed, the Pipette will pick up the next available tip in it’s tip_racks list (see `Pipette`) Parameters:| **location** (`Placeable` or tuple(`Placeable`, `Vector`)) – The `Placeable` (`Well`) to perform the pick_up_tip. Can also be a tuple with first item `Placeable`, second item relative `Vector` ---|--- Returns:| Return type:| This instance of `Pipette`. Examples ``` >>> robot.reset() >>> tiprack = containers.load('tiprack-200ul', 'A1') >>> p200 = instruments.Pipette(axis='a', tip_racks=[tiprack]) >>> p200.pick_up_tip(tiprack[0]) >>> p200.return_tip() >>> # `pick_up_tip` will automatically go to tiprack[1] >>> p200.pick_up_tip() >>> p200.return_tip() ``` ``` -------------------------------- ### Pipette Return Tip Example Source: https://docs.opentrons.com/ot1/api Demonstrates the 'return_tip' method, which drops the current tip into its originating tip rack. Requires tip racks to be configured. ```python `return_tip`(_home_after=True_)¶ Drop the pipette’s current tip to it’s originating tip rack Notes This method requires one or more tip-rack `Container` to be in this Pipette’s tip_racks list (see `Pipette`) Returns:| ---|--- Return type:| This instance of `Pipette`. Examples ``` >>> tiprack = containers.load('tiprack-200ul', 'A1') >>> p200 = instruments.Pipette(axis='a', ... tip_racks=[tiprack], max_volume=200, name='p200') >>> p200.pick_up_tip() >>> p200.aspirate(50, plate[0]) >>> p200.dispense(plate[1]) >>> p200.return_tip() ``` ``` -------------------------------- ### Opentrons OT-1 Multiple Air Gaps Source: https://docs.opentrons.com/ot1/examples Shows how to perform multiple aspirate and air gap cycles within a single tip for the Opentrons OT-1. This example aspirates from several wells in a trough, creating an air gap between each aspiration, before dispensing. ```python p200.pick_up_tip() for well in trough.wells(): p200.aspirate(5, well).air_gap(10) p200.dispense(plate.wells('A1')) p200.return_tip() ``` -------------------------------- ### Pipette Move To Example Source: https://docs.opentrons.com/ot1/api Illustrates the 'move_to' method for positioning a Pipette on the deck. It supports 'arc' (default) and 'direct' movement strategies. ```python `move_to`(_location_ , _strategy='arc'_)¶ Move this `Pipette` to a `Placeable` on the `Deck` Notes Until obstacle-avoidance algorithms are in place, `Robot` and `Pipette` `move_to()` use either an “arc” or “direct” Parameters:| * **location** (`Placeable` or tuple(`Placeable`, `Vector`)) – The destination to arrive at * **strategy** (_"arc" or "direct"_) – “arc” strategies (default) will pick the head up on Z axis, then over to the XY destination, then finally down to the Z destination. “direct” strategies will simply move in a straight line from the current position ---|--- Returns:| Return type:| This instance of `Pipette`. ``` -------------------------------- ### Opentrons OT-1 Plate Mapping with Random Volumes Source: https://docs.opentrons.com/ot1/examples An example of mapping various volumes to wells in a plate using the Opentrons OT-1. It uses a predefined list of volumes to distribute from a source to the entire plate, automatically refilling tips as needed. ```python water_volumes = [ 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 ] p200.distribute(water_volumes, trough.wells('A12'), plate) ``` -------------------------------- ### Import Containers and Instruments Source: https://docs.opentrons.com/ot1/pipettes This setup code imports both the 'containers' and 'instruments' modules from the opentrons library. It also loads a 'trash' container and a 'tiprack' for use in subsequent tip handling operations. ```python from opentrons import containers, instruments trash = containers.load('point', 'D2') tiprack = containers.load('tiprack-200ul', 'B1') pipette = instruments.Pipette(axis='a') ``` -------------------------------- ### Pipette Transfer with New Tip Always (Python) Source: https://docs.opentrons.com/ot1/transfer Shows how to configure the `transfer` command to always pick up a new tip for each transfer operation. This helps prevent cross-contamination between samples. The example also includes setup code for the pipette, plate, tiprack, and trash container. ```python ''' Examples in this section expect the following ''' from opentrons import containers, instruments plate = containers.load('96-flat', 'B1') tiprack = containers.load('tiprack-200ul', 'A1') trash = containers.load('point', 'D2') pipette = instruments.Pipette( axis='b', max_volume=200, tip_racks=[tiprack], trash_container=trash) pipette.transfer( 100, plate.wells('A1', 'A2', 'A3'), plate.wells('B1', 'B2', 'B3'), new_tip='always') # always pick up a new tip for c in robot.commands(): print(c) ``` -------------------------------- ### Pipette Set Speed Example Source: https://docs.opentrons.com/ot1/api Shows how to configure the plunger speed for aspirate and dispense operations using the 'set_speed' method. ```python `set_speed`(_**kwargs_)¶ Set the speed (mm/minute) the `Pipette` plunger will move during `aspirate()` and `dispense()` Parameters:| **kwargs** (_Dict_) – A dictionary who’s keys are either “aspirate” or “dispense”, and who’s values are int or float (Example: {“aspirate”: 300}) ---|--- ``` -------------------------------- ### Opentrons OT-1 Protocol Setup Source: https://docs.opentrons.com/ot1/transfer This code sets up the necessary containers and pipettes for Opentrons OT-1 liquid handling protocols. It loads a 96-well plate, a tip rack, and a trash container, then initializes a Pipette object with a specified axis, maximum volume, and tip rack configuration. ```python from opentrons import containers, instruments plate = containers.load('96-flat', 'B1') tiprack = containers.load('tiprack-200ul', 'A1') trash = containers.load('point', 'D2') pipette = instruments.Pipette( axis='b', max_volume=200, tip_racks=[tiprack], trash_container=trash) ``` -------------------------------- ### Pipette Tip Iteration and Handling Source: https://docs.opentrons.com/ot1/pipettes Demonstrates how to pick up, return, and drop pipette tips. It shows manual tip manipulation and iterating through all available tips using a loop. Includes an example of an error that occurs when attempting to pick up a tip when none are available. ```python pipette.pick_up_tip() # picks up tip_rack_1:A1 pipette.return_tip() pipette.pick_up_tip() # picks up tip_rack_1:A2 pipette.drop_tip() # automatically drops in trash # use loop to pick up tips tip_rack_1:A3 through tip_rack_2:H12 for i in range(94 + 96): pipette.pick_up_tip() pipette.return_tip() # this will raise an exception if run after the previous code block # pipette.pick_up_tip() ``` -------------------------------- ### Configuring Pipettes in Opentrons API Source: https://docs.opentrons.com/ot1/index This Python snippet demonstrates the initialization of a pipette object, specifying its associated robot axis, maximum volume, and the tip racks it will utilize. This setup is crucial for defining liquid handling capabilities. ```python pipette = instruments.Pipette(axis='b', max_volume=200, tip_racks=[tiprack]) ``` -------------------------------- ### Accessing Wells by Start and Length Source: https://docs.opentrons.com/ot1/containers Illustrates how to retrieve a specified number of wells starting from a given well using the `length=` argument. The `step=` argument can be used to select wells at intervals until the desired length is reached. Negative steps allow reverse iteration. ```python for w in plate.wells('A1', length=8): print(w) ``` ```python for w in plate.wells('A1', length=8, step=3): print(w) ``` ```python for w in plate.wells('H11', length=8, step=-1): print(w) ``` -------------------------------- ### Opentrons: Transfer with Tip Return (Not Trash) Source: https://docs.opentrons.com/ot1/transfer This example shows how to configure the transfer command to return a tip to its rack instead of discarding it in the trash. The `trash=False` argument ensures the tip is saved for potential reuse. ```python pipette.transfer( 100, plate.wells('A1'), plate.wells('B1'), trash=False) # do not trash tip for c in robot.commands(): print(c) ``` -------------------------------- ### Opentrons OT-1 Dilution Protocol Source: https://docs.opentrons.com/ot1/examples Demonstrates a dilution protocol on the Opentrons OT-1. It first spreads diluent across all wells of a plate and then performs serial dilutions of samples from a trough across columns of the plate. ```python p200.distribute(50, trough.wells('A12'), plate.wells()) # dilutent # loop through each column for i in range(8): # save the source well and destination column to variables source = trough.wells(i) column = plate.cols(i) # transfer 10uL of source to first well in column p200.transfer(10, source, column.wells('1')) # dilute the sample down the column p200.transfer( 10, column.wells('1', to='11'), column.wells('2', to='12'), mix_after=(3, 25)) ``` -------------------------------- ### Basic Liquid Transfer in Opentrons OT-1 Source: https://docs.opentrons.com/ot1/examples Demonstrates two ways to perform a basic liquid transfer of 100uL from one well to another using the Opentrons OT-1. It includes both a direct transfer command and a sequence of pick-up, aspirate, dispense, and return commands. ```python p200.transfer(100, plate.wells('A1'), plate.wells('B1')) ``` ```python p200.pick_up_tip() p200.aspirate(100, plate.wells('A1')) p200.dispense(100, plate.wells('A1')) p200.return_tip() ``` -------------------------------- ### Opentrons OT-1 Plate Mapping from CSV Source: https://docs.opentrons.com/ot1/examples Details how to read liquid volumes from a CSV file and distribute them to a plate using the Opentrons OT-1. The CSV format is specified, and the code demonstrates file reading and parsing into a list for distribution. ```python ''' This example uses a CSV file saved on the same computer, formatted as follows, where the columns in the file represent the 8 columns of the plate, and the rows in the file represent the 12 rows of the plate, and the values represent the uL that must end up at that location 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, ''' # open file with absolute path (will be different depending on operating system) # file paths on Windows look more like 'C:\\path\\to\\your\\csv_file.csv' with open('/path/to/your/csv_file.csv') as my_file: # save all volumes from CSV file into a list volumes = [] # loop through each line (the plate's columns) for l in my_file.read().splitlines(): # loop through each comma-separated value (the plate's rows) for v in l.split(','): volumes.append(float(v)) # save the volume # distribute those volumes to the plate p200.distribute(volumes, trough.wells('A1'), plate.wells()) ``` -------------------------------- ### Pipette Mix Example Source: https://docs.opentrons.com/ot1/api Demonstrates the 'mix' function of a Pipette object. This function is used to mix a specified volume of liquid within a container. ```python p200.mix(3) ``` -------------------------------- ### List Available Containers Source: https://docs.opentrons.com/ot1/containers Import the containers module and call containers.list() to get a list of all containers currently available in the Opentrons API. ```python from opentrons import containers containers.list() ``` -------------------------------- ### Pipette Touch Tip Example Source: https://docs.opentrons.com/ot1/api Demonstrates the 'touch_tip' method for removing residual droplets from the pipette tip by touching the well's side. Allows specifying a radius. ```python `touch_tip`(_location=None_ , _radius=1.0_) Touch the `Pipette` tip to the sides of a well, with the intent of removing left-over droplets Notes If no location is passed, the pipette will touch_tip from it’s current position. Parameters:| * **location** (`Placeable` or tuple(`Placeable`, `Vector`)) – The `Placeable` (`Well`) to perform the touch_tip. Can also be a tuple with first item `Placeable`, second item relative `Vector` * **radius** (_float_) – Radius is a floating point number between 0.0 and 1.0, describing the percentage of a well’s radius. When radius=1.0, `touch_tip()` will move to 100% of the wells radius. When radius=0.5, `touch_tip()` will move to 50% of the wells radius. ---|--- Returns:| Return type:| This instance of `Pipette`. Examples ``` >>> p200 = instruments.Pipette(name='p200', axis='a', max_volume=200) >>> p200.aspirate(50, plate[0]) >>> p200.dispense(plate[1]).touch_tip() ``` ``` -------------------------------- ### Basic Protocol Structure in Opentrons API Source: https://docs.opentrons.com/ot1/index This Python code demonstrates the fundamental structure of an Opentrons protocol, including importing necessary modules, defining containers and pipettes, and executing a liquid transfer command. It assumes prior setup of containers and instruments. ```python # imports from opentrons import containers, instruments # containers plate = containers.load('96-flat', 'B1') tiprack = containers.load('tiprack-200ul', 'A1') # pipettes pipette = instruments.Pipette(axis='b', max_volume=200, tip_racks=[tiprack]) # commands pipette.transfer(100, plate.wells('A1'), plate.wells('B1')) ``` -------------------------------- ### Dispense in a Circular Pattern with OT-1 API Source: https://docs.opentrons.com/ot1/examples This Python code demonstrates dispensing liquid in a circular pattern around the edge of a well using the Opentrons OT-1 API. It iterates while the pipette has volume, calculating the well edge coordinates based on radius and theta, then moves and dispenses 10ul at each step. Finally, it drops the tip. ```python theta = 0.0 while p200.current_volume > 0: well_edge = plate.wells('B1').from_center(r=1.0, theta=theta, h=0.9) destination = (plate.wells('B1'), well_edge) p200.move_to(destination, strategy='direct') p200.dispense(10) theta += 0.314 p200.drop_tip() ``` -------------------------------- ### Opentrons OT-1 Basic Transfer Source: https://docs.opentrons.com/ot1/transfer Demonstrates a basic liquid transfer using the `pipette.transfer()` command. This example transfers 100 uL from well 'A1' to well 'B1' on the loaded plate. The command automatically handles picking up a new tip before the transfer and dropping it afterward. ```python pipette.transfer(100, plate.wells('A1'), plate.wells('B1')) ``` -------------------------------- ### Slicing Wells with String Indices Source: https://docs.opentrons.com/ot1/containers Demonstrates the use of string values for the `start` and `stop` positions in slicing containers, similar to how wells can be accessed by name. This allows for more intuitive selection of well ranges. ```python for w in plate['A1':'A2':2]: print(w) ``` -------------------------------- ### Load 10ul Tiprack-H Container Source: https://docs.opentrons.com/ot1/containers Load a 10 uL tip rack for a single-channel pipette positioned in the center. This configuration uses tips from the right-hand side (E-H, 1-12), starting from H1. ```python container.load('tiprack-10ul-H', slot) ``` -------------------------------- ### Pipette Current Tip Retrieval Source: https://docs.opentrons.com/ot1/pipettes Shows how to get the current tip's source location using the `current_tip()` method. It demonstrates the return value when no tip is held, when a tip is held, and after returning a tip. ```python print(pipette.current_tip()) # is holding no tip pipette.pick_up_tip() print(pipette.current_tip()) # is holding the next available tip pipette.return_tip() print(pipette.current_tip()) # is holding no tip ``` -------------------------------- ### Pipette Dispense Liquid Source: https://docs.opentrons.com/ot1/pipettes Explains the `dispense()` method for expelling liquid from the pipette. Similar to `aspirate()`, examples demonstrate dispensing a specific volume to a location, dispensing a specific volume from the current location, and dispensing all remaining liquid to a location. ```python ''' Examples in this section expect the following ''' from opentrons import containers, instruments plate = containers.load('96-flat', 'B1') pipette = instruments.Pipette(axis='b', max_volume=200) pipette.dispense(50, plate.wells('B1')) # dispense 50uL to plate:B1 pipette.dispense(50) # dispense 50uL to current position pipette.dispense(plate.wells('B2')) # dispense until pipette empties to plate:B2 ``` -------------------------------- ### Opentrons: Transfer with Air Gap Source: https://docs.opentrons.com/ot1/transfer This example illustrates adding an air gap after aspirating liquid. The `air_gap` parameter, set to an integer representing microliters, instructs the pipette to aspirate air, which can help prevent bubble formation or trailing liquid. ```python pipette.transfer( 100, plate.wells('A1'), plate.wells('A2'), air_gap=20) # add 20uL of air after each aspirate for c in robot.commands(): print(c) ``` -------------------------------- ### Opentrons OT-1 Multiple Wells Transfer Source: https://docs.opentrons.com/ot1/transfer Demonstrates the utility of `pipette.transfer()` for moving liquid to multiple destination wells. This example transfers 100 uL from all wells in column 'A' to their corresponding wells in column 'B' of the plate. The command efficiently handles the series of aspirate and dispense operations. ```python pipette.transfer(100, plate.cols('A'), plate.cols('B')) for c in robot.commands(): print(c) ``` -------------------------------- ### Accessing Wells in a Range (Start to End) Source: https://docs.opentrons.com/ot1/containers Shows how to get a range of wells by specifying a start and an end well. The `to=` argument defines the last well in the range. This can also be combined with `step=` to select wells at intervals. ```python for w in plate.wells('A1', to='H1'): print(w) ``` ```python for w in plate.wells('A1', to='H1', step=2): print(w) ``` ```python for w in plate.wells('H1', to='A1', step=2): print(w) ``` -------------------------------- ### Instantiate Opentrons Pipette Source: https://docs.opentrons.com/ot1/api Demonstrates how to create a Pipette instance, specifying its axis, maximum volume, and optionally a name and tip racks. This is the initial step before performing any liquid handling operations. ```python >>> from opentrons import instruments, containers >>> p1000 = instruments.Pipette(axis='a', max_volume=1000) >>> tip_rack_200ul = containers.load('tiprack-200ul', 'A1') >>> p200 = instruments.Pipette( ... name='p200', ... axis='b', ... max_volume=200, ... tip_racks=[tip_rack_200ul]) ``` -------------------------------- ### Opentrons API Initialization Source: https://docs.opentrons.com/ot1/pipettes Initializes the Opentrons API environment, loading necessary containers and instruments for protocol execution. Sets up tip racks and plates for liquid handling. ```python from opentrons import containers, instruments, robot tiprack = containers.load('tiprack-200ul', 'A1') plate = containers.load('96-flat', 'B1') pipette = instruments.Pipette(axis='b') ``` -------------------------------- ### Python: Initialize and Control Robot Source: https://docs.opentrons.com/ot1/api Demonstrates basic robot control including resetting, loading containers, defining pipettes, aspirating, and retrieving the command list. Requires the 'opentrons' library. ```python >>> from opentrons import robot, instruments, containers >>> robot.reset() >>> plate = containers.load('96-flat', 'A1', 'plate') >>> p200 = instruments.Pipette(axis='b', max_volume=200) >>> p200.aspirate(200, plate[0]) >>> robot.commands() ['Aspirating 200 at '] ``` -------------------------------- ### Transfer with Volume Gradient (Python) Source: https://docs.opentrons.com/ot1/transfer Enables creating a linear gradient of volumes between a start and end value. This is achieved by passing a tuple containing the start and end volumes. This feature is ideal for creating concentration gradients across a series of wells. ```python pipette.transfer( (100, 30), plate.wells('A1'), plate.rows('2')) for c in robot.commands(): print(c) ``` -------------------------------- ### Opentrons: Transfer with Mix Before/After Source: https://docs.opentrons.com/ot1/transfer This snippet shows how to incorporate mixing steps before aspirating and after dispensing. The `mix_before` and `mix_after` arguments accept tuples specifying the number of repetitions and the volume for mixing, ensuring thorough sample homogenization. ```python pipette.transfer( 100, plate.wells('A1'), plate.wells('A2'), mix_before=(2, 50), # mix 2 times with 50uL before aspirating mix_after=(3, 75)) # mix 3 times with 75uL after dispensing for c in robot.commands(): print(c) ``` -------------------------------- ### Opentrons: Transfer with Blow Out Source: https://docs.opentrons.com/ot1/transfer This example demonstrates the use of the 'blow out' feature after a dispense operation. When `blow_out=True`, the pipette expels any remaining liquid from the tip, ensuring the entire volume is dispensed. ```python pipette.transfer( 100, plate.wells('A1'), plate.wells('A2'), blow_out=True) # blow out droplets when tip is empty for c in robot.commands(): print(c) ``` -------------------------------- ### Robot Initialization and Connection Source: https://docs.opentrons.com/ot1/api Initializes and connects to the Opentrons robot, either a physical or virtual one. Requires the `opentrons` library. ```python from opentrons import Robot robot = Robot() robot.connect('Virtual Smoothie') ``` -------------------------------- ### Load 1000ul-chem Tiprack Container Source: https://docs.opentrons.com/ot1/containers Load a 1000ul chem tip rack with a 10x10 configuration. Tips can be accessed sequentially from 0 to 99. ```python container.load('tiprack-1000ul-chem', slot) ``` -------------------------------- ### Pipette Blow Out Liquid Source: https://docs.opentrons.com/ot1/pipettes Details the `blow_out()` method, used to expel any remaining droplets from the pipette tip by pushing extra air. Examples show blowing out from the current position and blowing out over a specified location. ```python ''' Examples in this section expect the following ''' from opentrons import containers, instruments plate = containers.load('96-flat', 'B1') pipette = instruments.Pipette(axis='b', max_volume=200) pipette.blow_out() # blow out over current location pipette.blow_out(plate.wells('B3')) # blow out over current plate:B3 ``` -------------------------------- ### Slicing Wells with Integer Indices Source: https://docs.opentrons.com/ot1/containers Explains how to use Python list slicing syntax with integer indices to select a subset of wells from a container. This method supports start, stop, and step values for slicing. ```python for w in plate[0:8:2]: print(w) ``` -------------------------------- ### Initialize Magbead Module in Python Source: https://docs.opentrons.com/ot1/modules Initializes and names a Magbead module for use with the Opentrons API. Requires the 'instruments' module to be imported. ```python mag_deck = instruments.Magbead(name='mag_deck') ``` -------------------------------- ### Importing Opentrons API Modules Source: https://docs.opentrons.com/ot1/index This Python snippet shows the standard way to import the 'containers' and 'instruments' modules from the Opentrons API, which are essential for defining laboratory equipment and actions within a protocol. ```python from opentrons import containers, instruments ``` -------------------------------- ### Clear Robot Command History Source: https://docs.opentrons.com/ot1/robot Erases the recorded command history from the robot. This function, `robot.clear_commands()`, removes all executed commands but retains loaded containers and instruments. The example shows the command count before and after clearing. ```python robot.clear_commands() pipette.pick_up_tip(tiprack['A1']) print('There is', len(robot.commands()), 'command') robot.clear_commands() print('There are now', len(robot.commands()), 'commands') ``` -------------------------------- ### Create Pipette with Axis and Max Volume Source: https://docs.opentrons.com/ot1/pipettes Demonstrates how to initialize a Pipette object. It requires specifying the 'axis' ('a' or 'b') and the 'max_volume' of the pipette. This is the most basic configuration for a pipette. ```python pipette = instruments.Pipette( axis='b', name='my-p200', max_volume=200) ``` -------------------------------- ### Opentrons OT-1 Inspect Transfer Commands Source: https://docs.opentrons.com/ot1/transfer Shows how to inspect the underlying commands generated by a `transfer()` operation. By iterating through `robot.commands()`, you can view the sequence of actions, such as picking up tips, aspirating, dispensing, and dropping tips. ```python for c in robot.commands(): print(c) ``` -------------------------------- ### Slicing Columns with String Indices Source: https://docs.opentrons.com/ot1/containers Shows how to apply slicing to columns using string indices. This allows for selecting specific wells within columns based on row numbers, with support for start, stop, and step values. ```python for w in plate.cols['B']['1'::2]: print(w) ``` -------------------------------- ### Transfer with List of Volumes (Python) Source: https://docs.opentrons.com/ot1/transfer Shows how to transfer different volumes to each destination well by providing a list of volumes. This allows for precise control over the amount of liquid dispensed to each well, useful for serial dilutions or varying concentrations. ```python pipette.transfer( [20, 40, 60], plate.wells('A1'), plate.wells('B1', 'B2', 'B3')) for c in robot.commands(): print(c) ``` -------------------------------- ### Robot Movement and Configuration Source: https://docs.opentrons.com/ot1/api Methods for controlling robot movement, setting speeds, and managing instruments. ```APIDOC ## Robot Movement and Configuration ### `add_instrument(axis, instrument)` **Description**: Adds an instrument to a robot. **Parameters**: * **axis** (str) – Specifies which axis the instrument is attached to. * **instrument** (Instrument) – An instance of a `Pipette` to be attached to the axis. **Notes**: A canonical way to add a Pipette to a robot is: ```python from opentrons.instruments.pipette import Pipette p200 = Pipette(axis='a') ``` This will create a pipette and call `add_instrument()` to attach the instrument. ### `commands()` **Description**: Access the human-readable list of commands in the robot’s queue. **Returns**: * A list of string values for each command in the queue, for example: * `'Aspirating 200uL at ///'` ### `head_speed(*args, **kwargs)` **Description**: Set the XY axis speeds of the robot, set in millimeters per minute. **Parameters**: * **rate** (int) – An integer setting the mm/minute rate of the X and Y axis. Speeds too fast (around 6000 and higher) will cause the robot to skip steps; be careful when using this method. **Examples**: ```python from opentrons import robot robot.connect('Virtual Smoothie') robot.home() robot.head_speed(4500) robot.move_head(x=200, y=200) ``` ### `home(*args, **kwargs)` **Description**: Home robot’s head and plunger motors. **Parameters**: * ***args** – A string with axes to home. For example `'xyz'` or `'ab'`. If no arguments provided home Z-axis then X, Y, B, A. **Notes**: Sometimes while executing a long protocol, a robot might accumulate precision error and it is recommended to home it. In this scenario, add `robot.home('xyzab')` into your script. **Examples**: ```python from opentrons import Robot robot.connect('Virtual Smoothie') robot.home() ``` ### `move_to(location, instrument=None, strategy='arc', **kwargs)` **Description**: Move an instrument to a coordinate, container or a coordinate within a container. **Parameters**: * **location** - Coordinate, container, or coordinate within a container. * **instrument** - The instrument to move. If `None`, the pipette will default to the deck’s `(0, 0, 0)` coordinate. * **strategy** (str) - Specifies the movement strategy. Defaults to `'arc'`. ``` -------------------------------- ### Create Pipette with Minimum Volume Source: https://docs.opentrons.com/ot1/pipettes Shows how to create a Pipette object and also set a 'min_volume'. If the protocol attempts to aspirate or dispense below this volume, a warning will be issued. This helps in precise liquid handling. ```python pipette = instruments.Pipette( axis='b', name='my-p200', max_volume=200, min_volume=20) ``` -------------------------------- ### Pipette Aspirate Liquid Source: https://docs.opentrons.com/ot1/pipettes Covers the `aspirate()` method for drawing liquid into the pipette. Examples show aspirating a specific volume from a specific location, aspirating a specific volume from the current location, and aspirating to fill the pipette's remaining volume from a specific location. ```python ''' Examples in this section expect the following ''' from opentrons import containers, instruments plate = containers.load('96-flat', 'B1') pipette = instruments.Pipette(axis='b', max_volume=200) pipette.aspirate(50, plate.wells('A1')) # aspirate 50uL from plate:A1 pipette.aspirate(50) # aspirate 50uL from current position pipette.aspirate(plate.wells('A2')) # aspirate until pipette fills from plate:A2 ``` -------------------------------- ### Python: Home Robot Axes Source: https://docs.opentrons.com/ot1/api Demonstrates connecting to a virtual robot and executing the home function to reset the robot's axes to their default positions. Requires the 'opentrons' library. ```python >>> from opentrons import Robot >>> robot.connect('Virtual Smoothie') >>> robot.home() ``` -------------------------------- ### Home Robot Axes Source: https://docs.opentrons.com/ot1/robot Homes the robot's axes to their starting positions. The `home()` function can be called without arguments to home all axes, or with a specific axis (e.g., 'z') to home only that axis. Homing occurs immediately upon function call. ```python robot.home() # home the robot on all axis robot.home('z') # home the Z axis only ``` -------------------------------- ### Robot Actions Source: https://docs.opentrons.com/ot1/api Methods for managing the robot's command queue, connecting to the robot, and retrieving diagnostic information. ```APIDOC ## Robot Actions ### `actions()` **Description**: Return a copy of a raw list of commands in the Robot’s queue. ### `connect(port=None, options=None)` **Description**: Connects the robot to a serial port. **Parameters**: * **port** (str) - OS-specific port name or `'Virtual Smoothie'` * **options** (dict) - if `port` is set to `'Virtual Smoothie'`, provide the list of options to be passed to `get_virtual_device()` **Returns**: * `True` for success, `False` for failure. ### `containers()` **Description**: Returns the dict with all of the containers on the deck. ### `diagnostics()` **Description**: Access diagnostics information for the robot. **Returns**: * `axis_homed` — axis that are currently in home position. * `switches` — end stop switches currently hit. * `steps_per_mm` — steps per millimeter calibration values for `x` and `y` axis. **Return type**: * Dictionary with the following keys ### `disconnect()` **Description**: Disconnects from the robot. ### `get_mosfet(mosfet_index)` **Description**: Get MOSFET for a MagBead. **Parameters**: * **mosfet_index** (int) – Number of a MOSFET on MagBead. **Returns**: * Instance of `InstrumentMosfet`. ### `get_motor(axis)` **Description**: Get robot’s head motor. **Parameters**: * **axis** ({'a', 'b'}) – Axis name. Please check stickers on robot’s gantry for the name. ### `get_warnings()` **Description**: Get current runtime warnings. **Returns**: * Runtime warnings accumulated since the last `run()` or `simulate()`. ``` -------------------------------- ### Manage Pipette and Robot Commands Source: https://docs.opentrons.com/ot1/robot Demonstrates executing pipette commands (pick up and drop tip) and retrieving the history of executed commands from the robot. Commands are recorded in order and can be iterated through and printed. ```python pipette.pick_up_tip(tiprack.wells('A1')) pipette.drop_tip(tiprack.wells('A1')) for c in robot.commands(): print(c) ``` -------------------------------- ### Python: Connect and Control Robot Movement Source: https://docs.opentrons.com/ot1/api Illustrates connecting to a virtual robot, homing its axes, setting the head speed, and moving the head to specific coordinates. Uses the 'opentrons' library. ```python >>> from opentrons import robot >>> robot.connect('Virtual Smoothie') >>> robot.home() >>> robot.head_speed(4500) >>> robot.move_head(x=200, y=200) ``` -------------------------------- ### Attach Multiple Tip Racks and Trash to Pipette Source: https://docs.opentrons.com/ot1/pipettes This code demonstrates how to configure a Pipette object to automatically manage tips by attaching multiple tip racks and a trash container during initialization. The pipette will then iterate through tips and dispose of them automatically. ```python pipette = instruments.Pipette( axis='b', tip_racks=[tip_rack_1, tip_rack_2], trash_container=trash ) ``` -------------------------------- ### Opentrons OT-1 Large Volume Transfer Source: https://docs.opentrons.com/ot1/transfer Illustrates how the `pipette.transfer()` command handles volumes exceeding the pipette's `max_volume`. The command automatically divides the large volume into multiple smaller transfers. This example transfers 700 uL from 'A2' to 'B2', demonstrating the segmented aspiration and dispensing process. ```python pipette.transfer(700, plate.wells('A2'), plate.wells('B2')) for c in robot.commands(): print(c) ``` -------------------------------- ### Pick Up Tip from Pipette Source: https://docs.opentrons.com/ot1/pipettes Shows how to command a pipette to pick up a tip from a specified well in a tip rack. This action is essential before performing any liquid aspiration or dispensing. ```python pipette.pick_up_tip(tiprack.wells('A1')) ``` -------------------------------- ### Dispense Liquid with Pipette (Python) Source: https://docs.opentrons.com/ot1/api Dispenses a specified volume of liquid from the pipette. Can dispense to a specific location or the current position. Accepts volume, location, and rate as parameters. Returns the Pipette instance. ```python >>> p200 = instruments.Pipette(name='p200', axis='a', max_volume=200) >>> # fill the pipette with liquid (200uL) >>> p200.aspirate(plate[0]) >>> # dispense 50uL to a Well >>> p200.dispense(50, plate[0]) >>> # dispense 50uL to the center of a well >>> relative_vector = plate[1].center() >>> p200.dispense(50, (plate[1], relative_vector)) >>> # dispense 20uL in place, at half the speed >>> p200.dispense(20, rate=0.5) >>> # dispense the pipette's remaining volume (80uL) to a Well >>> p200.dispense(plate[2]) ```