riverine.locations
==================

.. py:module:: riverine.locations


Classes
-------

.. autoapisummary::

   riverine.locations.PlateType
   riverine.locations.WellPos


Module Contents
---------------

.. py:class:: PlateType(*args, **kwds)

   Bases: :py:obj:`enum.Enum`


   Represents two different types of plates in which DNA sequences can be ordered.


   .. py:attribute:: wells96
      :value: 96


      96-well plate.


   .. py:attribute:: wells384
      :value: 384


      384-well plate.


   .. py:method:: rows() -> list[str]

      :return:
          list of all rows in this plate (as letters 'A', 'B', ...)



   .. py:method:: cols() -> list[int]

      :return:
          list of all columns in this plate (as integers 1, 2, ...)



   .. py:method:: num_wells_per_plate() -> int

      :return:
          number of wells in this plate type



   .. py:method:: min_wells_per_plate() -> int

      :return:
          minimum number of wells in this plate type to avoid extra charge by IDT



.. py:class:: WellPos(ref_or_row: int, col: int, /, *, platesize: Literal[96, 384] = 384)
              WellPos(ref_or_row: str, col: None = None, /, *, platesize: Literal[96, 384] = 384)

   A Well reference, allowing movement in various directions and bounds checking.

   This uses 1-indexed row and col, in order to match usual practice.  It can take either
   a standard well reference as a string, or two integers for the row and column.


   .. py:attribute:: row
      :type:  int


   .. py:attribute:: col
      :type:  int


   .. py:attribute:: platesize
      :type:  Literal[96, 384]
      :value: 384



   .. py:method:: _validate_row(v: int) -> None


   .. py:method:: _validate_col(v: int) -> None


   .. py:method:: __str__() -> str


   .. py:method:: __repr__() -> str


   .. py:method:: __eq__(other: object) -> bool


   .. py:method:: key_byrow() -> tuple[int, int]

      Get a tuple (row, col) key that can be used for ordering by row.



   .. py:method:: key_bycol() -> tuple[int, int]

      Get a tuple (col, row) key that can be used for ordering by column.



   .. py:method:: next_byrow() -> WellPos

      Get the next well, moving right along rows, then down.



   .. py:method:: next_bycol() -> WellPos

      Get the next well, moving down along columns, and then to the right.



   .. py:method:: is_last() -> bool

      :return:
          whether WellPos is the last well on this type of plate



   .. py:method:: advance(order: Literal['row', 'col'] = 'col') -> WellPos

      Advances to the "next" well position. Default is column-major order, i.e.,
      A1, B1, C1, D1, E1, F1, G1, H1, A2, B2, ...
      To switch to row-major order, select `order` as `'row'`, i.e.,
      A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, B1, B2, ...

      :return:
          new WellPos representing the next well position



