Exemplo n.º 1
0
 def test(self):
 
     module = importlib.import_module(module_path)
     
     
     f = open(self.temp_file_path,'wb')
     f.write(json.dumps(inputs,indent=4))       
     f.close()
    
     
     run(module.main,protocol_name, config=self.temp_file_path)
Exemplo n.º 2
0
    p.spin(container, '3000:g', '3:second')

    p.mix(dna_wells)

    if params.get('measure_concentration'):
        p.measure_concentration(dna_wells, 'dna_concentration', 'DNA', ul(2))

    if params.get('split_tubes'):

        #create a separate container and take half to be used for other experiments

        new_container = p.ref('%s_2' % container.name,
                              cont_type=container.container_type,
                              storage=Temperature.cold_4.name)

        for dna_well in dna_wells:

            new_dna_well = new_container.well(dna_well.index)
            new_dna_well.name = dna_well.name

            p.transfer(dna_well, new_dna_well, dna_well.volume / 2)

            for property_name in PROPERTIES_TO_COPY:
                if dna_well.properties.get(property_name):
                    set_property(new_dna_well, property_name,
                                 dna_well.properties[property_name])


if __name__ == '__main__':
    run(main, "DNAResuspension")
Exemplo n.º 3
0
                  storage="cold_80",
                  cell_line_name=cell_line_name).well(0))

    copy_cell_line_name(source_bacteria_well, cryo_vial_wells)
    set_property(cryo_vial_wells, 'antibiotic', antibiotic.name)

    p.distribute(mix_well2, cryo_vial_wells, ul(115), allow_carryover=True)

    if destroy_source_tube:

        source_bacteria_well.container.discard()


def main(p, params):
    """This protocol takes a tube of bacteria, amplifies it, and creates/stores new tubes of frozen cells
    """
    #bacterial protocol
    p.mammalian_cell_mode = False

    amplify_and_freeze_bacteria(
        p, params['bacteria_well'],
        Antibiotic.from_string(params['antibiotic'])
        if params['antibiotic'] != 'cell_line' else None,
        Antibiotic.from_string(params['second_antibiotic'])
        if params['second_antibiotic'] != 'cell_line' else None,
        params['destroy_source_tube'])


if __name__ == '__main__':
    run(main, "BacteriaFreezing")
Exemplo n.º 4
0
from __future__ import print_function
from transcriptic_tools.utils import ml, ul
from transcriptic_tools.harness import run
from transcriptic_tools.custom_protocol import CustomProtocol as Protocol
from autoprotocol.protocol import Container


def main(p, params):
    assert isinstance(p, Protocol)

    #create a container

    container = p.ref(params['container_name'],
                      cont_type=params['container_type'],
                      storage=params['storage_conditions'],
                      discard=False)

    p.provision_by_name('water', container.all_wells(),
                        ul(params['volume_ul']))


if __name__ == '__main__':
    run(main, "CreateWaterContainer")
Exemplo n.º 5
0
                       discard=True).well(0)    
    
    
    #keep ul(25) to make the safe volume
    p.transfer(pellet_well, trash_well, pellet_well.volume-ul(25), one_source=True, one_tip=True)
    p.provision_by_name(Reagent.glycerol, pellet_well, ul(15),mix_after=True)

    #remove max (this means the remaining volume is 20% glycerol)
    p.transfer(pellet_well, trash_well, get_volume(pellet_well,aspiratable=True), one_source=True, one_tip=True)
    
    if destroy_source_tube:
        
        source_bacteria_well.container.discard()
    
    

def main(p, params):    
    """This protocol takes a tube of bacteria, amplifies it, pellets the results. It can optionally induce additional BAC plasmids with IPTG
    """
    #bacterial protocol
    p.mammalian_cell_mode = False
    
    pellet_bacteria(p, params['bacteria_well'],
                    Antibiotic.from_string(params['antibiotic']) if params['antibiotic'] != 'cell_line' else None,
                    params['destroy_source_tube'],
                    params['induce_high_copy_number']
                    )
    
if __name__ == '__main__':
    run(main, "BacteriaPelleting")
Exemplo n.º 6
0
        primer1_well_or_reagent = get_reagent_by_transcritpic_resource_id(
            resource_id, fail_if_not_found=True)

    else:
        primer1_well_or_reagent = params['primer_type1']['inputs'][
            'custom_inventory']['primer_well']

    if params['primer_type2']['value'] == 'stock':

        resource_id = params['primer_type2']['inputs']['stock']['resource_id']

        primer2_well_or_reagent = get_reagent_by_transcritpic_resource_id(
            resource_id, fail_if_not_found=True)

    else:
        primer2_well_or_reagent = params['primer_type2']['inputs'][
            'custom_inventory']['primer_well']

    p.pcr(
        template_well=params['template_well'],
        primer1_well_or_reagent=primer1_well_or_reagent,
        primer2_well_or_reagent=primer2_well_or_reagent,
        annealing_temp_c=params['annealing_temp_c'],
        greater_than_65_percent_gc_primer=params['greater_than_65_percent_gc'],
        product_length=params['product_length'],
        product_name=params['product_name'])


if __name__ == '__main__':
    run(main, "PCR")
Exemplo n.º 7
0
        
    final_growth_well.name = miniprep_result_plate.name
        
    p.miniprep(final_growth_well,miniprep_result_well)
    
    p.measure_concentration(miniprep_result_well, "dna concentration", 'DNA')
    
    if destroy_source_tube:
        
        source_bacteria_well.container.discard()
    
    

def main(p, params):    
    """This protocol takes a tube of bacteria, amplifies it, and creates/stores new tubes of frozen cells
    """
    #bacterial protocol
    p.mammalian_cell_mode = False
    
    miniprep(p, params['bacteria_well'],
             antibiotic=Antibiotic.from_string(params['antibiotic']) if params['antibiotic'] != 'cell_line' else None,
             destroy_source_tube=params['destroy_source_tube'],
             incubate_hours=params['incubate_hours'],
             measure_od=params['measure_od'],
             induce_high_copy_number=params['induce_high_copy_number'],
             slow_growth=params['slow_growth']
             )
    
if __name__ == '__main__':
    run(main, "Miniprep")
Exemplo n.º 8
0
    Run a simple gel purification on one or more wells with dna
    
    """

    assert isinstance(p, Protocol)

    source_wells = []
    dna_lengths = []

    for dna_well in dna_wells:
        source_wells.append(dna_well)
        dna_lengths.append(int(dna_well.properties['dna_length']))

    dest_wells = p.simple_gel_purify(source_wells, dna_lengths)

    if measure_concentratio:
        p.measure_concentration(dest_wells, 'dna_concentration', 'DNA')


def main(p, params):
    """This protocol takes a tube of bacteria, amplifies it, and creates/stores new tubes of frozen cells
    """
    #bacterial protocol
    p.mammalian_cell_mode = False

    get_purify(p, params['source_dna'], params['measure_concentration'])


if __name__ == '__main__':
    run(main, "GelPurify")