Beispiel #1
0
    def sync_library_plate_row(legacy_row, screen_stage=None,
                               number_of_wells=96):
        if len(legacy_row) > 1:
            plate_name = generate_ahringer_384_plate_name(legacy_row[0],
                                                          legacy_row[1])
        else:
            plate_name = generate_library_plate_name(legacy_row[0])

        new_plate = LibraryPlate(id=plate_name, screen_stage=screen_stage,
                                 number_of_wells=number_of_wells)

        return update_or_save_object(command, new_plate, recorded_plates,
                                     fields_to_compare)
Beispiel #2
0
    def sync_primary_row(legacy_row):
        plate_name = legacy_row[0]
        well = get_three_character_well(legacy_row[1])
        clone_name = legacy_row[2]
        parent_plate_name = legacy_row[4]

        if re.match('sjj', clone_name):
            parent_chromosome = legacy_row[3]
            parent_plate_name = generate_ahringer_384_plate_name(
                parent_chromosome, parent_plate_name)
        parent_well_improper = legacy_row[5]
        if re.match('mv', clone_name):
            clone_name = generate_vidal_clone_name(parent_plate_name,
                                                   parent_well_improper)

        intended_clone = get_clone(clone_name)

        if re.match('L4440', clone_name):
            parent_stock = None

        else:
            parent_well_proper = get_three_character_well(parent_well_improper)
            parent_stock = get_library_stock(parent_plate_name,
                                             parent_well_proper)

            # Confirm that this intended clone matches parent's clone
            if parent_stock.intended_clone != intended_clone:
                raise CommandError('Clone {} does not match parent\n'
                                   .format(clone_name))

        new_well = LibraryStock(
            id=generate_library_stock_name(plate_name, well),
            plate=get_library_plate(plate_name), well=well,
            parent_stock=parent_stock,
            intended_clone=intended_clone)

        return update_or_save_object(command, new_well, recorded_wells,
                                     fields_to_compare)
Beispiel #3
0
    def sync_source_row(legacy_row):
        plate_name = legacy_row[0]
        clone_name = legacy_row[3]

        if re.match('sjj', clone_name):
            chromosome = legacy_row[2]
            plate_name = generate_ahringer_384_plate_name(
                chromosome, plate_name)

        well_improper = legacy_row[1]
        well_proper = get_three_character_well(well_improper)

        if re.match('mv', clone_name):
            clone_name = generate_vidal_clone_name(plate_name,
                                                   well_improper)

        new_well = LibraryStock(
            id=generate_library_stock_name(plate_name, well_proper),
            plate=get_library_plate(plate_name), well=well_proper,
            parent_stock=None, intended_clone=get_clone(clone_name))

        return update_or_save_object(command, new_well, recorded_wells,
                                     fields_to_compare)