synbiopython.lab_automation.containers¶
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).
- Parameters
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
-
find_unique_well_by_condition
(condition)[source]¶ 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.
-
find_unique_well_containing
(query)[source]¶ Return the unique well whose content contains the query.
-
get_well_at_index
(index, direction='row')[source]¶ Return the well at the corresponding index.
Examples:
>>> 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.
Examples:
>>> plate.index_to_wellname(1) # "A1" >>> plate.get_well_at_index(2) # "A2" >>> plate.get_well_at_index(2, direction="column") # "B1"
-
iter_wells
(direction='row')[source]¶ Iter through the wells either by row or by column.
Examples:
>>> for well in plate.iter_wells(): >>> print (well.name)
-
list_filtered_wells
(well_filter)[source]¶ List filtered wells.
Examples:
>>> def condition(well): >>> return well.volume > 50 >>> for well in myplate.list_filtered_wells(condition): >>> print(well.name)
-
list_wells_in_column
(column_number)[source]¶ Return the list of all wells of the plate in the given column.
Examples:
>>> for well in plate.list_wells_in_column(5): >>> print(well.name)
-
list_wells_in_row
(row)[source]¶ 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).
Examples:
>>> for well in plate.list_wells_in_row("H"): >>> print(well.name)
-
return_column
(column_number)[source]¶ Return the list of all wells of the plate in the given column.
-
return_row
(row)[source]¶ 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).
-
to_pandas_dataframe
(fields=None, direction='row')[source]¶ Return a dataframe with the info on each well.
-
well_class
¶
-
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)
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.
- Parameters
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.
- Parameters
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¶
-
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.
-
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.