def __init__(self, shape): """ Constructor. :param shape: The rack shape. :type shape: :class:`thelma.entities.rack.RackShape` """ StockSampleCreationLayout.__init__(self, shape) #: Allows validation of new position (is only set, if the layout is #: initialised via :func:`from_base_layout`. self.base_layout_positions = None
def _create_iso_layout(self): """ Creates a :class:`StockSampleCreationLayout` for a single ISO. Positions are populated column-wise. """ ssc_layout = StockSampleCreationLayout() for rack_pos in get_positions_for_shape(ssc_layout.shape, vertical_sorting=True): if not self._have_candidates: break pool_cand = self._pool_candidates.pop(0) ssc_pos = \ StockSampleCreationPosition(rack_pos, pool_cand.pool, pool_cand.get_tube_barcodes()) ssc_layout.add_position(ssc_pos) return ssc_layout