riverine.locations#

Classes#

PlateType

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

WellPos

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

Module Contents#

class riverine.locations.PlateType(*args, **kwds)[source]#

Bases: enum.Enum

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

wells96 = 96[source]#

96-well plate.

wells384 = 384[source]#

384-well plate.

rows() list[str][source]#
Returns:

list of all rows in this plate (as letters ‘A’, ‘B’, …)

cols() list[int][source]#
Returns:

list of all columns in this plate (as integers 1, 2, …)

num_wells_per_plate() int[source]#
Returns:

number of wells in this plate type

min_wells_per_plate() int[source]#
Returns:

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

class riverine.locations.WellPos(ref_or_row: int, col: int, /, *, platesize: Literal[96, 384] = 384)[source]#
class riverine.locations.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.

row: int[source]#
col: int[source]#
platesize: Literal[96, 384] = 384[source]#
_validate_row(v: int) None[source]#
_validate_col(v: int) None[source]#
__str__() str[source]#
__repr__() str[source]#
__eq__(other: object) bool[source]#
key_byrow() tuple[int, int][source]#

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

key_bycol() tuple[int, int][source]#

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

next_byrow() WellPos[source]#

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

next_bycol() WellPos[source]#

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

is_last() bool[source]#
Returns:

whether WellPos is the last well on this type of plate

advance(order: Literal['row', 'col'] = 'col') WellPos[source]#

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, …

Returns:

new WellPos representing the next well position