def _create_planned_rack_sample_transfer(self, **kw): if not 'volume' in kw: kw['volume'] = 0.000020 if not 'source_sector_index' in kw: kw['source_sector_index'] = 0 if not 'target_sector_index' in kw: kw['target_sector_index'] = 1 if not 'number_sectors' in kw: kw['number_sectors'] = 4 return PlannedRackSampleTransfer.get_entity(**kw)
def _create_planned_rack_sample_transfer(self, **kw): if not 'volume' in kw: kw['volume'] = 0.000020 if not 'source_sector_index' in kw: kw['source_sector_index'] = 0 if not 'target_sector_index' in kw: kw['target_sector_index'] = 1 if not 'number_sectors' in kw: kw['number_sectors'] = 4 return PlannedRackSampleTransfer.get_entity(**kw)
def __create_stock_to_prep_worklists(self): # This rack transfer worklist (transfer from pool stock rack to # preparation plate) is executed once for each quadrant. self.add_debug('Add worklist for transfer to preparation plate ...') label = self.STOCK_TO_PREP_TRANSFER_WORKLIST_LABEL \ % (self.library_name) volume = self.__stock_to_prep_vol / VOLUME_CONVERSION_FACTOR rack_transfer = PlannedRackSampleTransfer.get_entity(volume, 1, 0, 0) worklist = PlannedWorklist(label=label, planned_transfers=[rack_transfer]) self.__last_worklist_index += 1 self.__worklist_series.add_worklist(self.__last_worklist_index, worklist)
def __create_prep_to_aliquot_worklist(self): # There is one rack transfer for each sector (many-to-one transfer). # Each transfer is executed once per aliquot plate. self.add_debug('Add worklist for transfer into aliquot plates ...') volume = ALIQUOT_PLATE_VOLUME / VOLUME_CONVERSION_FACTOR rack_transfers = [] for sector_index in self.__quadrant_layouts.keys(): rack_transfer = PlannedRackSampleTransfer.get_entity( volume, NUMBER_SECTORS, 0, sector_index) rack_transfers.append(rack_transfer) label = self.PREP_TO_ALIQUOT_TRANSFER_WORKLIST_LABEL % ( self.library_name) worklist = PlannedWorklist(label=label, planned_transfers=rack_transfers) self.__last_worklist_index += 1 self.__worklist_series.add_worklist(self.__last_worklist_index, worklist)
def __create_prep_to_aliquot_worklist(self): # There is one rack transfer for each sector (many-to-one transfer). # Each transfer is executed once per aliquot plate. self.add_debug("Add worklist for transfer into aliquot plates ...") volume = DEFAULT_ALIQUOT_PLATE_VOLUME / VOLUME_CONVERSION_FACTOR rack_transfers = [] for sector_index in self.__sector_layouts.keys(): rack_transfer = PlannedRackSampleTransfer.get_entity(volume, NUMBER_SECTORS, 0, sector_index) rack_transfers.append(rack_transfer) label = self.PREP_TO_ALIQUOT_TRANSFER_WORKLIST_LABEL % (self.library_name) worklist = PlannedWorklist( label, TRANSFER_TYPES.RACK_SAMPLE_TRANSFER, get_pipetting_specs_cybio(), planned_liquid_transfers=rack_transfers, ) self.__worklist_series.add_worklist(self.__last_worklist_index, worklist) self.__last_worklist_index += 1
def _create_planned_liquid_transfers(self): """ Generates the planned rack transfer for the worklist. """ volume = TransfectionParameters.TRANSFER_VOLUME \ / VOLUME_CONVERSION_FACTOR try: prst = PlannedRackSampleTransfer.get_entity( volume, self.SECTOR_NUMBER, self.SOURCE_SECTOR_INDEX, self.TARGET_SECTOR_INDEX) except ValueError as err: msg = 'Invalid planned rack sample transfer (%d->%d, total %d).' \ 'Details: %s.' \ % (self.SOURCE_SECTOR_INDEX, self.TARGET_SECTOR_INDEX, self.SECTOR_NUMBER, err) self.add_error(msg) else: self._add_planned_transfer(prst)
def _create_planned_liquid_transfers(self): """ Generates the planned rack transfer for the worklist. """ volume = TransfectionParameters.TRANSFER_VOLUME \ / VOLUME_CONVERSION_FACTOR try: prst = PlannedRackSampleTransfer.get_entity( volume, self.SECTOR_NUMBER, self.SOURCE_SECTOR_INDEX, self.TARGET_SECTOR_INDEX) except ValueError as err: msg = 'Invalid planned rack sample transfer (%d->%d, total %d).' \ 'Details: %s.' \ % (self.SOURCE_SECTOR_INDEX, self.TARGET_SECTOR_INDEX, self.SECTOR_NUMBER, err) self.add_error(msg) else: self._add_planned_transfer(prst)
def __make_stock_rack_worklist_series(self, label, volume, layout): # Builds a sector 0 -> sector 0 rack transfer worklist series. pip_specs_cy = get_pipetting_specs_cybio() wl_series = WorklistSeries() psts = [] if layout is None: # Rack transfer (only for pool stock rack -> prep plate transfer). pst = PlannedRackSampleTransfer.get_entity(volume, 1, 0, 0) psts.append(pst) pwl_type = TRANSFER_TYPES.RACK_SAMPLE_TRANSFER else: # Sample transfers (for single stock transfer). for rack_pos in layout.get_positions(): pst = PlannedSampleTransfer.get_entity(volume, rack_pos, rack_pos) psts.append(pst) pwl_type = TRANSFER_TYPES.SAMPLE_TRANSFER wl = PlannedWorklist(label, pwl_type, pip_specs_cy, planned_liquid_transfers=psts) wl_series.add_worklist(0, wl) return wl_series
def __make_stock_rack_worklist_series(self, label, volume, layout): # Builds a sector 0 -> sector 0 rack transfer worklist series. pip_specs_cy = get_pipetting_specs_cybio() wl_series = WorklistSeries() psts = [] if layout is None: # Rack transfer (only for pool stock rack -> prep plate transfer). pst = PlannedRackSampleTransfer.get_entity(volume, 1, 0, 0) psts.append(pst) pwl_type = TRANSFER_TYPES.RACK_SAMPLE_TRANSFER else: # Sample transfers (for single stock transfer). for rack_pos in layout.get_positions(): pst = PlannedSampleTransfer.get_entity(volume, rack_pos, rack_pos) psts.append(pst) pwl_type = TRANSFER_TYPES.SAMPLE_TRANSFER wl = PlannedWorklist(label, pwl_type, pip_specs_cy, planned_liquid_transfers=psts) wl_series.add_worklist(0, wl) return wl_series