|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "id": "788f6f66", |
| 6 | + "metadata": {}, |
| 7 | + "source": [ |
| 8 | + "# Mixing\n", |
| 9 | + "\n", |
| 10 | + "\n", |
| 11 | + "\n", |
| 12 | + "\n", |
| 13 | + "\n", |
| 14 | + "\n", |
| 15 | + "Mixing in PLR is hardware agnostic. You can currently mix before an aspiration or after a dispense by passing the `mix` parameter to the corresponding method call.\n", |
| 16 | + "\n", |
| 17 | + "A standalone mixing operation will be added in the future." |
| 18 | + ] |
| 19 | + }, |
| 20 | + { |
| 21 | + "cell_type": "code", |
| 22 | + "execution_count": 1, |
| 23 | + "id": "9bc0da6c", |
| 24 | + "metadata": {}, |
| 25 | + "outputs": [ |
| 26 | + { |
| 27 | + "name": "stdout", |
| 28 | + "output_type": "stream", |
| 29 | + "text": [ |
| 30 | + "Setting up the liquid handler.\n", |
| 31 | + "Resource deck was assigned to the liquid handler.\n", |
| 32 | + "Resource trash was assigned to the liquid handler.\n", |
| 33 | + "Resource trash_core96 was assigned to the liquid handler.\n", |
| 34 | + "Resource waste_block was assigned to the liquid handler.\n", |
| 35 | + "Resource tiprack_1 was assigned to the liquid handler.\n", |
| 36 | + "Resource plate_carrier_1 was assigned to the liquid handler.\n" |
| 37 | + ] |
| 38 | + } |
| 39 | + ], |
| 40 | + "source": [ |
| 41 | + "# Example deck setup for STAR. This can be any robot.\n", |
| 42 | + "from pylabrobot.liquid_handling import LiquidHandler, LiquidHandlerChatterboxBackend\n", |
| 43 | + "from pylabrobot.resources import STARDeck # as an example\n", |
| 44 | + "lh = LiquidHandler(backend=LiquidHandlerChatterboxBackend(), deck=STARDeck())\n", |
| 45 | + "await lh.setup()\n", |
| 46 | + "\n", |
| 47 | + "from pylabrobot.resources import TIP_CAR_480_A00, hamilton_96_tiprack_1000uL_filter\n", |
| 48 | + "tip_carrier = TIP_CAR_480_A00(name=\"tiprack_1\")\n", |
| 49 | + "tip_carrier[0] = tr0 = hamilton_96_tiprack_1000uL_filter(name=\"tiprack_1_0\")\n", |
| 50 | + "lh.deck.assign_child_resource(tip_carrier, rails=1)\n", |
| 51 | + "\n", |
| 52 | + "from pylabrobot.resources import PLT_CAR_L5AC_A00, Cor_96_wellplate_360ul_Fb\n", |
| 53 | + "plate_carrier = PLT_CAR_L5AC_A00(name=\"plate_carrier_1\")\n", |
| 54 | + "plate_carrier[0] = plate = Cor_96_wellplate_360ul_Fb(name=\"plate_1\")\n", |
| 55 | + "lh.deck.assign_child_resource(plate_carrier, rails=10)" |
| 56 | + ] |
| 57 | + }, |
| 58 | + { |
| 59 | + "cell_type": "markdown", |
| 60 | + "id": "1268dd30", |
| 61 | + "metadata": {}, |
| 62 | + "source": [ |
| 63 | + "## Mixing\n", |
| 64 | + "\n", |
| 65 | + "Import the `Mix` object, and pass it to the `mix` parameter of LiquidHandler.aspirate and LiquidHandler.dispense as a list, with one object per channel." |
| 66 | + ] |
| 67 | + }, |
| 68 | + { |
| 69 | + "cell_type": "code", |
| 70 | + "execution_count": 2, |
| 71 | + "id": "aabc816d", |
| 72 | + "metadata": {}, |
| 73 | + "outputs": [ |
| 74 | + { |
| 75 | + "name": "stdout", |
| 76 | + "output_type": "stream", |
| 77 | + "text": [ |
| 78 | + "Picking up tips:\n", |
| 79 | + "pip# resource offset tip type max volume (µL) fitting depth (mm) tip length (mm) filter \n", |
| 80 | + " p0: tiprack_1_0_tipspot_0_0 0,0,0 HamiltonTip 1065 8 95.1 Yes \n" |
| 81 | + ] |
| 82 | + } |
| 83 | + ], |
| 84 | + "source": [ |
| 85 | + "await lh.pick_up_tips(tr0[\"A1\"])" |
| 86 | + ] |
| 87 | + }, |
| 88 | + { |
| 89 | + "cell_type": "code", |
| 90 | + "execution_count": 3, |
| 91 | + "id": "138129de", |
| 92 | + "metadata": {}, |
| 93 | + "outputs": [ |
| 94 | + { |
| 95 | + "name": "stdout", |
| 96 | + "output_type": "stream", |
| 97 | + "text": [ |
| 98 | + "Aspirating:\n", |
| 99 | + "pip# vol(ul) resource offset flow rate blowout lld_z \n", |
| 100 | + " p0: 100.0 plate_1_well_0_0 0,0,0 None None None \n" |
| 101 | + ] |
| 102 | + } |
| 103 | + ], |
| 104 | + "source": [ |
| 105 | + "from pylabrobot.liquid_handling.standard import Mix\n", |
| 106 | + "await lh.aspirate(plate[\"A1\"], vols=[100], mix=[Mix(volume=50, repetitions=3, flow_rate=100)])" |
| 107 | + ] |
| 108 | + }, |
| 109 | + { |
| 110 | + "cell_type": "code", |
| 111 | + "execution_count": 4, |
| 112 | + "id": "ef35b35e", |
| 113 | + "metadata": {}, |
| 114 | + "outputs": [ |
| 115 | + { |
| 116 | + "name": "stdout", |
| 117 | + "output_type": "stream", |
| 118 | + "text": [ |
| 119 | + "Dispensing:\n", |
| 120 | + "pip# vol(ul) resource offset flow rate blowout lld_z \n", |
| 121 | + " p0: 100.0 plate_1_well_0_0 0,0,0 None None None \n" |
| 122 | + ] |
| 123 | + } |
| 124 | + ], |
| 125 | + "source": [ |
| 126 | + "await lh.dispense(plate[\"A1\"], vols=[100], mix=[Mix(volume=50, repetitions=3, flow_rate=100)])" |
| 127 | + ] |
| 128 | + }, |
| 129 | + { |
| 130 | + "cell_type": "code", |
| 131 | + "execution_count": 5, |
| 132 | + "id": "16158719", |
| 133 | + "metadata": {}, |
| 134 | + "outputs": [ |
| 135 | + { |
| 136 | + "name": "stdout", |
| 137 | + "output_type": "stream", |
| 138 | + "text": [ |
| 139 | + "Dropping tips:\n", |
| 140 | + "pip# resource offset tip type max volume (µL) fitting depth (mm) tip length (mm) filter \n", |
| 141 | + " p0: tiprack_1_0_tipspot_0_0 0,0,0 HamiltonTip 1065 8 95.1 Yes \n" |
| 142 | + ] |
| 143 | + } |
| 144 | + ], |
| 145 | + "source": [ |
| 146 | + "await lh.return_tips()" |
| 147 | + ] |
| 148 | + }, |
| 149 | + { |
| 150 | + "cell_type": "code", |
| 151 | + "execution_count": 6, |
| 152 | + "id": "1478be9c", |
| 153 | + "metadata": {}, |
| 154 | + "outputs": [ |
| 155 | + { |
| 156 | + "name": "stdout", |
| 157 | + "output_type": "stream", |
| 158 | + "text": [ |
| 159 | + "Stopping the liquid handler.\n" |
| 160 | + ] |
| 161 | + } |
| 162 | + ], |
| 163 | + "source": [ |
| 164 | + "await lh.stop()" |
| 165 | + ] |
| 166 | + } |
| 167 | + ], |
| 168 | + "metadata": { |
| 169 | + "kernelspec": { |
| 170 | + "display_name": "env", |
| 171 | + "language": "python", |
| 172 | + "name": "python3" |
| 173 | + }, |
| 174 | + "language_info": { |
| 175 | + "codemirror_mode": { |
| 176 | + "name": "ipython", |
| 177 | + "version": 3 |
| 178 | + }, |
| 179 | + "file_extension": ".py", |
| 180 | + "mimetype": "text/x-python", |
| 181 | + "name": "python", |
| 182 | + "nbconvert_exporter": "python", |
| 183 | + "pygments_lexer": "ipython3", |
| 184 | + "version": "3.13.7" |
| 185 | + } |
| 186 | + }, |
| 187 | + "nbformat": 4, |
| 188 | + "nbformat_minor": 5 |
| 189 | +} |
0 commit comments