def parse_sector_stock_rack_label(cls, label): values = _POOL_CREATION_LABELS.parse_stock_rack_label(label) # The base class does not parse out the sector index from the rack # role string. rack_role, sector_idx_str = values[cls.MARKER_RACK_ROLE].split('Q') values[cls.MARKER_RACK_ROLE] = rack_role values[cls.MARKER_SECTOR_INDEX] = int(sector_idx_str) return values
def parse_sector_stock_rack_label(cls, label): values = _POOL_CREATION_LABELS.parse_stock_rack_label(label) # The base class does not parse out the sector index from the rack # role string. rack_role, sector_idx_str = values[cls.MARKER_RACK_ROLE].split("Q") values[cls.MARKER_RACK_ROLE] = rack_role values[cls.MARKER_SECTOR_INDEX] = int(sector_idx_str) return values
def __create_transfers(self): # Creates a :class:`PlannedSampleDilution` for each rack position # in a 8x12 rack shape. self.add_debug('Create transfers ...') self._run_and_record_error(self.volume_calculator.calculate, 'Error when trying to determine buffer volume: ', ValueError) buffer_volume = self.volume_calculator.get_buffer_volume() if buffer_volume is not None: volume = buffer_volume / VOLUME_CONVERSION_FACTOR wl_label = LABELS.create_buffer_worklist_label( self.iso_request_label) wl = PlannedWorklist(wl_label, TRANSFER_TYPES.SAMPLE_DILUTION, get_pipetting_specs_cybio()) for rack_pos in get_positions_for_shape(RACK_SHAPE_NAMES.SHAPE_96): psd = PlannedSampleDilution.get_entity(volume=volume, target_position=rack_pos, diluent_info=DILUENT_INFO) wl.planned_liquid_transfers.append(psd) self.__worklist_series.add_worklist(self.BUFFER_WORKLIST_INDEX, wl)
def __create_transfers(self): # Creates a :class:`PlannedSampleDilution` for each rack position # in a 8x12 rack shape. self.add_debug('Create transfers ...') self._run_and_record_error( self.volume_calculator.calculate, 'Error when trying to determine buffer volume: ', ValueError) buffer_volume = self.volume_calculator.get_buffer_volume() if buffer_volume is not None: volume = buffer_volume / VOLUME_CONVERSION_FACTOR wl_label = LABELS.create_buffer_worklist_label( self.iso_request_label) wl = PlannedWorklist(wl_label, TRANSFER_TYPES.SAMPLE_DILUTION, get_pipetting_specs_cybio()) for rack_pos in get_positions_for_shape(RACK_SHAPE_NAMES.SHAPE_96): psd = PlannedSampleDilution.get_entity( volume=volume, target_position=rack_pos, diluent_info=DILUENT_INFO) wl.planned_liquid_transfers.append(psd) self.__worklist_series.add_worklist(self.BUFFER_WORKLIST_INDEX, wl)
def __create_isos(self): # Creates the ISOs. At this the tool checks whether there are already # ISOs at the ISO request. The tool add ISOs until the number of plates # (ISO request attribute) is reached. self.add_debug('Create ISOs ...') current_iso_count = len(self.iso_request.isos) new_iso_count = self.iso_request.expected_number_isos for i in range(current_iso_count, new_iso_count): layout_number = i + 1 iso_label = LABELS.create_iso_label(self.iso_request.label, layout_number) ticket_number = self.__get_ticket_number(iso_label, layout_number) if ticket_number is None: break # FIXME: Using side effect of instantiation. StockSampleCreationIso(iso_label, self.iso_request.number_designs, RackLayout(shape=get_96_rack_shape()), ticket_number, layout_number, iso_request=self.iso_request) self.__new_iso_counter += 1
def _get_job_label(self): job_num = LABELS.get_new_job_number(self.iso_request) return LABELS.create_job_label(self.iso_request.label, job_num)