コード例 #1
0
 def __write_general_section(self):
     # The general section contains library name, layout number, sector
     # index, number of tubes, and transfer volume.
     if self.has_pool_stock_racks:
         vol = get_pool_transfer_volume(
             number_designs=self.iso.iso_request.number_designs)
     else:
         pp_vol = self.iso.iso_request.preparation_plate_volume \
                  * VOLUME_CONVERSION_FACTOR
         src_conc = self.iso.iso_request.stock_concentration \
                    * CONCENTRATION_CONVERSION_FACTOR
         vol = get_preparation_plate_transfer_volume(
             source_concentration=src_conc, preparation_plate_volume=pp_vol)
     self._write_headline(self.GENERAL_HEADER, preceding_blank_lines=1)
     general_lines = [
         self.LIBRARY_LINE % self.iso.iso_request.label,
         self.LAYOUT_NUMBER_LINE % self.iso.layout_number
     ]
     if not self.sector_index is None:
         general_lines.append(self.SECTOR_NUMBER_LINE %
                              (self.sector_index + 1))
     general_lines.extend([
         self.TUBE_NO_LINE % len(self.tube_transfers),
         self.VOLUME_LINE % vol
     ])
     self._write_body_lines(general_lines)
コード例 #2
0
ファイル: writer.py プロジェクト: helixyte/TheLMA
 def __write_pool_creation_section(self):
     # This is the stock transfer part (creating pools from single molecule
     # designs).
     self.add_debug('Writing pool section.')
     self._write_headline(header_text=self.HEADER_POOL_CREATION,
                          preceding_blank_lines=0)
     lines = []
     volume_line = self.VOLUME_LINE \
         % get_pool_transfer_volume(number_designs=
                                      self.iso.iso_request.number_designs)
     volume_line += ' each'
     lines.append(volume_line)
     buffer_line = self.BUFFER_LINE % get_pool_buffer_volume()
     lines.append(buffer_line)
     for sector_index in sorted(self.single_stock_rack_map.keys()):
         lines.append('')
         lines.append(self.QUADRANT_LINE % (sector_index + 1))
         barcodes = self.single_stock_rack_map[sector_index]
         target_rack = self.pool_stock_rack_map[sector_index]
         src_line = self.SOURCE_LINE_PLURAL % (', '.join(sorted(barcodes)))
         lines.append(src_line)
         lines.append(self.TARGET_LINE % (target_rack))
     self._write_body_lines(lines)
コード例 #3
0
ファイル: writer.py プロジェクト: helixyte/TheLMA
 def __write_general_section(self):
     # The general section contains library name, layout number, sector
     # index, number of tubes, and transfer volume.
     if self.has_pool_stock_racks:
         vol = get_pool_transfer_volume(
                     number_designs=self.iso.iso_request.number_designs)
     else:
         pp_vol = self.iso.iso_request.preparation_plate_volume \
                  * VOLUME_CONVERSION_FACTOR
         src_conc = self.iso.iso_request.stock_concentration \
                    * CONCENTRATION_CONVERSION_FACTOR
         vol = get_preparation_plate_transfer_volume(
                                         source_concentration=src_conc,
                                         preparation_plate_volume=pp_vol)
     self._write_headline(self.GENERAL_HEADER, preceding_blank_lines=1)
     general_lines = [self.LIBRARY_LINE % self.iso.iso_request.label,
                      self.LAYOUT_NUMBER_LINE % self.iso.layout_number]
     if not self.sector_index is None:
         general_lines.append(
                      self.SECTOR_NUMBER_LINE % (self.sector_index + 1))
     general_lines.extend([self.TUBE_NO_LINE % len(self.tube_transfers),
                           self.VOLUME_LINE % vol])
     self._write_body_lines(general_lines)
コード例 #4
0
 def __write_pool_creation_section(self):
     # This is the stock transfer part (creating pools from single molecule
     # designs).
     self.add_debug('Writing pool section.')
     self._write_headline(header_text=self.HEADER_POOL_CREATION,
                          preceding_blank_lines=0)
     lines = []
     volume_line = self.VOLUME_LINE \
         % get_pool_transfer_volume(number_designs=
                                      self.iso.iso_request.number_designs)
     volume_line += ' each'
     lines.append(volume_line)
     buffer_line = self.BUFFER_LINE % get_pool_buffer_volume()
     lines.append(buffer_line)
     for sector_index in sorted(self.single_stock_rack_map.keys()):
         lines.append('')
         lines.append(self.QUADRANT_LINE % (sector_index + 1))
         barcodes = self.single_stock_rack_map[sector_index]
         target_rack = self.pool_stock_rack_map[sector_index]
         src_line = self.SOURCE_LINE_PLURAL % (', '.join(sorted(barcodes)))
         lines.append(src_line)
         lines.append(self.TARGET_LINE % (target_rack))
     self._write_body_lines(lines)