GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — LabCompiler/examples/deck_layouts.py at master · MyersResearchGroup/LabCompiler Expand file tree/ Copy pathdeck_layouts.pyMore file actions 196 lines (179 loc) · 6.62 KB / Copy pathdeck_layouts.pyFile metadata and controls196 lines (179 loc) · 6.62 KB 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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 """Prepare a BCA protein assay plate on OT-2, Flex, or STAR using one Lab deck. These illustrative layouts must be adapted to the configuration of your instrument. Compilation is offline; direct execution of the generated program uses a software backend. Standards, protein samples, and BCA working reagent are supplied already prepared. Plate preparation follows the Pierce BCA Protein Assay microplate method: https://www.thermofisher.com/TFS-Assets/LSG/manuals/MAN0011430_Pierce_BCA_Protein_Asy_UG.pdf """ import argparse from decimal import Decimal from lab import Protocol, compile, uL from lab.deck import ( Carrier, Channel, Deck, DeckLayout, HolderSite, Pipette, Placement, Rail, Slot, TipRack, ) from lab.equipment import ( CarrierModel, LabwareModel, LiquidHandler, Mount, PipetteModel, TipRackModel, ) from lab.labware import PLATE_96, ContainerSpec, LabwareKind, LabwareSpec def protocol() -> Protocol: """Describe logical wells and transfers independently of physical placement.""" p = Protocol("BCA protein assay plate preparation") sources = p.plate("sources", shape=(1, 12), capacity=200 * uL) assay = p.plate("assay", capacity=360 * uL) working_reagent = p.container( "working_reagent", contents="Prepared BCA working reagent", volume=6000 * uL, capacity=15000 * uL, dead_volume=500 * uL, ) standards = (0, 25, 125, 250, 500, 750, 1000, 1500, 2000) materials = ( *(f"BSA standard, {concentration} ug/mL" for concentration in standards), "Purified lysozyme sample 1", "Purified lysozyme sample 2", "Purified lysozyme sample 3", ) for column, material in enumerate(materials, start=1): p.load(sources[f"A{column}"], material, volume=100 * uL) # Rows A and B contain duplicate standards (columns 1-9) and samples (10-12). for row in ("A", "B"): for column in range(1, 13): p.transfer(sources[f"A{column}"], assay[f"{row}{column}"], volume=25 * uL) for row in ("A", "B"): for column in range(1, 13): p.transfer(working_reagent, assay[f"{row}{column}"], volume=200 * uL) p.manual( "Transfer the assay plate to the BCA mixing, incubation, and absorbance-reading " "workflow described in the Pierce BCA Protein Assay guide. " "Retain the duplicate standard and sample positions in rows A and B." ) return p def deck() -> Deck: """Share container requirements and describe each layout using Lab objects.""" return Deck( containers=( ContainerSpec( id="sources", labware=LabwareSpec( kind=LabwareKind.PLATE, rows=1, columns=12, capacity_ul=Decimal(200) ), ), ContainerSpec(id="assay", labware=PLATE_96), ContainerSpec( id="working_reagent", labware=LabwareSpec( kind=LabwareKind.RESERVOIR, rows=1, columns=1, capacity_ul=Decimal(15000) ), ), ), layouts=( opentrons_layout(LiquidHandler.OT2), opentrons_layout(LiquidHandler.FLEX), hamilton_layout(), ), ) def hamilton_layout() -> DeckLayout: """Place plates, a reservoir, and tips on STAR carriers and rails.""" return DeckLayout( liquid_handler=LiquidHandler.STAR, carriers=( Carrier(id="tip_carrier", model=CarrierModel.HAMILTON_TIP_5, location=Rail(3)), Carrier(id="plate_carrier", model=CarrierModel.HAMILTON_PLATE_5, location=Rail(20)), ), placements=( Placement( container="sources", model=LabwareModel.CORNING_96_360_UL, location=HolderSite("plate_carrier", 0), wells=tuple(f"B{column}" for column in range(1, 13)), ), Placement( container="assay", model=LabwareModel.CORNING_96_360_UL, location=HolderSite("plate_carrier", 3), ), Placement( container="working_reagent", model=LabwareModel.NEST_12_RESERVOIR_15_ML, location=HolderSite("plate_carrier", 4), wells=("A1",), ), ), tip_racks=( TipRack( id="tips", model=TipRackModel.HAMILTON_300_UL, location=HolderSite("tip_carrier", 2) ), ), channels=( Channel( index=0, min_volume_ul=Decimal(20), max_volume_ul=Decimal(300), tip_racks=("tips",) ), ), ) def opentrons_layout(handler: LiquidHandler) -> DeckLayout: """Place plates, a reservoir, and tips in OT-2 or Flex slots.""" if handler not in (LiquidHandler.OT2, LiquidHandler.FLEX): raise ValueError("Choose LiquidHandler.OT2 or LiquidHandler.FLEX.") flex = handler == LiquidHandler.FLEX return DeckLayout( liquid_handler=handler, placements=( Placement( container="sources", model=LabwareModel.CORNING_96_360_UL, location=Slot("D1" if flex else "1"), wells=tuple(f"B{column}" for column in range(1, 13)), ), Placement( container="assay", model=LabwareModel.CORNING_96_360_UL, location=Slot("D2" if flex else "2"), ), Placement( container="working_reagent", model=LabwareModel.NEST_12_RESERVOIR_15_ML, location=Slot("C2" if flex else "4"), wells=("A1",), ), ), tip_racks=( TipRack( id="tips", model=TipRackModel.FLEX_200_UL if flex else TipRackModel.OPENTRONS_300_UL, location=Slot("C1" if flex else "3"), ), ), pipettes=( Pipette( model=PipetteModel.FLEX_1CHANNEL_1000 if flex else PipetteModel.P300_SINGLE_GEN2, mount=Mount.LEFT, tip_racks=("tips",), ), ), ) def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "--target", choices=tuple(handler.value for handler in LiquidHandler), default="star" ) parser.add_argument("--out", default=None) args = parser.parse_args() bundle = compile(protocol(), deck=deck(), liquid_handler=LiquidHandler(args.target)) print(bundle.write(args.out or f"build/decks/{args.target}")) if __name__ == "__main__": main() |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |