Пример #1
0
    def _get_position_init_values(self, parameter_map, rack_pos):
        kw = MoleculeDesignPoolLayoutConverter._get_position_init_values(
            self, parameter_map, rack_pos)
        if kw is None: return None  # includes empty and untreated type pos

        pos_type = kw['position_type']
        iso_concentration = parameter_map[self.PARAMETER_SET.ISO_CONCENTRATION]
        iso_volume = parameter_map[self.PARAMETER_SET.ISO_VOLUME]
        invalid = False

        is_mock = (pos_type == MOCK_POSITION_TYPE)
        if self._expect_iso_values and \
                    not self.__check_volume_and_concentration(iso_volume,
                             iso_concentration, rack_pos.label, is_mock):
            invalid = True

        if invalid: return None
        kw['iso_volume'] = iso_volume
        kw['iso_concentration'] = iso_concentration
        return kw
Пример #2
0
    def _get_position_init_values(self, parameter_map, rack_pos):
        kw = MoleculeDesignPoolLayoutConverter._get_position_init_values(self,
                                                     parameter_map, rack_pos)
        if kw is None: return None # includes empty and untreated type pos

        pos_type = kw['position_type']
        iso_concentration = parameter_map[self.PARAMETER_SET.ISO_CONCENTRATION]
        iso_volume = parameter_map[self.PARAMETER_SET.ISO_VOLUME]
        invalid = False

        is_mock = (pos_type == MOCK_POSITION_TYPE)
        if self._expect_iso_values and \
                    not self.__check_volume_and_concentration(iso_volume,
                             iso_concentration, rack_pos.label, is_mock):
            invalid = True

        if invalid: return None
        kw['iso_volume'] = iso_volume
        kw['iso_concentration'] = iso_concentration
        return kw
Пример #3
0
 def _get_position_init_values(self, parameter_map, rack_pos):
     kw = MoleculeDesignPoolLayoutConverter._get_position_init_values(
                                                 self,
                                                 parameter_map, rack_pos)
     result = None
     if not kw is None:
         invalid = False
         pos_label = rack_pos.label
         pool = kw['molecule_design_pool']
         md_str = parameter_map[self.PARAMETER_SET.MOLECULE_DESIGNS]
         if not self.POSITION_CLS.validate_molecule_designs(pool, md_str):
             exp_mds = [md.id for md in pool]
             info = '%s (pool %s, found: %s, expected: %s)' \
                     % (pos_label, pool.id, md_str,
                        self._get_joined_str(
                                 exp_mds, is_strs=False, separator='-'))
             self.__mismatching_mds.append(info)
             invalid = True
         tube_str = parameter_map[self.PARAMETER_SET.STOCK_TUBE_BARCODES]
         if tube_str is None:
             self.__missing_tubes.append(pos_label)
             result = None
         else:
             tubes = self.POSITION_CLS.get_tube_barcodes_from_tag_value(
                                                                 tube_str)
             if not len(tubes) == len(pool):
                 info = '%s (%s, number mds: %i)' \
                        % (pos_label, tube_str, len(pool))
                 self.__mismatching_tube_num.append(info)
                 invalid = True
             if invalid:
                 result = None
             else:
                 kw['stock_tube_barcodes'] = tubes
                 # Success!
                 result = kw
     return result
Пример #4
0
 def _get_position_init_values(self, parameter_map, rack_pos):
     kw = MoleculeDesignPoolLayoutConverter._get_position_init_values(
         self, parameter_map, rack_pos)
     result = None
     if not kw is None:
         invalid = False
         pos_label = rack_pos.label
         pool = kw['molecule_design_pool']
         md_str = parameter_map[self.PARAMETER_SET.MOLECULE_DESIGNS]
         if not self.POSITION_CLS.validate_molecule_designs(pool, md_str):
             exp_mds = [md.id for md in pool]
             info = '%s (pool %s, found: %s, expected: %s)' \
                     % (pos_label, pool.id, md_str,
                        self._get_joined_str(
                                 exp_mds, is_strs=False, separator='-'))
             self.__mismatching_mds.append(info)
             invalid = True
         tube_str = parameter_map[self.PARAMETER_SET.STOCK_TUBE_BARCODES]
         if tube_str is None:
             self.__missing_tubes.append(pos_label)
             result = None
         else:
             tubes = self.POSITION_CLS.get_tube_barcodes_from_tag_value(
                 tube_str)
             if not len(tubes) == len(pool):
                 info = '%s (%s, number mds: %i)' \
                        % (pos_label, tube_str, len(pool))
                 self.__mismatching_tube_num.append(info)
                 invalid = True
             if invalid:
                 result = None
             else:
                 kw['stock_tube_barcodes'] = tubes
                 # Success!
                 result = kw
     return result