Ejemplo n.º 1
0
    def _parse_layout_codes(self, layout_container, tag_definitions):
        """
        We must distinguish between parameter and normal tags.
        For non-parameter tags, the data is passed to the layout
        containers, for parameters it is stored in the layout containers.

        We could also do this afterwards, but then it is harder to distinguish
        between parameter tags and other tags.
        """
        for tag_definition in tag_definitions:
            predicate = tag_definition.predicate
            parameter_container = self.__get_parameter_for_predicate(predicate)
            if parameter_container is not None:
                parameter_container.add_layout_container(layout_container)

        ExcelMoleculeDesignPoolLayoutParsingContainer._parse_layout_codes(self,
                                              layout_container, tag_definitions)
Ejemplo n.º 2
0
    def _parse_layout_codes(self, layout_container, tag_definitions):
        """
        We must distinguish between parameter and normal tags.
        For non-parameter tags, the data is passed to the layout
        containers, for parameters it is stored in the layout containers.

        We could also do this afterwards, but then it is harder to distinguish
        between parameter tags and other tags.
        """
        for tag_definition in tag_definitions:
            predicate = tag_definition.predicate
            parameter_container = self.__get_parameter_for_predicate(predicate)
            if parameter_container is not None:
                parameter_container.add_layout_container(layout_container)

        ExcelMoleculeDesignPoolLayoutParsingContainer._parse_layout_codes(
            self, layout_container, tag_definitions)
Ejemplo n.º 3
0
 def __init__(self, parser):
     ExcelMoleculeDesignPoolLayoutParsingContainer.__init__(self, parser,
                                                            parser.sheet)
     self._create_info('Parse ISO sheet ...')
     #: stores the values for the different metadata specifications
     self.metadata_dict = {}
     for metadata_marker in self._parser.allowed_metadata:
         self.metadata_dict[metadata_marker] = None
     #: The name of the molecule design parameter.
     self.molecule_design_parameter = self._parser.molecule_design_parameter
     #: stores the parameter containers
     self.parameter_map = {}
     for parameter, alias_list in self._parser.layout_parameters.iteritems():
         self.parameter_map[parameter] = \
             _ParameterContainer(self._parser, parameter, alias_list)
     # III instance variables for intermediate data storage
     #: This is only a placeholder - there is always only one rack.
     self.__rack_container = RackParsingContainer(parser=self._parser,
                                                  rack_label='ISO plate')
     #: a list of all layout containers
     self.__layout_containers = []
Ejemplo n.º 4
0
 def __init__(self, parser):
     ExcelMoleculeDesignPoolLayoutParsingContainer.__init__(
         self, parser, parser.sheet)
     self._create_info('Parse ISO sheet ...')
     #: stores the values for the different metadata specifications
     self.metadata_dict = {}
     for metadata_marker in self._parser.allowed_metadata:
         self.metadata_dict[metadata_marker] = None
     #: The name of the molecule design parameter.
     self.molecule_design_parameter = self._parser.molecule_design_parameter
     #: stores the parameter containers
     self.parameter_map = {}
     for parameter, alias_list in self._parser.layout_parameters.iteritems(
     ):
         self.parameter_map[parameter] = \
             _ParameterContainer(self._parser, parameter, alias_list)
     # III instance variables for intermediate data storage
     #: This is only a placeholder - there is always only one rack.
     self.__rack_container = RackParsingContainer(parser=self._parser,
                                                  rack_label='ISO plate')
     #: a list of all layout containers
     self.__layout_containers = []
Ejemplo n.º 5
0
    def _init_tag_definition_container(self, predicate):
        """
        The tags must also be unique in the scope of the other sheets.
        """
        container = ExcelMoleculeDesignPoolLayoutParsingContainer._init_tag_definition_container(self, predicate)
        if container is None:
            return None
        if container.predicate in self._parser.tag_predicates:
            msg = 'Duplicate factor name "%s"!' % (predicate)
            self._create_error(msg)
            return None

        self._parser.tag_predicates.add(predicate)
        return container