This module implements the Base class for all plates.

See synbiopython.lab_automation.containers for more specific plate subclasses, with set number of wells, well format, etc.

exception synbiopython.lab_automation.containers.Plate.NoUniqueWell[source]

Bases: Exception

NoUniqueWell exception class.

class synbiopython.lab_automation.containers.Plate.Plate(name=None, wells_data=None, plate_data=None)[source]

Bases: object

Base class for all plates.

See the builtin_containers for usage classes, such as generic microplate classes (Plate96, Plate384, etc).

  • name – Name or ID of the Plate as it will appear in strings and reports

  • wells_data – A dict {“A1”: {data}, “A2”: …}. The format of the data is left free

  • plate_data – plate data


Return the unique well of the plate satisfying the condition.

The condition method should have a signature of Well=>True/False.

Raises a NoUniqueWell error if 0 or several wells satisfy the condition.


Return the unique well whose content contains the query.

get_well_at_index(index, direction='row')[source]

Return the well at the corresponding index.


>>> plate.get_well_at_index(1)  # well A1
>>> plate.get_well_at_index(2)  # well A2
>>> plate.get_well_at_index(2, direction="column")  # well B1
index_to_wellname(index, direction='row')[source]

Return the name of the well at the corresponding index.


>>> plate.index_to_wellname(1)  # "A1"
>>> plate.get_well_at_index(2)  # "A2"
>>> plate.get_well_at_index(2, direction="column")  # "B1"

Iter through the wells either by row or by column.


>>> for well in plate.iter_wells():
>>>     print (

List filtered wells.


>>> def condition(well):
>>>     return well.volume > 50
>>> for well in myplate.list_filtered_wells(condition):
>>>     print(

Return all fields used in well data in the plate.


Return the list of all wells of the plate in the given column.


>>> for well in plate.list_wells_in_column(5):
>>>      print(

Return the list of all wells of the plate in the given row.

The row can be either a row number (1,2,3) or row letter(s) (A,B,C).


>>> for well in plate.list_wells_in_row("H"):
>>>      print(

Return the list of all wells of the plate in the given column.


Return the list of all wells of the plate in the given row.

The row can be either a row number (1,2,3) or row letter(s) (A,B,C).


Convert plate to dict.

to_pandas_dataframe(fields=None, direction='row')[source]

Return a dataframe with the info on each well.


alias of synbiopython.lab_automation.containers.Well.Well

wellname_to_index(wellname, direction='row')[source]

Return the index of the well in the plate.

Examples: >>> plate.wellname_to_index(“A1”) # 1 >>> plate.wellname_to_index(“A2”) # 2 >>> plate.wellname_to_index(“A1”, direction=”column”) # 9 (8x12 plate)

wells_grouped_by(data_field=None, key=None, sort_keys=False, ignore_none=False, direction_of_occurence='row')[source]

Return wells grouped by key.


Return wells sorted by sortkey

This module contains a generic class for a well.

class synbiopython.lab_automation.containers.Well.Well(plate, row, column, name, data=None)[source]

Bases: object

Generic class for a well.

  • plate – The plate on which the well is located

  • row – The well’s row (a number, starting from 0)

  • column – The well’s column (a number, starting from 0)

  • name – The well’s name, for instance “A1”

  • data – A dictionary storing data on the well, used in algorithms and reports.

add_content(components_quantities, volume=None, unit_volume='L')[source]

Add content to well.

  • components_quantities – Dictionary of components and quantities (default: gram). Example {“Compound_1”: 5}.

  • volume – Volume (default: liter).

  • unit_volume – Unit of volume (default: liter). Options: liter (L), milliliter (mL), microliter (uL), nanoliter (nL).

capacity = None
property coordinates

Return (well.row, well.column).

dead_volume_per_transfer_class = None

Empty the well.


Return the index of the well in the plate.

is_after(other, direction='row')[source]

Return whether this well is located strictly after the other well.

Example: iterate over all free wells after the last non-free well:

>>> direction = 'row'
>>> last_occupied_well = plate.last_nonempty_well(direction=direction)
>>> free_wells = (w for w in plate.iter_wells(direction=direction)
>>>               if w.is_after(last_occupied_well))
>>> for well in free_wells: ...
property is_empty

Return true if the well’s volume is 0.


Iterate through the tree of sources.


Return a summary string of the well.

subtract_content(components_quantities, volume=0)[source]

Subtract content from well.


Convert well to dict

property volume

Return volume.

This module contains a class to represent the volume and quantities of a well.

class synbiopython.lab_automation.containers.WellContent.WellContent(quantities=None, volume=0)[source]

Bases: object

Class to represent the volume and quantities of a well.

Having the well content represented as a separate object makes it possible to have several wells share the same content, e.g. in throughs.

components_as_string(separator=' ')[source]

Return a string representation of what’s in the well mix.

concentration(component=None, default=0)[source]

Return concentration of component.


Empty the well.


Return a dict {volume: 0.0001, quantities: {…:…}}.