示例#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
文件: sample.py 项目: helixyte/TheLMA
 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
文件: device.py 项目: helixyte/TheLMA
 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
文件: location.py 项目: papagr/TheLMA
 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
文件: user.py 项目: helixyte/TheLMA
 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
文件: entities.py 项目: b8va/everest
 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
文件: iso.py 项目: helixyte/TheLMA
 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
文件: rack.py 项目: helixyte/TheLMA
 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
文件: rack.py 项目: helixyte/TheLMA
 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
文件: location.py 项目: papagr/TheLMA
 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
文件: library.py 项目: papagr/TheLMA
 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
文件: job.py 项目: papagr/TheLMA
 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