def __init__(self, stream, mode, user, **kw): """ Constructor: :param stream: The custom transfer XLS file as stream. :param mode: :attr:`MODE_EXECUTE` or :attr:`MODE_PRINT_WORKLISTS` :type mode: str :param user: The user who conducts the DB update (required for execution mode). :type user: :class:`thelma.entities.user.User` :default user: *None* """ SerialWriterExecutorTool.__init__(self, mode=mode, user=user, **kw) #: The custom transfer XLS file as stream. self.stream = stream #: The :class:`WorklistSeries` generate by the parser. self._worklist_series = None #: The :class:RackOrReservoirItem` for each rack or reservoir in the #: worklist series. self.__rors = None #: The source and targets :class:RackOrReservoirItem` for each worklist. self.__transfer_roles = None
def _check_input(self): """ Checks the initialisation values. """ SerialWriterExecutorTool._check_input(self) if self.stream is None: msg = 'The stream must not be None!' self.add_error(msg)
def _check_input(self): """ Checks the initialisation values. """ SerialWriterExecutorTool._check_input(self) if self._check_input_class('entity', self.entity, self.ENTITY_CLS): if self.ENTITY_CLS == IsoJob and len(self.entity.isos) < 1: msg = 'There are no ISOs in this ISO job!' self.add_error(msg)
def _check_input(self): """ Checks the initialisation values. """ SerialWriterExecutorTool._check_input(self) if self._check_input_class("entity", self.entity, self.ENTITY_CLS): if self.ENTITY_CLS == IsoJob and len(self.entity.isos) < 1: msg = "There are no ISOs in this ISO job!" self.add_error(msg)
def __init__(self, entity, mode, user=None, parent=None): """ Constructor. :param entity: The ISO job or ISO to process. :type entity: :class:`thelma.entities.job.IsoJob` or :class:`thelma.entities.iso.LabIso`. """ SerialWriterExecutorTool.__init__(self, mode, user=user, parent=parent) #: The entity the transfer will be attached to (ISO or ISO job). self.entity = entity #: The executed stock transfer worklists (for reporting). self._executed_stock_worklists = None
def reset(self): """ Resets all attributes except for the initialisation values. """ SerialWriterExecutorTool.reset(self) self._scenario = None self._design_series = None self._design_rack_series_map = dict() self._transfer_worklist_index = None self._cell_worklist_index = None self._experiment_racks = dict() self._source_plate = None self._source_layout = None self._ignored_positions = [] self._ignored_floatings = set() self._final_streams = dict()
def _get_executed_worklists(self): """ In addition to the normal writers we have to set the "has been used" flag of the potential ISO aliquot plate that has been used as source plate. """ ews = SerialWriterExecutorTool._get_executed_worklists(self) if not ews is None: self._update_iso_aliquot_plate() return ews
def __init__(self, experiment, mode, user=None, parent=None, **kw): """ Constructor. :param experiment: The experiment to process. :type experiment: :class:`thelma.entities.experiment.Experiment` """ SerialWriterExecutorTool.__init__(self, mode, user=user, parent=parent, **kw) #: The experiment for which to generate the rack. self.experiment = experiment #: The experiment metadata type #: (:class:`thelma.entities.experiment.ExperimentMetadataType`). self._scenario = None #: The worklist series of the experiment design #: (:class:`thelma.entities.liquidtransfer.WorklistSeries`). self._design_series = None #: The worklist series for the design racks mapped onto design #: racks labels (if there are any). #: (:class:`thelma.entities.liquidtransfer.WorklistSeries`). self._design_rack_series_map = None #: The index of the transfer worklist within a valid design rack series. self._transfer_worklist_index = None #: The index of the cell worklist within a valid design rack series. self._cell_worklist_index = None #: Maps experiment racks onto the design rack they belong to. self._experiment_racks = None #: The source plate (ISO plate) for this experiment. self._source_plate = None #: The ISO layout for this experiment. self._source_layout = None #: A list of rack position to be ignore during execution or worklist #: generation. The rack position are floating or library position for #: which there were no molecule design pools left anymore. self._ignored_positions = None #: A list of floating placeholders to be ignored during execution #: or worklist generation. The rack position are floating position #: for which there were no molecule design pools left anymore. self._ignored_floatings = None #: The final stream mapped onto file suffixes (print mode only). self._final_streams = None
def reset(self): SerialWriterExecutorTool.reset(self) self._worklist_series = None self.__rors = None self.__transfer_roles = dict()
def _merge_streams(self, stream_map): """ Optimem and reagent streams extracted. """ self._extract_mastermix_streams(stream_map) SerialWriterExecutorTool._merge_streams(self, stream_map)
def reset(self): """ Checks the initialisation values. """ SerialWriterExecutorTool.reset(self) self._executed_stock_worklists = []
def _check_input(self): """ Checks whether all initialisation values are valid. """ SerialWriterExecutorTool._check_input(self) self._check_input_class('experiment', self.experiment, Experiment)