コード例 #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
ファイル: container.py プロジェクト: papagr/TheLMA
 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
コード例 #3
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
コード例 #4
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
コード例 #5
0
ファイル: location.py プロジェクト: helixyte/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
コード例 #6
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
コード例 #7
0
ファイル: container.py プロジェクト: helixyte/TheLMA
 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
コード例 #8
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
コード例 #9
0
ファイル: tubetransfer.py プロジェクト: papagr/TheLMA
 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
コード例 #10
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
コード例 #11
0
ファイル: moleculedesign.py プロジェクト: papagr/TheLMA
 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
コード例 #12
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
コード例 #13
0
ファイル: tubetransfer.py プロジェクト: helixyte/TheLMA
 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
コード例 #14
0
ファイル: library.py プロジェクト: helixyte/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
コード例 #15
0
ファイル: experiment.py プロジェクト: helixyte/TheLMA
 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
コード例 #16
0
ファイル: tubetransfer.py プロジェクト: papagr/TheLMA
 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
コード例 #17
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
コード例 #18
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
コード例 #19
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
コード例 #20
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
コード例 #21
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
コード例 #22
0
ファイル: liquidtransfer.py プロジェクト: papagr/TheLMA
 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
コード例 #23
0
ファイル: system.py プロジェクト: scraping-xx/everest
 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
コード例 #24
0
ファイル: experiment.py プロジェクト: helixyte/TheLMA
 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
コード例 #25
0
ファイル: tubetransfer.py プロジェクト: helixyte/TheLMA
 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
コード例 #26
0
ファイル: liquidtransfer.py プロジェクト: helixyte/TheLMA
 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
ファイル: system.py プロジェクト: BigData-Tools/everest
 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
コード例 #28
0
ファイル: subproject.py プロジェクト: helixyte/TheLMA
 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
コード例 #29
0
ファイル: liquidtransfer.py プロジェクト: papagr/TheLMA
 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, 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
コード例 #31
0
ファイル: liquidtransfer.py プロジェクト: helixyte/TheLMA
 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
コード例 #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
ファイル: racklayout.py プロジェクト: papagr/TheLMA
 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
コード例 #34
0
ファイル: experiment.py プロジェクト: helixyte/TheLMA
 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
コード例 #35
0
ファイル: species.py プロジェクト: helixyte/TheLMA
 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
コード例 #36
0
ファイル: chemicalstructure.py プロジェクト: papagr/TheLMA
 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
コード例 #37
0
ファイル: entities.py プロジェクト: fogathmann/telex
 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
コード例 #38
0
ファイル: experiment.py プロジェクト: papagr/TheLMA
 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
コード例 #39
0
ファイル: moleculetype.py プロジェクト: helixyte/TheLMA
 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 = []
コード例 #40
0
ファイル: library.py プロジェクト: helixyte/TheLMA
 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,
              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
コード例 #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
ファイル: liquidtransfer.py プロジェクト: papagr/TheLMA
 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
コード例 #44
0
ファイル: stockinfo.py プロジェクト: papagr/TheLMA
 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 = []
コード例 #45
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
コード例 #46
0
ファイル: liquidtransfer.py プロジェクト: helixyte/TheLMA
 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
コード例 #47
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
コード例 #48
0
ファイル: experiment.py プロジェクト: papagr/TheLMA
 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
コード例 #49
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
コード例 #50
0
ファイル: experiment.py プロジェクト: papagr/TheLMA
 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
コード例 #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
ファイル: moleculetype.py プロジェクト: papagr/TheLMA
 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 = []
コード例 #55
0
ファイル: library.py プロジェクト: papagr/TheLMA
 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