本文整理汇总了Python中thelma.tools.base.BaseTool.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BaseTool.__init__方法的具体用法?Python BaseTool.__init__怎么用?Python BaseTool.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thelma.tools.base.BaseTool
的用法示例。
在下文中一共展示了BaseTool.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, iso_request, ticket_numbers=None, reporter=None,
parent=None):
"""
Constructor.
:param iso_request: The ISO request for which to generate the ISOs.
:type iso_request:
:class:`thelma.entities.iso.StockSampleGenerationIsoRequest`
:param ticket_numbers: The user might specify ticket numbers for the
ISO tickets. The number of ticket number must either be 1 (in
which case all ISOs get the same ticket number) or equal to the
number of ISOs. If there is no ticket number specified, the
tool will generate new tickets for each ISO.
Attention: It is not checked whether these given tickets exist!
:type ticket_numbers: :class:`list` of `int`
:default ticket_numbers: *None*
:param reporter: This user will become reporter of the tickets (if
new tickets are created). If you do not want to create tickets,
the user might be *None*.
:type reporter: :class:`thelma.entities.user.User`
:default reporter: *None*
"""
BaseTool.__init__(self, parent=parent)
self.iso_request = iso_request
self.ticket_numbers = ticket_numbers
self.reporter = reporter
#: The number of ISOs created (for checking reasons).
self.__new_iso_counter = None
示例2: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, iso_request, number_isos,
excluded_racks=None, requested_tubes=None, parent=None):
"""
Constructor.
:param iso_request: The ISO request containing the ISO layout for the
ISO (and experiment metadata with the molecule design pools).
:type iso_request: :class:`thelma.entities.iso.IsoRequest`
:param int number_isos: The number of ISOs ordered.
:param excluded_racks: A list of barcodes from stock racks that shall
not be used for stock sample picking.
:type excluded_racks: A list of rack barcodes
:param requested_tubes: A list of barcodes from stock tubes that are
supposed to be used.
:type requested_tubes: A list of tube barcodes.
"""
BaseTool.__init__(self, parent=parent)
#: The ISO request defining the ISO layout
#: (:class:`thelma.entities.iso.IsoRequest`)
self.iso_request = iso_request
#: The number of ISOs ordered.
self.number_isos = number_isos
#: A list of barcodes from stock racks that shall not be used for
#: stock sample (molecule design pool) picking.
self.excluded_racks = excluded_racks
if excluded_racks is None:
self.excluded_racks = []
if requested_tubes is None:
requested_tubes = []
#: A list of barcodes from stock tubes that are supposed to be used
#: (for fixed positions).
self.requested_tubes = requested_tubes
示例3: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, parent=None):
BaseTool.__init__(self, parent=parent)
#: The source layout.
self._source_layout = None
#: A set of all hash values.
self._hash_values = None
#: The column maps for the different target layouts (working positions
#: mapped onto column indices) - the keys of this dictionary should
#: be suitable for sorting. Otherwise there are irrelevant.
self._column_maps = None
#: The rack shape of the source layout.
self.__source_rack_shape = None
#: The minimum distance in rows two well of a column must have for
#: the Biomek to pipet them together. The value is 1 for 384-well
#: plates and 0 (=no distance) for 96-well plates.
self.__trg_min_row_distance = None
#: The minimum distance in rows two well of a column must have for
#: the Biomek to pipet them together. The value is 1 for 384-well
#: plates and 0 (=no distance) for 96-well plates.
self.__src_min_row_distance = None
#: The transfer items that are already part of a subcolumn.
self.__subcolumn_tids = None
#: All :class:`TransferSubcolumn` objects mapped onto their length.
self.__subcolumn_lengths = None
#: Stores :class:`SourceSubcolumn` objects managing the remaining free
#: positions for the source transfection layout.
self.__free_positions = None
示例4: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, iso, user, parent=None):
"""
Constructor.
:param iso: library creation ISO to execute.
:param user: User performing the execution.
"""
BaseTool.__init__(self, parent=parent)
self.iso = iso
self.user = user
#:
self.__single_stock_rack_map = None
#:
self.__pool_stock_rack_map = None
#:
self.__prep_plate_map = None
#:
self.__ssc_layout_map = None
#:
self.__empty_stock_rack_positions_map = None
#:
self.__stock_trf_exc_wl_map = None
# These are attributes required by the Trac reporter that this
# executor is passed to.
self.mode = StockTransferWriterExecutor.MODE_EXECUTE
self.entity = iso
示例5: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, iso, single_stock_racks, pool_stock_racks=None,
include_dummy_output=False, parent=None):
"""
Constructor.
:param list single_stock_racks: Barcodes for single stock racks (must
be empty).
:param list pool_stock_racks: Optional pool stock rack barcodes.
Each pool stock rack is expected to contain empty tubes in the
expected positions.
:param bool include_dummy_output: Flag indicating if the writer should
return a dummy output file for the tube transfers.
"""
BaseTool.__init__(self, parent=parent)
self.iso = iso
self.single_stock_racks = single_stock_racks
self.pool_stock_racks = pool_stock_racks
self.include_dummy_output = include_dummy_output
#: Pool stock rack buffer volume in ul.
self.__pool_stock_rack_buffer_volume = None
#: Map tube rack barcode -> tube rack.
self.__tube_rack_map = None
#: Map sector index -> single stock rack barcodes.
self.__single_stock_rack_map = None
#: Map sector index -> pool stock rack barcode.
self.__pool_stock_rack_map = None
#: Map rack barcode -> location string.
self.__source_rack_locations = None
示例6: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(
self,
base_layout,
stock_concentration,
library_name,
preparation_buffer_volume,
pool_buffer_volume=None,
parent=None,
):
"""
Constructor.
:param base_layout: Layout defining which positions of the layout
are allowed to take up library samples.
:type base_layout: :class:`LibraryBaseLayout`
:param int stock_concentration: Concentration of the single
source molecule designs in the stock in nM (positive number).
:param str library_name: Name of the library to be created.
:param float preparation_buffer_volume: Buffer volume for preparation
plates in ul.
:param float pool_buffer_volume: Buffer volume for pool
plates in ul. May be `None` if no pool racks are created.
"""
BaseTool.__init__(self, parent=parent)
self.base_layout = base_layout
self.stock_concentration = stock_concentration
self.library_name = library_name
self.preparation_buffer_volume = preparation_buffer_volume
self.pool_buffer_volume = pool_buffer_volume
#: The worklist series for the ISO request.
self.__worklist_series = None
#: The last used worklist index (within the series).
self.__last_worklist_index = None
#: The base layout for each sector.
self.__sector_layouts = None
示例7: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, molecule_design_pools, stock_concentration,
take_out_volume,
excluded_racks=None, requested_tubes=None, parent=None):
"""
Constructor.
:param molecule_design_pools: The molecule design pool IDs for which
to run the query.
:type molecule_design_pools: :class:`set` of molecule design pool IDs
:param int stock_concentration: The stock concentration of the single
molecule design pools for the library in nM (positive number).
:param int take_out_volume: The volume that shall be removed from the
single molecule design stock in ul (positive number).
:param requested_tubes: A list of barcodes from stock tubes that are
supposed to be used.
:type requested_tubes: A list of tube barcodes.
:param excluded_racks: A list of barcodes from stock racks that shall
not be used for molecule design picking.
:type excluded_racks: A list of rack barcodes
"""
BaseTool.__init__(self, parent=parent)
#: The molecule design pool IDs for which to run the query.
self.molecule_design_pools = molecule_design_pools
#: The stock concentration of the single molecule design pools for
#: the library in nM.
self.stock_concentration = stock_concentration
#: The volume that shall be removed from the single molecule design
#: stock in ul.
self.take_out_volume = take_out_volume
if excluded_racks is None: excluded_racks = []
#: A list of barcodes from stock racks that shall not be used for
#: molecule design picking.
self.excluded_racks = excluded_racks
if requested_tubes is None: requested_tubes = []
#: A list of barcodes from stock tubes that are supposed to be used
#: (for fixed positions).
self.requested_tubes = requested_tubes
#: The DB session used for the queries.
self.__session = None
#: The library candidated mapped onto pool IDs.
self.__library_candidates = None
#: Maps library pool IDs onto molecule design IDs. ATTENTION: a molecule
#: design pool can point to several library pools! For this reason,
#: library pool IDs are stored in lists.
self.__md_map = None
#: Maps molecule design IDs onto single molecule design pool IDs.
self.__single_pool_map = None
#: Stores the suitable stock sample IDs for the single molecule
#: designs pools used to create the library pools. The results are
#: determined by the :class:`SINGLE_POOL_QUERY`.
self.__stock_samples = None
#: The picked library candidates for the pools in the order of
#: completion.
self.__picked_candidates = None
#: If an siRNA is used in several pools this map will store the data
#: of which ISO candidate has been used for which one.
self.__multi_pool_iso_candidates = None
示例8: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, library_creation_iso, tube_destination_racks,
pool_stock_racks, parent=None):
"""
Constructor:
:param library_creation_iso: The library creation ISO for which to
generate the worklist files.
:type library_creation_iso:
:class:`thelma.entities.library.LibraryCreationIso`
:param tube_destination_racks: The barcodes for the destination
rack for the single molecule design tube (these racks have to be
empty).
:type tube_destination_racks: map of barcode lists
(:class:`basestring`) mapped onto sector indices.
:param pool_stock_racks: The barcodes for the pool stock racks
(these racks have to have empty tubes in defined positions).
:type pool_stock_racks: map of barcodes
(:class:`basestring`) mapped onto sector indices.
"""
BaseTool.__init__(self, parent=parent)
#: The library creation ISO for which to generate the worklist files.
self.library_creation_iso = library_creation_iso
#: The barcodes for the destination rack for the single molecule
#: design tube (these racks have to be empty).
self.tube_destination_racks = tube_destination_racks
#: The barcodes for the pool stock racks rack for the single molecule
#: design tube (these racks have to have empty tubes in defined
#: positions).
self.pool_stock_racks = pool_stock_racks
#: The name of the library that is created here.
self.library_name = None
#: The layout number of the ISO.
self.layout_number = None
#: Stores the generated file streams (mapped onto file names).
self.__file_map = None
#: Maps tube racks onto barcodes.
self.__rack_map = None
#: The library layout for the ISO.
self.__library_layout = None
#: Maps library position onto sector indices.
self.__library_sectors = None
#: Maps translated library position onto sector indices.
self.__translated_sectors = None
#: Maps tube onto tube barcodes.
self.__tube_map = dict()
#: The tube transfer data items for the tube handler worklist writer
#: sorted by sector index.
self.__tube_transfers = None
#: Stores the rack location for each source rack (single molecule
#: design pools).
self.__source_rack_locations = None
示例9: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, parent=None):
BaseTool.__init__(self, parent=parent)
reg = get_current_registry()
self.tractor_api = reg.getUtility(ITractor)
#: The value return of the :func:`send_request` method.
self.return_value = None
#: Is set to *True*, if all Trac request have been completed
#: successfully.
self.was_successful = False
示例10: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, isos, parent=None):
"""
Constructor.
:param isos: The ISOs to be reset.
:type isos: :class:`list` of :class:`StockSampleCreationIso`s
"""
BaseTool.__init__(self, parent=parent)
#: The ISOs to be reset.
self.isos = isos
示例11: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, parent=None):
BaseTool.__init__(self, parent=parent)
#: The stream to be generated.
self.__stream = None
#: Maps :class:`CsvColumnDictionary`s onto column indices.
self._index_map = None
#: A list with of :class:`CsvColumnDictionary` (to be set by the
#: subclasses).
self._column_map_list = None
#: A boolean that defines whether to print a header.
self._write_headers = True
示例12: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, iso_concentration, iso_volume, layout_filename_q1,
layout_filename_q2, layout_filename_q3, layout_filename_q4,
target_barcode, parent=None):
BaseTool.__init__(self, parent=parent)
self.__iso_concentration = float(iso_concentration) * 1e-9
self.__iso_volume = float(iso_volume) * 1e-6
self.__layout_filename_q1 = layout_filename_q1
self.__layout_filename_q2 = layout_filename_q2
self.__layout_filename_q3 = layout_filename_q3
self.__layout_filename_q4 = layout_filename_q4
self.__target_barcode = target_barcode
示例13: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, experiments, parent=None):
"""
Constructor.
:param experiments: A list of experiments that all belong
to the same experiment design.
:type experiments: :class:`list` of
:class:`thelma.entities.experiment.Experiment`
"""
BaseTool.__init__(self, parent=parent)
#: A list of experiments that all belong to the same experiment design.
self.experiments = experiments
#: The experiment type of the experiment metadata.
self._experiment_type = None
示例14: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, step_number, rack_transfer_job, parent=None):
"""
Constructor.
:param int step_number: The step number (of all rack transfers in
the series).
:param rack_transfer_job: The job to write down.
:type rack_transfer_job: :class:`RackSampleTransferJob`
"""
BaseTool.__init__(self, parent=parent)
#: The step (of all rack transfers in teh series).
self.step_number = step_number
#: The job to write down.
self.rack_transfer_job = rack_transfer_job
示例15: __init__
# 需要导入模块: from thelma.tools.base import BaseTool [as 别名]
# 或者: from thelma.tools.base.BaseTool import __init__ [as 别名]
def __init__(self, stream=None, parent=None):
"""
Constructor.
:param stream: the opened file to parse
:type stream: a file stream
"""
BaseTool.__init__(self, parent=parent)
#: The stream for the parser.
self.stream = stream
#: The parser handled by the parser handler.
self.parser = None
#: The object to be passed as result.
self.return_value = None