Example #1
0
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
Example #2
0
 def mix(pipette: InstrumentContext, n_mixes, vol, location):
     if n_mixes == 0:
         return
     else:
         pipette.mix(n_mixes, vol, location)