Пример #1
0
    def __init__(self, stream, requester, scenario, parent=None):
        """
        Constructor.

        :param requester: the user uploading the experiment design
        :type requester: :class:`thelma.entities.user.User`
        :param scenario: The scenario (experiment metadata types) defines the
            mandatory and forbidden parameters for a design rack layout and the
            names of the sheets to be parsed.
        :type scenario: :class:`thelma.entities.experiment.ExperimentMetadataType`
        """
        MoleculeDesignPoolLayoutParserHandler.__init__(self,
                                                       stream,
                                                       parent=parent)
        #: The user uploading the file.
        self.requester = requester
        #: A :class:`ExperimentMetadataType` supported by this handler subclass.
        self.scenario = scenario
        #: Transfection parameters that need to be specified in the layout.
        self.__mandatory_parameters = None
        #: Transfection parameters that must *not* be specified in the layout.
        self.__forbidden_parameters = None
        #: Stores the presence of parameters (a parameter has to be
        #: specified for each non-empty well or not at all).
        self.__parameter_presence = dict()

        #: The designs racks for the experiment design.
        self.__design_racks = []
Пример #2
0
    def __init__(self, stream, requester, scenario, parent=None):
        """
        Constructor.

        :param requester: the user uploading the experiment design
        :type requester: :class:`thelma.entities.user.User`
        :param scenario: The scenario (experiment metadata types) defines the
            mandatory and forbidden parameters for a design rack layout and the
            names of the sheets to be parsed.
        :type scenario: :class:`thelma.entities.experiment.ExperimentMetadataType`
        """
        MoleculeDesignPoolLayoutParserHandler.__init__(self, stream,
                                                       parent=parent)
        #: The user uploading the file.
        self.requester = requester
        #: A :class:`ExperimentMetadataType` supported by this handler subclass.
        self.scenario = scenario
        #: Transfection parameters that need to be specified in the layout.
        self.__mandatory_parameters = None
        #: Transfection parameters that must *not* be specified in the layout.
        self.__forbidden_parameters = None
        #: Stores the presence of parameters (a parameter has to be
        #: specified for each non-empty well or not at all).
        self.__parameter_presence = dict()

        #: The designs racks for the experiment design.
        self.__design_racks = []
Пример #3
0
    def _initialize_parser_keys(self):
        """
        Initialises floating related aliases within the parser.
        """
        MoleculeDesignPoolLayoutParserHandler._initialize_parser_keys(self)

        sheet_names = set()
        for sheet_name in self.BASIC_SHEET_NAMES: sheet_names.add(sheet_name)

        if isinstance(self.scenario, ExperimentMetadataType) and \
                            self.scenario.id in \
                            _SCENARIO_PARAMETERS.TRANSFECTION_SHEET_SCENARIOS:
            sheet_names.add(self.TRANSFECTION_SHEET_NAME)
        self.parser.sheet_names = sheet_names
Пример #4
0
    def _initialize_parser_keys(self):
        """
        Initialises floating related aliases within the parser.
        """
        MoleculeDesignPoolLayoutParserHandler._initialize_parser_keys(self)

        sheet_names = set()
        for sheet_name in self.BASIC_SHEET_NAMES:
            sheet_names.add(sheet_name)

        if isinstance(self.scenario, ExperimentMetadataType) and \
                            self.scenario.id in \
                            _SCENARIO_PARAMETERS.TRANSFECTION_SHEET_SCENARIOS:
            sheet_names.add(self.TRANSFECTION_SHEET_NAME)
        self.parser.sheet_names = sheet_names