Пример #1
0
 def __init__(self, name, label, devices=None, **kw):
     Entity.__init__(self, **kw)
     self.name = name
     self.label = label
     if devices is None:
         devices = []
     self.devices = devices
Пример #2
0
 def __init__(self, species_name, genus_name,
              cultivar=None, author=None, **kw):
     Entity.__init__(self, **kw)
     self.species_name = species_name
     self.genus_name = genus_name
     self.cultivar = cultivar
     self.author = author
Пример #3
0
 def __init__(self, specs, status, sample=None, **kw):
     Entity.__init__(self, **kw)
     if self.__class__ is Container:
         raise NotImplementedError('Abstract class')
     self.specs = specs
     self.status = status
     self.sample = sample
Пример #4
0
 def __init__(self, specs, status, sample=None, **kw):
     Entity.__init__(self, **kw)
     if self.__class__ is Container:
         raise NotImplementedError("Abstract class")
     self.specs = specs
     self.status = status
     self.sample = sample
Пример #5
0
 def __init__(self, sample, volume, time_stamp=None, **kw):
     Entity.__init__(self, **kw)
     self.sample = sample
     self.volume = volume
     if time_stamp is None:
         time_stamp = get_utc_time()
     self.time_stamp = time_stamp
Пример #6
0
 def __init__(self, sample, volume, time_stamp=None, **kw):
     Entity.__init__(self, **kw)
     self.sample = sample
     self.volume = volume
     if time_stamp is None:
         time_stamp = get_utc_time()
     self.time_stamp = time_stamp
Пример #7
0
 def __init__(self, name, label, devices=None, **kw):
     Entity.__init__(self, **kw)
     self.name = name
     self.label = label
     if devices is None:
         devices = []
     self.devices = devices
Пример #8
0
 def __init__(self, rack, location, checkin_date=None, **kw):
     Entity.__init__(self, **kw)
     self.rack = rack
     self.location = location
     if checkin_date is None:
         checkin_date = datetime.datetime.now()
     self.checkin_date = checkin_date
Пример #9
0
 def __init__(self, username, directory_user_id, user_preferenceses=None,
              **kw):
     Entity.__init__(self, **kw)
     self.username = username
     self.directory_user_id = directory_user_id
     if user_preferenceses is None:
         user_preferenceses = []
     self.user_preferenceses = user_preferenceses
Пример #10
0
 def __init__(self, label, rack_layout, experiment_design=None,
              worklist_series=None,
              **kw):
     Entity.__init__(self, **kw)
     self.label = label
     self.rack_layout = rack_layout
     self.experiment_design = experiment_design
     self.worklist_series = worklist_series
Пример #11
0
 def __init__(self, tube, source_rack, source_position, target_rack,
              target_position, **kw):
     Entity.__init__(self, **kw)
     self.tube = tube
     self.source_rack = source_rack
     self.source_position = source_position
     self.target_rack = target_rack
     self.target_position = target_position
Пример #12
0
 def __init__(self, set_type, molecule_designs=None, **kw):
     if self.__class__ is MoleculeDesignSetBase:
         raise NotImplementedError('Abstract class.')
     Entity.__init__(self, **kw)
     if molecule_designs is None:
         molecule_designs = set()
     self.set_type = set_type
     self.molecule_designs = molecule_designs
Пример #13
0
 def __init__(self, text=None, text_ent=None, **kw):
     Entity.__init__(self, **kw)
     if text is None:
         text = self.DEFAULT_TEXT
     self.text = text
     if text_ent is None:
         text_ent = self.DEFAULT_TEXT
     self.text_ent = text_ent
Пример #14
0
 def __init__(self, molecule_design_library, rack, layout_number,
              has_been_used=False, lab_iso=None, **kw):
     Entity.__init__(self, **kw)
     self.molecule_design_library = molecule_design_library
     self.rack = rack
     self.layout_number = layout_number
     self.has_been_used = has_been_used
     self.lab_iso = lab_iso
Пример #15
0
 def __init__(self, tube, source_rack, source_position, target_rack,
              target_position, **kw):
     Entity.__init__(self, **kw)
     self.tube = tube
     self.source_rack = source_rack
     self.source_position = source_position
     self.target_rack = target_rack
     self.target_position = target_position
Пример #16
0
 def __init__(self, text=None, text_ent=None, **kw):
     Entity.__init__(self, **kw)
     if text is None:
         text = self.DEFAULT_TEXT
     self.text = text
     if text_ent is None:
         text_ent = self.DEFAULT_TEXT
     self.text_ent = text_ent
Пример #17
0
 def __init__(self, text, guid=None, time_stamp=None, **kw):
     Entity.__init__(self, **kw)
     if guid is None:
         guid = str(uuid.uuid4())
     if time_stamp is None:
         time_stamp = datetime.now()
     self.text = text
     self.guid = guid
     self.time_stamp = time_stamp
Пример #18
0
 def __init__(self, user, tube_transfers=None, timestamp=None, **kw):
     Entity.__init__(self, **kw)
     self.user = user
     if timestamp is None:
         timestamp = get_utc_time()
     self.timestamp = timestamp
     if tube_transfers is None:
         tube_transfers = []
     self.tube_transfers = tube_transfers
Пример #19
0
 def __init__(self, user, tube_transfers=None, timestamp=None, **kw):
     Entity.__init__(self, **kw)
     self.user = user
     if timestamp is None:
         timestamp = get_utc_time()
     self.timestamp = timestamp
     if tube_transfers is None:
         tube_transfers = []
     self.tube_transfers = tube_transfers
Пример #20
0
 def __init__(self, product_id, supplier, time_stamp=None, is_current=False, is_deleted=False, **kw):
     Entity.__init__(self, **kw)
     self.product_id = product_id
     self.supplier = supplier
     if time_stamp is None:
         time_stamp = get_utc_time()
     self.time_stamp = time_stamp
     self.is_current = is_current
     self.is_deleted = is_deleted
Пример #21
0
 def __init__(self, iso, rack, iso_plate_type=None, **kw):
     Entity.__init__(self, **kw)
     if self.__class__ is IsoPlate:
         raise NotImplementedError('Abstract class')
     if iso_plate_type is None:
         iso_plate_type = ISO_PLATE_TYPES.ISO_PLATE
     self.iso_plate_type = iso_plate_type
     self.iso = iso
     self.rack = rack
Пример #22
0
 def __init__(self, text, guid=None, time_stamp=None, **kw):
     Entity.__init__(self, **kw)
     if guid is None:
         guid = str(uuid.uuid4())
     if time_stamp is None:
         time_stamp = datetime.now()
     self.text = text
     self.guid = guid
     self.time_stamp = time_stamp
Пример #23
0
 def __init__(self, name, description, rack_shape, max_volume,
              min_dead_volume, max_dead_volume, **kw):
     Entity.__init__(self, **kw)
     self._name = name
     self._description = description
     self._rack_shape = rack_shape
     self._max_volume = max_volume
     self._min_dead_volume = min_dead_volume
     self._max_dead_volume = max_dead_volume
Пример #24
0
 def __init__(self, positions, hash_value, **kw):
     """
     This construction should not be used. Use the factory method
     :func:`from_positions` to load a potential existing rack position
     set from DB instead of creating a new one.
     """
     Entity.__init__(self, **kw)
     self._positions = positions
     self._hash_value = hash_value
Пример #25
0
 def __init__(self, positions, hash_value, **kw):
     """
     This construction should not be used. Use the factory method
     :func:`from_positions` to load a potential existing rack position
     set from DB instead of creating a new one.
     """
     Entity.__init__(self, **kw)
     self._positions = positions
     self._hash_value = hash_value
Пример #26
0
 def __init__(self, name, description, rack_shape, max_volume,
              min_dead_volume, max_dead_volume, **kw):
     Entity.__init__(self, **kw)
     self._name = name
     self._description = description
     self._rack_shape = rack_shape
     self._max_volume = max_volume
     self._min_dead_volume = min_dead_volume
     self._max_dead_volume = max_dead_volume
Пример #27
0
 def __init__(self, iso, rack, iso_plate_type=None, **kw):
     Entity.__init__(self, **kw)
     if self.__class__ is IsoPlate:
         raise NotImplementedError('Abstract class')
     if iso_plate_type is None:
         iso_plate_type = ISO_PLATE_TYPES.ISO_PLATE
     self.iso_plate_type = iso_plate_type
     self.iso = iso
     self.rack = rack
Пример #28
0
 def __init__(self, rack_shape=None, experiment_design_racks=None,
              worklist_series=None, experiment_metadata=None, **kw):
     Entity.__init__(self, **kw)
     if experiment_design_racks is None:
         experiment_design_racks = []
     self.experiment_design_racks = experiment_design_racks
     self.rack_shape = rack_shape
     self.worklist_series = worklist_series
     self.experiment_metadata = experiment_metadata
Пример #29
0
 def __init__(self, name, min_transfer_volume, max_transfer_volume,
              max_dilution_factor, has_dynamic_dead_volume, is_sector_bound,
              **kw):
     Entity.__init__(self, **kw)
     self._name = name
     self._min_transfer_volume = min_transfer_volume
     self._max_transfer_volume = max_transfer_volume
     self._max_dilution_factor = max_dilution_factor
     self._has_dynamic_dead_volume = has_dynamic_dead_volume
     self._is_sector_bound = is_sector_bound
Пример #30
0
 def __init__(self, label, experiment_design,
              source_rack=None, job=None, experiment_racks=None, **kw):
     Entity.__init__(self, **kw)
     self.label = label
     self.source_rack = source_rack
     self.experiment_design = experiment_design
     self.job = job
     if experiment_racks is None:
         experiment_racks = []
     self.experiment_racks = experiment_racks
Пример #31
0
 def __init__(self, label,
              creation_date=None, active=False, project=None, **kw):
     Entity.__init__(self, **kw)
     self.label = label
     if creation_date is None:
         creation_date = get_utc_time()
     self.creation_date = creation_date
     self.active = active
     if project is not None:
         self.project = project
Пример #32
0
 def __init__(self, row_index, column_index, label, **kw):
     """
     This constructor should not be used. Load the rack positions from the
     DB instead by means of one of fetcher methods (:func:`from_label`,
     :func:`from_row_index_column_index` or :func:`from_row_column`).
     """
     Entity.__init__(self, **kw)
     self._label = label
     self._row_index = row_index
     self._column_index = column_index
Пример #33
0
 def __init__(self, name, min_transfer_volume, max_transfer_volume,
              max_dilution_factor, has_dynamic_dead_volume, is_sector_bound,
              **kw):
     Entity.__init__(self, **kw)
     self._name = name
     self._min_transfer_volume = min_transfer_volume
     self._max_transfer_volume = max_transfer_volume
     self._max_dilution_factor = max_dilution_factor
     self._has_dynamic_dead_volume = has_dynamic_dead_volume
     self._is_sector_bound = is_sector_bound
Пример #34
0
 def __init__(self, row_index, column_index, label, **kw):
     """
     This constructor should not be used. Load the rack positions from the
     DB instead by means of one of fetcher methods (:func:`from_label`,
     :func:`from_row_index_column_index` or :func:`from_row_column`).
     """
     Entity.__init__(self, **kw)
     self._label = label
     self._row_index = row_index
     self._column_index = column_index
Пример #35
0
 def __init__(self, shape=None, tagged_rack_position_sets=None, **kw):
     Entity.__init__(self, **kw)
     self.shape = shape
     if tagged_rack_position_sets is None:
         tagged_rack_position_sets = []
     self.tagged_rack_position_sets = tagged_rack_position_sets
     self.__tag_to_positions_map = None
     self.__position_to_tags_map = None
     self.__all_tags = None
     self.__all_positions = None
Пример #36
0
 def __init__(self, genus_name, species_name, common_name, acronym,
              ncbi_tax_id, genes=None, **kw):
     Entity.__init__(self, **kw)
     self.genus_name = genus_name
     self.species_name = species_name
     self.common_name = common_name
     self.acronym = acronym
     self.ncbi_tax_id = ncbi_tax_id
     if genes is None:
         genes = []
     self.genes = genes
Пример #37
0
 def __init__(self,
              username,
              directory_user_id,
              user_preferenceses=None,
              **kw):
     Entity.__init__(self, **kw)
     self.username = username
     self.directory_user_id = directory_user_id
     if user_preferenceses is None:
         user_preferenceses = []
     self.user_preferenceses = user_preferenceses
Пример #38
0
 def __init__(self, name, default_stock_concentration,
              description='', thaw_time=0, modifications=None, **kw):
     if not 'id' in kw:
         kw['id'] = name.lower()
     Entity.__init__(self, **kw)
     self.name = name
     self.default_stock_concentration = default_stock_concentration
     self.description = description
     self.thaw_time = thaw_time
     if modifications == None:
         self.modifications = []
Пример #39
0
 def __init__(self, structure_type_id, representation,
              molecule_designs=None, **kw):
     if self.__class__ is ChemicalStructure:
         raise NotImplementedError('Abstract class.')
     Entity.__init__(self, **kw)
     self.structure_type_id = structure_type_id
     self._validate_representation(representation)
     self.representation = representation
     if molecule_designs is None:
         molecule_designs = []
     self.molecule_designs = molecule_designs
Пример #40
0
 def __init__(self, molecule_design_pool_set, label, final_volume,
              final_concentration, number_layouts, rack_layout,
              creation_iso_request=None, **kw):
     Entity.__init__(self, **kw)
     self.molecule_design_pool_set = molecule_design_pool_set
     self.label = label
     self.final_volume = final_volume
     self.final_concentration = final_concentration
     self.number_layouts = number_layouts
     self.rack_layout = rack_layout
     self.creation_iso_request = creation_iso_request
Пример #41
0
 def __init__(self, name, label, command_definition, value_type,
              description=None, parameter_options=None, **kw):
     Entity.__init__(self, **kw)
     self.name = name
     self.label = label
     self.command_definition = command_definition
     self.value_type = value_type
     self.description = description
     if parameter_options is None:
         parameter_options = []
     self.parameter_options = parameter_options
Пример #42
0
 def __init__(self,
              barcodes='',
              labels=None,
              printer=None,
              type=None,
              **kw):
     Entity.__init__(self, **kw)
     self.barcodes = barcodes
     self.labels = labels
     self.printer = printer
     self.type = type
Пример #43
0
 def __init__(self,
              label,
              rack_layout,
              experiment_design=None,
              worklist_series=None,
              **kw):
     Entity.__init__(self, **kw)
     self.label = label
     self.rack_layout = rack_layout
     self.experiment_design = experiment_design
     self.worklist_series = worklist_series
Пример #44
0
 def __init__(self, volume, hash_value=None, transfer_type=None, **kw):
     """
     Constructor
     """
     Entity.__init__(self, **kw)
     if self.__class__ is PlannedLiquidTransfer:
         raise NotImplementedError('Abstract class')
     self._volume = volume
     self._hash_value = hash_value
     if transfer_type is None:
         transfer_type = TRANSFER_TYPES.LIQUID_TRANSFER
     self._transfer_type = transfer_type
Пример #45
0
 def __init__(self, molecule_design_pool, molecule_type, concentration,
              total_tubes, total_volume, minimum_volume, maximum_volume,
              **kw):
     Entity.__init__(self, **kw)
     self.molecule_design_pool = molecule_design_pool
     self.molecule_type = molecule_type
     self.concentration = concentration
     self.total_tubes = total_tubes
     self.total_volume = total_volume
     self.minimum_volume = minimum_volume
     self.maximum_volume = maximum_volume
     self.genes = []
Пример #46
0
 def __init__(self, name, label, type, barcode, location_rack=None, # redef type pylint: disable=W0622
              device=None, index=None, **kw):
     Entity.__init__(self, **kw)
     #FIXME: #pylint: disable=W0511
     #       this awaits proper handling of character ids on DB level
     self.name = name
     self.label = label
     self.type = type
     self.device = device
     self.index = index
     self.barcode = barcode
     self.location_rack = location_rack
Пример #47
0
 def __init__(self, volume, hash_value=None, transfer_type=None, **kw):
     """
     Constructor
     """
     Entity.__init__(self, **kw)
     if self.__class__ is PlannedLiquidTransfer:
         raise NotImplementedError('Abstract class')
     self._volume = volume
     self._hash_value = hash_value
     if transfer_type is None:
         transfer_type = TRANSFER_TYPES.LIQUID_TRANSFER
     self._transfer_type = transfer_type
Пример #48
0
 def __init__(self,
              molecule_design_library,
              rack,
              layout_number,
              has_been_used=False,
              lab_iso=None,
              **kw):
     Entity.__init__(self, **kw)
     self.molecule_design_library = molecule_design_library
     self.rack = rack
     self.layout_number = layout_number
     self.has_been_used = has_been_used
     self.lab_iso = lab_iso
Пример #49
0
 def __init__(self,
              rack_shape=None,
              experiment_design_racks=None,
              worklist_series=None,
              experiment_metadata=None,
              **kw):
     Entity.__init__(self, **kw)
     if experiment_design_racks is None:
         experiment_design_racks = []
     self.experiment_design_racks = experiment_design_racks
     self.rack_shape = rack_shape
     self.worklist_series = worklist_series
     self.experiment_metadata = experiment_metadata
Пример #50
0
    def __init__(self, tags, user):
        """
        Constructor.

        :param set tags: Set of :class:`Tag` instances associated to the rack
            positions.
        :param user: User who creates the tagged object.
        :type user: class:`thelma.entities.user.User`
        """
        Entity.__init__(self)
        if len(tags) < 1:
            raise ValueError('The tag list is empty!')
        self.taggings = [Tagging(tag, self, user) for tag in tags]
        self.tags = tags
Пример #51
0
 def __init__(self, label, user, creation_time=None, job_type=None, **kw):
     """
     Constructor
     """
     if self.__class__ is Job:
         raise NotImplementedError('Abstract class')
     Entity.__init__(self, **kw)
     if job_type is None:
         job_type = JOB_TYPES.BASE
     self.job_type = job_type
     self.label = label
     self.user = user
     if creation_time is None:
         creation_time = get_utc_time()
     self.creation_time = creation_time
Пример #52
0
    def __init__(self, tag, tagged, user, **kw):
        """
        Constructor.

        :param tag: tag for this tagging.
        :type tag: :class:`Tag`.
        :param tagged: object to tag.
        :type tagged: :class:`Tagged`
        :param user: User performing the tagging.
        :type user: class:`thelma.entities.user.User`
        """
        Entity.__init__(self, **kw)
        self.tag = tag
        self.tagged = tagged
        self.user = user
Пример #53
0
 def __init__(self,
              product_id,
              supplier,
              time_stamp=None,
              is_current=False,
              is_deleted=False,
              **kw):
     Entity.__init__(self, **kw)
     self.product_id = product_id
     self.supplier = supplier
     if time_stamp is None:
         time_stamp = get_utc_time()
     self.time_stamp = time_stamp
     self.is_current = is_current
     self.is_deleted = is_deleted
Пример #54
0
 def __init__(self,
              label,
              experiment_design,
              source_rack=None,
              job=None,
              experiment_racks=None,
              **kw):
     Entity.__init__(self, **kw)
     self.label = label
     self.source_rack = source_rack
     self.experiment_design = experiment_design
     self.job = job
     if experiment_racks is None:
         experiment_racks = []
     self.experiment_racks = experiment_racks