seq_primers[seq_set["sequencing_primer"]].extend( seq_wells.indices()) if seq_set["mutant_label"] not in mutant_well_table[ seq_set["sequencing_primer"]]: mutant_well_table[seq_set["sequencing_primer"]].update( {seq_set["mutant_label"]: seq_wells.indices()}) else: mutant_well_table[seq_set["sequencing_primer"]][ seq_set["mutant_label"]].extend(seq_wells.indices()) j += num_colonies protocol.seal(seq_plate) for primer, wells in seq_primers.iteritems(): dataref = "Seq_primer_%s" % (primer.container.name) assert primer.volume - Unit("1.1", "microliter").__mul__( len(wells) ) > Unit( "0", "microliter" ), "You must have at least 1.1uL of sequencing primer per reaction well." protocol.sangerseq(seq_plate, wells, dataref, type="rca", primer=primer.container) if __name__ == '__main__': from autoprotocol.harness import run run(kunkel_mutagenesis)
num_of_dilutions * len(params.samples), columnwise=True) protocol.dispense(dilution_plate, params.diluent, [{ 'column': i, 'volume': total_well_volume - (total_well_volume / params.samples[i]["dilution_factor"]) } for i in xrange(0, len(params.samples))]) for g in params["samples"]: protocol.transfer(g["sample"], dilution_plate.well(params.samples.index(g)), total_well_volume / g["dilution_factor"], mix_after=True) g["column"] = params.samples.index(g) for g in params["samples"]: well = g["column"] * 8 while well < g["column"] * 8 + 7: protocol.transfer(wells[well], wells[well + 1], total_well_volume / g["dilution_factor"], mix_after=True) well += 1 if __name__ == '__main__': from autoprotocol.harness import run run(serial_dilute_plus, 'SerialDilutePlus')
# cm "ki17urn3gg8tmj" # "noAB" "ki17reefwqq3sq" agar_plates = [] agar_wells = WellGroup([]) for well in range(0, len(transformation_wells), 6): agar_name = "agar-%s_%s" % (len(agar_plates), printdatetime(time=False)) agar_plate = ref_kit_container(protocol, agar_name, "6-flat", "ki17rs7j799zc2", discard=False, store='cold_4') agar_plates.append(agar_plate) for i, w in enumerate(transformation_wells[well:well + 6]): protocol.spread(w, agar_plate.well(i), "100:microliter") agar_wells.append(agar_plate.well(i).set_name(w.name)) for agar_p in agar_plates: protocol.incubate(agar_p, 'warm_37', '12:hour') protocol.image_plate(agar_p, mode='top', dataref=agar_p.name) # return agar plates to end protocol return agar_plates if __name__ == '__main__': from autoprotocol.harness import run run(transform, 'Transform')
for primer in well_set['seq_primers']: if primer in seq_primers.keys(): seq_primers[primer].extend(well_set['growth_wells'].wells) else: seq_primers[primer] = [] seq_primers[primer].extend(well_set['growth_wells'].wells) seq_plates = [] for i, primer in enumerate(seq_primers.keys()): if len(seq_primers[primer]) >= 97: raise UserError('You can only sequence up to 96 wells per primer,' ' please submit separate sequencing protocols.') seq_plates.append(protocol.ref('seq_plate_%s_%s' % (primer.container.name, printdatetime(time=False)), cont_type='96-pcr', storage='cold_4')) seq_wells = seq_plates[i].all_wells(columnwise=True) for j, well in enumerate(seq_primers[primer]): protocol.transfer(well, seq_wells[j], "30:microliter") if well.name: seq_wells[j].set_name(well.name) else: seq_wells[j].set_name('well_%s_%s' % (well.humanize(), str(primer.container.name))) for k, primer in enumerate(seq_primers.keys()): dataref = "seq_primer:_%s" % (primer.container.name,) protocol.sangerseq(seq_plates[k], seq_plates[k].wells_from(0, len(seq_primers[primer]), columnwise=True).indices(), dataref, type="rca", primer=primer.container) if __name__ == '__main__': from autoprotocol.harness import run run(sequence, 'Sequence')
polymerize_MM = mix_plate.well(12) reagents = {"buffer": {"resource_id": 'rs17sh5rzz79ct', "reagent_ratio": 0.6}, "t4ligase": {"resource_id": 'rs16pc8krr6ag7', "reagent_ratio": 0.4}, "t7polymerase": {"resource_id": 'rs16pca2urcz74', "reagent_ratio": 0.4}, "dntp": {"resource_id": 'rs16pcb542c5rd', "reagent_ratio": 0.4} } provision_reagents(reagents, polymerize_MM, num_constructs, mm_mult, num_rxts_plus) protocol.transfer(atp, polymerize_MM, "%s:microliter" % ((num_constructs + num_rxts_plus) * 0.4 * mm_mult), new_group=True) for reaction in anneal_wells.wells: protocol.transfer(polymerize_MM, reaction, "2.2:microliter", mix_after=False, **transfer_kwargs(10)) if 'mutant_objs' in params.keys(): mut = next(m for m in params['mutant_objs'] if m.name == reaction.name) mut.anneal_well = reaction protocol.seal(annealing_plate) protocol.incubate(annealing_plate, "ambient", "1.5:hour") # pass plate back for unsealing return annealing_plate if __name__ == '__main__': from autoprotocol.harness import run run(assemble, "Assemble")
from autoprotocol.util import make_dottable_dict from autoprotocol import Unit def glycerol_storage(protocol,params): params = make_dottable_dict(params) for g in params["samples"]: container = protocol.ref(g["label"], cont_type="micro-1.5", storage = "cold_80") protocol.provision("rs17rrhqpsxyh2", container.well(0), "500:microliter") protocol.transfer(g["sample"], container.well(0), "500:microliter", mix_after = True) if __name__ == '__main__': from autoprotocol.harness import run run(glycerol_storage, 'GlycerolStorage')
for innoculant, dest in zip(params.samples, solid_culture_plate_wells): protocol.spread(innoculant, dest, params.sample_volume) protocol.cover(solid_culture_plate) protocol.incubate(solid_culture_plate, "warm_37", params.plate_growth_time, shaking = False) protocol.dispense(liquid_culture_plate, params.media, [{'column': i, 'volume': params.media_volume} for i in xrange(len(samples))]) if len(params.antibiotic_id) > 0: protocol.provision(antibiotic_id, liquid_culture_plate.wells_from(0, len(samples) * 8, columnwise = True), params.antibiotic_volume) if len(params.carbon_source) > 0: protocol.distribute(params.carbon_source.set_volume("1500:microliter"), liquid_culture_plate.wells_from(0, len(samples) * 8, columnwise = True), params.carbon_source_volume) protocol.uncover(solid_culture_plate) protocol.image_plate(solid_culture_plate, "top", dataref="culture_plate_image__%s" % today) count = 0 while count < len(samples): protocol.autopick(solid_culture_plate.well(count), liquid_culture_plate.wells_from(count,8,columnwise = True), min_count = params.minimum_picked_colonies, dataref="autopick_%d" % count) count += 1 protocol.cover(solid_culture_plate) protocol.cover(liquid_culture_plate) protocol.incubate(liquid_culture_plate,"warm_37", params.liq_growth_time, shaking=True) if __name__ == '__main__': from autoprotocol.harness import run run(spread_n_pick, 'SpreadNPick')
from autoprotocol.util import make_dottable_dict from autoprotocol import Unit def serial_dilute_plus(protocol,params): params = make_dottable_dict(params) dilution_plate = protocol.ref("dilution plate", cont_type="96-flat", storage = params.storage_condition) # total_well_volume is 150 so that a factor of 2 dilution we don't exceed the well volume. total_well_volume = Unit(150,"microliter") num_of_dilutions = 8 wells = dilution_plate.wells_from(0, num_of_dilutions * len(params.samples ), columnwise = True) protocol.dispense(dilution_plate, params.diluent, [{'column': i, 'volume': total_well_volume - (total_well_volume/params.samples[i]["dilution_factor"])} for i in xrange(0,len(params.samples))]) for g in params["samples"]: protocol.transfer(g["sample"], dilution_plate.well(params.samples.index(g)), total_well_volume/g["dilution_factor"], mix_after = True) g["column"] = params.samples.index(g) for g in params["samples"]: well = g["column"] * 8 while well < g["column"] * 8 + 7: protocol.transfer(wells[well], wells[well+1], total_well_volume/g["dilution_factor"], mix_after = True) well += 1 if __name__ == '__main__': from autoprotocol.harness import run run(serial_dilute_plus, 'SerialDilutePlus')
def grow( protocol, params ): protocol.dispense_full_plate( params['plate'], 'tb-broth-50ug-ml-kan', '1:milliliter' ) from autoprotocol.harness import run if __name__ == '__main__': run( grow, "grow" )
protocol.seal( oligo_plate2 ) ramp = [ { "cycles": 1, "steps": [{ "temperature": "%d:celsius" % ( 95 - i ), "duration": "1:minute", }] } for i in range( 70 )] protocol.thermocycle( oligo_plate2, ramp ) protocol.unseal( oligo_plate2 ) # polymerize mutants protocol.distribute( pol_mix, oligo_plate2.wells_from( 0, len(mutants) ), '2.2:microliter' ) protocol.seal( oligo_plate2 ) protocol.incubate( oligo_plate2, "ambient", "90:minute" ) protocol.unseal( oligo_plate2 ) # transform mutants competent_cells = protocol.ref( 'competent_cells', None, 'micro-2.0', discard=True ).well( 0 ).set_volume( '2000:microliter' ) protocol.distribute( competent_cells, oligo_plate2.wells_from( 0, len(mutants) ), '25:microliter' ) protocol.seal( oligo_plate2 ) protocol.incubate( oligo_plate2, 'cold_4', '20:minute' ) protocol.unseal( oligo_plate2 ) # plate mutants # pick colonies # grow # sequence if __name__ == '__main__': from autoprotocol.harness import run run(kunkel, "Kunkel")
protocol.incubate('substrate_plate', 'ambient', '15:minute') #aliquot mutants for i,mutant in enumerate(params.mutants): protocol.distribute(mutant, refs.enzyme.wells_from(i*24, 24, columnwise=True), "25:microliter") # initiate reaction # how long will this take? # ideally < 100 s #protocol.transfer( # refs.substrate_plate.all_wells(), # refs.enzyme.all_wells(), # '25:microliter', # mix_after=True, # mix_vol="25:microliter", # repetitions=2, ) protocol.stamp( substrate_plate, enzyme, '75:microliter' ) # 20 reads for i in range(1,21): protocol.absorbance('enzyme', refs.enzyme.all_wells(), '420:nanometer', 'data%s' % i) protocol.incubate('enzyme', 'ambient', '30:second') if __name__ == '__main__': from autoprotocol.harness import run run(bagel_assay)
plasmidprep(protocol, miniprep_params) if params["other_processing"]["other_processing"] == "Return Colonies": return_plate = protocol.ref("return_plate_%s" % printdatetime(time=False), cont_type='96-pcr', storage='cold_4') for mut in mutant_constructs: for g_well in mut.growth_wells: protocol.transfer(g_well, return_plate.well(g_well.index), "30:microliter") return_plate.well(g_well.index).set_name(g_well.name) protocol.seal(return_plate) protocol.cover(growth_plate, lid="low_evaporation") if params["other_processing"]["other_processing"] == "Return Colonies Glycerol": return_plate = protocol.ref("return_plate_glycerol_%s" % printdatetime(time=False), cont_type='96-pcr', storage='cold_4') for mut in mutant_constructs: for g_well in mut.growth_wells: protocol.transfer(g_well, return_plate.well(g_well.index), "30:microliter") return_plate.well(g_well.index).set_name(g_well.name) for mut in mutant_constructs: for g_well in mut.growth_wells: protocol.provision("rs17rrhqpsxyh2", return_plate.well(g_well.index), "30:microliter") protocol.seal(return_plate) protocol.cover(growth_plate, lid="low_evaporation") if __name__ == '__main__': from autoprotocol.harness import run run(kunkel_full, 'KunkelSiegel')
growth_plate = protocol.ref("plasmid_prep_growth_plate_%s" % printdatetime(), cont_type="96-deep", discard=True) protocol.dispense(growth_plate, params['media'], dispense_cols) src_samples = WellGroup([item['sample'] for item in params['samples']]) protocol.transfer(src_samples, growth_plate.wells_from(0, num_samples, columnwise=True), "10:microliter") protocol.cover(params["growth_plate"], lid="low_evaporation") protocol.cover(growth_plate, lid="standard") protocol.incubate(growth_plate, "warm_37", duration, shaking=True, co2=0) prep(growth_plate.wells_from(0, num_samples, columnwise=True), dests) if params['type'] == 'Maxiprep': new_dests = [] for i in range(0, num_samples): new_dests.append(protocol.ref('maxiprep_%d_%s' % (i+1, printdatetime()), cont_type="micro-1.5", storage="cold_20").well(0)) protocol.transfer(dests[i], new_dests[i], transfer_vol) dests = new_dests for name, well in zip(names, dests): well.set_name("%s_%s" % (name, printdatetime(time=False))) if __name__ == '__main__': from autoprotocol.harness import run run(plasmidprep, "PlasmidPrep")
provision_reagents(reagents, polymerize_MM, num_constructs, mm_mult, num_rxts_plus) protocol.transfer(atp, polymerize_MM, "%s:microliter" % ((num_constructs + num_rxts_plus) * 0.4 * mm_mult), new_group=True) for reaction in anneal_wells.wells: protocol.transfer(polymerize_MM, reaction, "2.2:microliter", mix_after=False, **transfer_kwargs(10)) if 'mutant_objs' in params.keys(): mut = next(m for m in params['mutant_objs'] if m.name == reaction.name) mut.anneal_well = reaction protocol.seal(annealing_plate) protocol.incubate(annealing_plate, "ambient", "1.5:hour") # pass plate back for unsealing return annealing_plate if __name__ == '__main__': from autoprotocol.harness import run run(assemble, "Assemble")
from autoprotocol.unit import Unit from lib.test import foo def sample_protocol(protocol, params): dest_plate = params["destination_plate"] wells_to_measure = [] for location in params["dye_locations"]: protocol.transfer(params["dye"], dest_plate.well(location["well_index"]), location["volume"]) if location["volume"] != Unit(100, "microliter"): protocol.transfer(params["water"], dest_plate.well(location["well_index"]), Unit(100, "microliter") - location["volume"], mix_after=True) wells_to_measure.append(location["well_index"]) protocol.absorbance(dest_plate, wells_to_measure, "475:nanometer", "test") if __name__ == '__main__': from autoprotocol.harness import run run(sample_protocol, "SampleProtocol1")
protocol.unseal(transformation_plate) # spread on agar plates # kan "ki17rs7j799zc2" # amp "ki17sbb845ssx9" # specto "ki17sbb9r7jf98" # cm "ki17urn3gg8tmj" # "noAB" "ki17reefwqq3sq" agar_plates = [] agar_wells = WellGroup([]) for well in range(0, len(transformation_wells), 6): agar_name = "agar-%s_%s" % (len(agar_plates), printdatetime(time=False)) agar_plate = ref_kit_container(protocol, agar_name, "6-flat", "ki17rs7j799zc2", discard=False, store='cold_4') agar_plates.append(agar_plate) for i, w in enumerate(transformation_wells[well:well + 6]): protocol.spread(w, agar_plate.well(i), "100:microliter") agar_wells.append(agar_plate.well(i).set_name(w.name)) for agar_p in agar_plates: protocol.incubate( agar_p, 'warm_37', '12:hour' ) protocol.image_plate( agar_p, mode='top', dataref=agar_p.name ) # return agar plates to end protocol return agar_plates if __name__ == '__main__': from autoprotocol.harness import run run(transform, 'Transform')
from autoprotocol.unit import Unit from lib.test import foo def sample_protocol(protocol, params): dest_plate = params["destination_plate"] wells_to_measure = [] for location in params["dye_locations"]: protocol.transfer(params["dye"], dest_plate.well(location["well_index"]), location["volume"]) if location["volume"] != Unit(100, "microliter"): protocol.transfer(params["water"], dest_plate.well(location["well_index"]), Unit(100,"microliter") - location["volume"], mix_after = True) wells_to_measure.append(location["well_index"]) protocol.absorbance(dest_plate, wells_to_measure, "475:nanometer", "test") if __name__ == '__main__': from autoprotocol.harness import run run(sample_protocol, "SampleProtocol1")
cont_type="96-pcr", storage="cold_4") seq_well_group = seq_plate.wells_from(0, num_colonies*len(params.mutants), columnwise=True) j = 0 seq_primers = {} mutant_well_table = {} for seq_set in mutants: seq_wells = WellGroup(seq_well_group[j:j+num_colonies]) protocol.transfer(growth_wells[j:j+num_colonies], seq_wells, "30:microliter") if seq_set["sequencing_primer"] not in seq_primers: seq_primers[seq_set["sequencing_primer"]] = seq_wells.indices() mutant_well_table[seq_set["sequencing_primer"]] = {seq_set["mutant_label"]: seq_wells.indices()} else: seq_primers[seq_set["sequencing_primer"]].extend(seq_wells.indices()) if seq_set["mutant_label"] not in mutant_well_table[seq_set["sequencing_primer"]]: mutant_well_table[seq_set["sequencing_primer"]].update({seq_set["mutant_label"]: seq_wells.indices()}) else: mutant_well_table[seq_set["sequencing_primer"]][seq_set["mutant_label"]].extend(seq_wells.indices()) j += num_colonies protocol.seal(seq_plate) for primer, wells in seq_primers.iteritems(): dataref = "Seq_primer_%s" % (primer.container.name) assert primer.volume - Unit("1.1", "microliter").__mul__(len(wells)) > Unit("0", "microliter"), "You must have at least 1.1uL of sequencing primer per reaction well." protocol.sangerseq(seq_plate, wells, dataref, type="rca", primer=primer.container) if __name__ == '__main__': from autoprotocol.harness import run run(kunkel_mutagenesis)
'ssDNA': ssDNA, 'constructs': [{ 'mutant_name': mu.name, 'oligos': mu.oligos } for mu in mutant_constructs], 'mutant_objs': mutant_constructs } annealing_plate = assemble(protocol, assemble_params) protocol.unseal(annealing_plate) transform_params = { #'num_colonies': num_colonies, 'growth_media': growth_media, 'constructs': [mu.anneal_well for mu in mutant_constructs], 'mutant_objs': mutant_constructs } # get agar plates back from transform protocol agar_plates = transform(protocol, transform_params) for agar_plate in agar_plates: protocol.cover(agar_plate) if __name__ == '__main__': from autoprotocol.harness import run run(kunkel_full, 'Kunkel')
protocol.incubate('substrate_plate', 'ambient', '15:minute') #aliquot mutants for i, mutant in enumerate(params.mutants): protocol.distribute( mutant, refs.enzyme.wells_from(i * 24, 24, columnwise=True), "25:microliter") # initiate reaction # how long will this take? # ideally < 100 s #protocol.transfer( # refs.substrate_plate.all_wells(), # refs.enzyme.all_wells(), # '25:microliter', # mix_after=True, # mix_vol="25:microliter", # repetitions=2, ) protocol.stamp(substrate_plate, enzyme, '75:microliter') # 20 reads for i in range(1, 21): protocol.absorbance('enzyme', refs.enzyme.all_wells(), '420:nanometer', 'data%s' % i) protocol.incubate('enzyme', 'ambient', '30:second') if __name__ == '__main__': from autoprotocol.harness import run run(bagel_assay)