def distribute_mm_to_map(p50s: InstrumentContext, plates: [Labware], tuberack: Labware, protocol: protocol_api.ProtocolContext, groups: typing.Generator, platemap: list, volume): tubes = tuberack.wells()[:6] # next(groups) for i in range(len(plates)): current_plate = plates[i] if i > len(plates) / 2: p50s.well_bottom_clearance.aspirate = .8 else: p50s.well_bottom_clearance.aspirate = 1 for tube in tubes: current_group = next(groups) map_row_counter = 0 p50s.pick_up_tip() for row in current_plate.rows(): map_row = platemap[map_row_counter] for i in range(12): if map_row[i] == current_group and map_row[i] != '': # p50s.well_bottom_clearance.aspirate = .2 p50s.aspirate(volume=volume, location=tube) # p50s.well_bottom_clearance.dispense = 8 p50s.dispense(volume=volume, location=row[i]) else: pass map_row_counter += 1 p50s.drop_tip() protocol.pause("Remove plate and press Resume to continue")
def distribute_mm_to_map(p50s: InstrumentContext, plates: [Labware], tuberack: Labware, tipracks: [Labware], facs: Labware, groups: typing.Generator, platemap: list, protocol: protocol_api.ProtocolContext): tubes = tuberack.wells()[:3] plate = plates[0] next(groups) # for plate in plates: for tube in tubes: current_group = next(groups) map_row_counter = 0 p50s.pick_up_tip() for row in plate.rows(): map_row = platemap[map_row_counter] for i in range(12): if map_row[i] == current_group and map_row[i] != '': p50s.well_bottom_clearance.aspirate = 10 p50s.aspirate(volume=50, location=tube) p50s.well_bottom_clearance.dispense = 10 p50s.dispense(volume=50, location=row[i]) else: pass map_row_counter += 1 p50s.drop_tip()
def wash(pip: InstrumentContext, vol: float, source: VolTracker, dest: list, do_dry_run: bool = False, pip_offset: float = 0, steps: int = 5, do_reuse_tip: bool = False): """ This function is used to aspirate a washing buffer and then dispense it over a well using a moving dispense :param pip: The pipette to use for washing aspirations/dispenses :param vol: The volume to wash with, e.g. 4000 uL :param source: VolTracker tracking a labware source of wash buffer, e.g. a reservoir :param dest: A list of wells to dispense to :param do_dry_run: If this argument is true then pipette tips will be returned to the rack they come from. :param pip_offset: Millimeter offset from the bottom of the well (i.e. the Shandon coverplate mouth) :param do_reuse_tip: Use only one tip for aspirating PBS / Washing each slide well? """ max_vol = pip.max_volume vol_backup = vol for well in dest: if not pip.has_tip: pick_up(pip) while vol > 0: aspiration_vol = vol if vol < max_vol else max_vol pip.aspirate(aspiration_vol, source.track(aspiration_vol)) dispense_while_moving(pip, well, aspiration_vol, steps, verbose, pip_offset) vol -= aspiration_vol if do_dry_run and not do_reuse_tip: pip.return_tip() elif not do_reuse_tip: pip.drop_tip() vol = vol_backup if do_reuse_tip and not do_dry_run: pip.drop_tip() elif do_dry_run and pip.has_tip: pip.return_tip()
def distribute_master_mix(p300m: InstrumentContext, plates: [Labware], tuberack: Labware, tipracks: [Labware]): tubes = tuberack.wells()[0:4] p300m.well_bottom_clearance.dispense = .02 tip_counter = 0 # to_remove is the number of wells to be removed from the final row. all prior rows will be assumed to be filled to_remove = 11 to_remove = 12 - to_remove # last_row is the index of the last row (rows() returns 2D list of rows by well) last_row = 1 plate = plates[0] # for plate in plates: wells = plate.rows()[:2] wells[last_row] = wells[last_row][:to_remove] # for example, pop the last 8 in a row for a # for plate in plates: # # last_row is the index of the last row (rows() returns 2D list of rows by well) # # plate = plates[0] # # for plate in plates: # wells = plate.rows()[:2] # wells[last_row] = wells[last_row][:to_remove] group_counter = 0 tip_gen = next_tip(p300m.tip_racks, 1) for tube in tubes: p300m.well_bottom_clearance.aspirate = .1 print(wells) wells = plate.rows()[:2 + group_counter] group_counter += 2 wells[last_row] = wells[last_row][:to_remove] for row in wells: for well in row: tip = next(tip_gen) print(tip) p300m.pick_up_tip(location=tip, presses=2, increment=.05) print(tube, well) p300m.aspirate(volume=100, location=tube) p300m.dispense(volume=100, location=well) p300m.well_bottom_clearance.aspirate = .02 p300m.mix(volume=60, repetitions=3, location=well) p300m.drop_tip() tip_counter += 1
def distribute_master_mix_p50(p50s: InstrumentContext, plates: [Labware], tuberack: Labware, tipracks: [Labware], facs: Labware): tubes = tuberack.wells()[:2] # to_remove is the number of wells to be removed from the final row. all prior rows will be assumed to be filled to_remove = 6 to_remove = 12 - to_remove p50s.well_bottom_clearance.dispense = 10 p50s.well_bottom_clearance.aspirate = 3 # last_row is the index of the last row (rows() returns 2D list of rows by well) for plate in plates: start_row = 0 num_rows = 2 # first group @ row 0 (row A) last_row = num_rows for tube in tubes: group = plate.rows()[start_row:last_row] last_group = group[num_rows - 1][:to_remove] group[num_rows - 1] = last_group p50s.pick_up_tip() p50s.transfer( volume=50, source=tube, dest=group, new_tip='never', ) # comment out for actual runs. this is for test p50s.drop_tip() p50s.pick_up_tip() p50s.transfer(volume=50, source=facs['A1'], dest=group, new_tip='never' ) # comment out for actual runs. this is for test p50s.drop_tip() start_row += num_rows last_row += num_rows