Example #1
0
    def __init__(self,
                 stock_tube_containers,
                 excluded_racks=None,
                 requested_tubes=None,
                 parent=None):
        """
        Constructor.

        :param stock_tube_containers: The container items should contain all
            target positions for the stock transfer. They must be mapped on
            the pool.
        :type stock_tube_containers: map of :class:`StockTubeContainer`
        :param excluded_racks: A list of barcodes from stock racks that shall
            not be used for molecule design picking.
        :type excluded_racks: A list of rack barcodes
        :param requested_tubes: A list of barcodes from stock tubes that are
            supposed to be used.
        :type requested_tubes: A list of tube barcodes.
        """
        SessionTool.__init__(self, parent=parent)
        #: The container items should contain all target positions for the
        #: stock transfer.
        self.stock_tube_containers = stock_tube_containers
        if excluded_racks is None:
            excluded_racks = []
        #: A list of barcodes from stock racks that shall not be used for
        #: molecule design picking.
        self.excluded_racks = excluded_racks
        if requested_tubes is None:
            requested_tubes = []
        #: A list of barcodes from stock tubes that are supposed to be used
        #: (for fixed positions).
        self.requested_tubes = requested_tubes
        #: The tube aggregate is used to check tubes for specified tube
        #: barcodes.
        self.__tube_agg = None
        #: Maps molecule design pools onto pool IDs.
        self.__pool_map = None
        #: The molecule design pools of the requested tubes.
        self.__requested_tube_map = None
        #: The required volume for each pool *in ul* without stock dead volume.
        self.__volume_map = None
        #: Stores stock tube containers for tubes that need to be replaced.
        self.__replaced_tube_containers = None
        #: Stores message infos for tubes that have been replaced because the
        #: original rack has been excluded mapped onto pool IDs.
        self.__excluded_tubes = None
        #: The tubes (that have not been replaced) mapped onto tube barcodes.
        self.__tube_map = None
        #: Contains pools for which no tube has been found.
        self.__missing_pools = None
        # Intermediate warning and error messages
        self.__insuffient_volume_requested = None
        self.__insuffient_volume_scheduled = None
        self.__conc_mismatch_requested = None
        self.__conc_mismatch_scheduled = None
Example #2
0
    def __init__(self, stock_tube_containers, excluded_racks=None,
                 requested_tubes=None, parent=None):
        """
        Constructor.

        :param stock_tube_containers: The container items should contain all
            target positions for the stock transfer. They must be mapped on
            the pool.
        :type stock_tube_containers: map of :class:`StockTubeContainer`
        :param excluded_racks: A list of barcodes from stock racks that shall
            not be used for molecule design picking.
        :type excluded_racks: A list of rack barcodes
        :param requested_tubes: A list of barcodes from stock tubes that are
            supposed to be used.
        :type requested_tubes: A list of tube barcodes.
        """
        SessionTool.__init__(self, parent=parent)
        #: The container items should contain all target positions for the
        #: stock transfer.
        self.stock_tube_containers = stock_tube_containers
        if excluded_racks is None:
            excluded_racks = []
        #: A list of barcodes from stock racks that shall not be used for
        #: molecule design picking.
        self.excluded_racks = excluded_racks
        if requested_tubes is None:
            requested_tubes = []
        #: A list of barcodes from stock tubes that are supposed to be used
        #: (for fixed positions).
        self.requested_tubes = requested_tubes
        #: The tube aggregate is used to check tubes for specified tube
        #: barcodes.
        self.__tube_agg = None
        #: Maps molecule design pools onto pool IDs.
        self.__pool_map = None
        #: The molecule design pools of the requested tubes.
        self.__requested_tube_map = None
        #: The required volume for each pool *in ul* without stock dead volume.
        self.__volume_map = None
        #: Stores stock tube containers for tubes that need to be replaced.
        self.__replaced_tube_containers = None
        #: Stores message infos for tubes that have been replaced because the
        #: original rack has been excluded mapped onto pool IDs.
        self.__excluded_tubes = None
        #: The tubes (that have not been replaced) mapped onto tube barcodes.
        self.__tube_map = None
        #: Contains pools for which no tube has been found.
        self.__missing_pools = None
        # Intermediate warning and error messages
        self.__insuffient_volume_requested = None
        self.__insuffient_volume_scheduled = None
        self.__conc_mismatch_requested = None
        self.__conc_mismatch_scheduled = None
Example #3
0
 def reset(self):
     SessionTool.reset(self)
     self.__tube_agg = get_root_aggregate(ITube)
     self.__pool_map = dict()
     self.__requested_tube_map = dict()
     self.__volume_map = dict()
     self.__replaced_tube_containers = []
     self.__excluded_tubes = dict()
     self.__tube_map = dict()
     self.__insuffient_volume_requested = dict()
     self.__insuffient_volume_scheduled = dict()
     self.__conc_mismatch_requested = []
     self.__conc_mismatch_scheduled = []
     self.__missing_pools = []
Example #4
0
 def reset(self):
     SessionTool.reset(self)
     self.__tube_agg = get_root_aggregate(ITube)
     self.__pool_map = dict()
     self.__requested_tube_map = dict()
     self.__volume_map = dict()
     self.__replaced_tube_containers = []
     self.__excluded_tubes = dict()
     self.__tube_map = dict()
     self.__insuffient_volume_requested = dict()
     self.__insuffient_volume_scheduled = dict()
     self.__conc_mismatch_requested = []
     self.__conc_mismatch_scheduled = []
     self.__missing_pools = []
Example #5
0
 def reset(self):
     """
     Resets all values except for initialisation values.
     """
     SessionTool.reset(self)
     self.__stock_rack_size = get_stock_rack_size()
     self.__tube_count_map = None
     self.__donor_racks = dict()
     self.__receiver_racks = dict()
     self.__look_for_exact_matches = True
     self.__stop_associations = False
     self.__tube_transfers = []
     self.__worklist_stream = None
     self.__report_stream = None
     self.__zip_stream = None
Example #6
0
 def reset(self):
     """
     Resets all values except for initialisation values.
     """
     SessionTool.reset(self)
     self.__stock_rack_size = get_stock_rack_size()
     self.__tube_count_map = None
     self.__donor_racks = dict()
     self.__receiver_racks = dict()
     self.__look_for_exact_matches = True
     self.__stop_associations = False
     self.__tube_transfers = []
     self.__worklist_stream = None
     self.__report_stream = None
     self.__zip_stream = None
Example #7
0
    def __init__(self,
                 molecule_design_pools,
                 stock_concentration,
                 take_out_volume=None,
                 excluded_racks=None,
                 requested_tubes=None,
                 parent=None):
        """
        Constructor.

        :param set molecule_design_pools: Set of molecule design pools
            (:class:`thelma.entities.moleculedesign.MoleculeDesignPool`) for
            which to run the query.
        :type molecule_design_pools: :class:`set` of molecule design pools

        :param int stock_concentration: The stock concentration for the pools
            in nM (positive number).
        :param int take_out_volume: The volume that shall be removed from the
            stock sample *in ul* (positive number; may be *None*, in which
            case we do not filter for at least stock dead volume).
        :param list excluded_racks: List of barcodes from stock racks that shall
            not be used for molecule design picking.
        :param list requested_tubes: List of barcodes from stock tubes that are
            supposed to be used.
        """
        SessionTool.__init__(self, parent=parent)
        self.molecule_design_pools = molecule_design_pools
        self.stock_concentration = stock_concentration
        self.take_out_volume = take_out_volume
        if excluded_racks is None:
            excluded_racks = []
        self.excluded_racks = excluded_racks
        if requested_tubes is None:
            requested_tubes = []
        self.requested_tubes = requested_tubes
        #: The pools mapped onto their IDs.
        self._pool_map = None
        #: Stores the suitable stock sample IDs for the pools. The results are
        #: determined by the :class:`SINGLE_POOL_QUERY`.
        self._stock_samples = None
        #: Returns all candidates in the same order as in the query result.
        #: Use :func:`get_unsorted_candidates` to access this list.
        self._unsorted_candidates = None
        #: The picked candidates ordered by pools.
        self._picked_candidates = None
Example #8
0
    def __init__(self, molecule_design_pools, stock_concentration,
                 take_out_volume=None, excluded_racks=None,
                 requested_tubes=None, parent=None):
        """
        Constructor.

        :param set molecule_design_pools: Set of molecule design pools
            (:class:`thelma.entities.moleculedesign.MoleculeDesignPool`) for
            which to run the query.
        :type molecule_design_pools: :class:`set` of molecule design pools

        :param int stock_concentration: The stock concentration for the pools
            in nM (positive number).
        :param int take_out_volume: The volume that shall be removed from the
            stock sample *in ul* (positive number; may be *None*, in which
            case we do not filter for at least stock dead volume).
        :param list excluded_racks: List of barcodes from stock racks that shall
            not be used for molecule design picking.
        :param list requested_tubes: List of barcodes from stock tubes that are
            supposed to be used.
        """
        SessionTool.__init__(self, parent=parent)
        self.molecule_design_pools = molecule_design_pools
        self.stock_concentration = stock_concentration
        self.take_out_volume = take_out_volume
        if excluded_racks is None:
            excluded_racks = []
        self.excluded_racks = excluded_racks
        if requested_tubes is None:
            requested_tubes = []
        self.requested_tubes = requested_tubes
        #: The pools mapped onto their IDs.
        self._pool_map = None
        #: Stores the suitable stock sample IDs for the pools. The results are
        #: determined by the :class:`SINGLE_POOL_QUERY`.
        self._stock_samples = None
        #: Returns all candidates in the same order as in the query result.
        #: Use :func:`get_unsorted_candidates` to access this list.
        self._unsorted_candidates = None
        #: The picked candidates ordered by pools.
        self._picked_candidates = None
Example #9
0
    def __init__(self, racks_to_empty=None, excluded_racks=None, parent=None):
        """
        Constructor.

        :param int racks_to_empty: The number of empty racks the run shall
            result in (optional).
        :param excluded_racks: A list of barcodes from stock racks that shall
            not be used.
        :type excluded_racks: A list or set of rack barcodes
        """
        SessionTool.__init__(self, parent=parent)
        #: The number of empty racks the run shall result in (optional).
        self.racks_to_empty = racks_to_empty
        #: A list of barcodes from stock racks that shall not be used.
        self.excluded_racks = excluded_racks
        if excluded_racks is None: self.excluded_racks = []
        #: The number of positions in a stock rack.
        self.__stock_rack_size = None
        #: Maps :class:`StockCondenseRack` objects onto tube counts.
        self.__tube_count_map = None
        #: Maps donor racks onto rack barcodes.
        self.__donor_racks = None
        #: Maps receiver racks onto rack barcodes.
        self.__receiver_racks = None
        #: Do we look for exact tube count matches? (*True* for thie first
        #: iteration of association, *False* for the second).
        self.__look_for_exact_matches = None
        #: Shall we stop looking for rack associations?
        self.__stop_associations = None
        #: The scheduled tube transfers sorted by donator rack (ATTENTION:
        #: stores :class:`TubeTransferData` objects, no :class:`TubeTransfer`
        #: entities.
        self.__tube_transfers = None
        #: The stream for the worklist file.
        self.__worklist_stream = None
        #: The stream for the report file.
        self.__report_stream = None
        #: The zip stream containing the two files.
        self.__zip_stream = None
Example #10
0
    def __init__(self, racks_to_empty=None, excluded_racks=None, parent=None):
        """
        Constructor.

        :param int racks_to_empty: The number of empty racks the run shall
            result in (optional).
        :param excluded_racks: A list of barcodes from stock racks that shall
            not be used.
        :type excluded_racks: A list or set of rack barcodes
        """
        SessionTool.__init__(self, parent=parent)
        #: The number of empty racks the run shall result in (optional).
        self.racks_to_empty = racks_to_empty
        #: A list of barcodes from stock racks that shall not be used.
        self.excluded_racks = excluded_racks
        if excluded_racks is None: self.excluded_racks = []
        #: The number of positions in a stock rack.
        self.__stock_rack_size = None
        #: Maps :class:`StockCondenseRack` objects onto tube counts.
        self.__tube_count_map = None
        #: Maps donor racks onto rack barcodes.
        self.__donor_racks = None
        #: Maps receiver racks onto rack barcodes.
        self.__receiver_racks = None
        #: Do we look for exact tube count matches? (*True* for thie first
        #: iteration of association, *False* for the second).
        self.__look_for_exact_matches = None
        #: Shall we stop looking for rack associations?
        self.__stop_associations = None
        #: The scheduled tube transfers sorted by donator rack (ATTENTION:
        #: stores :class:`TubeTransferData` objects, no :class:`TubeTransfer`
        #: entities.
        self.__tube_transfers = None
        #: The stream for the worklist file.
        self.__worklist_stream = None
        #: The stream for the report file.
        self.__report_stream = None
        #: The zip stream containing the two files.
        self.__zip_stream = None
Example #11
0
 def reset(self):
     SessionTool.reset(self)
     self._pool_map = dict()
     self._stock_samples = []
     self._unsorted_candidates = []
     self._picked_candidates = OrderedDict()
Example #12
0
 def reset(self):
     SessionTool.reset(self)
     self._pool_map = dict()
     self._stock_samples = []
     self._unsorted_candidates = []
     self._picked_candidates = OrderedDict()