Ejemplo n.º 1
0
 def __get_pool_set(self):
     # Retrieves the pool set from the parsed Excel data stream.
     self.add_debug("Obtain pool set ...")
     handler = PoolCreationSetParserHandler(self.stream, parent=self)
     self.__pool_set = handler.get_result()
     parsed_num_designs = handler.get_number_designs()
     if parsed_num_designs != self.number_designs:
         msg = (
             "The number of designs per molecule design pool in the "
             "request file (%i) differs from the requested number of "
             "designs (%i)." % (parsed_num_designs, self.number_designs)
         )
         self.add_error(msg)
     agg = get_root_aggregate(IMoleculeType)
     md_type = agg.get_by_id(self.molecule_type)
     parsed_mol_type = handler.get_molecule_type()
     if parsed_mol_type != md_type:
         msg = (
             "The molecule type of the pools in the request file (%s) "
             "differs from the requested molecule type (%s)." % (parsed_mol_type, self.molecule_type)
         )
         self.add_error(msg)
     if self.__pool_set is None:
         msg = "Unable to parse library pool set!"
         self.add_error(msg)
Ejemplo n.º 2
0
 def __get_pool_set(self):
     # Also sets the stock concentration.
     self.add_debug('Obtain pool set ...')
     handler = PoolCreationSetParserHandler(self.stream, parent=self)
     self.__pool_set = handler.get_result()
     if self.__pool_set is None:
         msg = 'Unable to parse pool set!'
         self.add_error(msg)
     else:
         self.__number_designs = handler.get_number_designs()
         mt = handler.get_molecule_type()
         # In theory we could check the default stock concentrations for
         # all the single molecule designs. However, for this we would have
         # to get the corresponding pools first. Since the handler already
         # made sure that we have equal molecule types and also the number
         # of designs (1) is always equal it is very unlikely to stumble
         # across a different concentration. Even so, the optimizer would
         # not find proper stock samples for these designs.
         self.__stock_concentration = get_default_stock_concentration(mt)
Ejemplo n.º 3
0
 def __get_pool_set(self):
     # Also sets the stock concentration.
     self.add_debug('Obtain pool set ...')
     handler = PoolCreationSetParserHandler(self.stream, parent=self)
     self.__pool_set = handler.get_result()
     if self.__pool_set is None:
         msg = 'Unable to parse pool set!'
         self.add_error(msg)
     else:
         self.__number_designs = handler.get_number_designs()
         mt = handler.get_molecule_type()
         # In theory we could check the default stock concentrations for
         # all the single molecule designs. However, for this we would have
         # to get the corresponding pools first. Since the handler already
         # made sure that we have equal molecule types and also the number
         # of designs (1) is always equal it is very unlikely to stumble
         # across a different concentration. Even so, the optimizer would
         # not find proper stock samples for these designs.
         self.__stock_concentration = get_default_stock_concentration(mt)
Ejemplo n.º 4
0
 def __get_pool_set(self):
     # Retrieves the pool set from the parsed Excel data stream.
     self.add_debug('Obtain pool set ...')
     handler = PoolCreationSetParserHandler(self.stream,
                                            parent=self)
     self.__pool_set = handler.get_result()
     parsed_num_designs = handler.get_number_designs()
     if parsed_num_designs != self.number_designs:
         msg = 'The number of designs per molecule design pool in the ' \
               'request file (%i) differs from the requested number of ' \
               'designs (%i).' % (parsed_num_designs, self.number_designs)
         self.add_error(msg)
     agg = get_root_aggregate(IMoleculeType)
     md_type = agg.get_by_id(self.molecule_type)
     parsed_mol_type = handler.get_molecule_type()
     if parsed_mol_type != md_type:
         msg = 'The molecule type of the pools in the request file (%s) ' \
               'differs from the requested molecule type (%s).' \
               % (parsed_mol_type, self.molecule_type)
         self.add_error(msg)
     if self.__pool_set is None:
         msg = 'Unable to parse library pool set!'
         self.add_error(msg)