API Reference of PlateManager
Bases: BaseModel
add_molecule(molecule, constant=None)
Adds a molecule to the list of molecules. Allows to update the constant
attribute of the molecule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
molecule |
Molecule
|
Molecule object to add to the list of molecules. |
required |
constant |
bool | None
|
Indicates whether the |
None
|
add_protein(protein, constant=None)
Adds a protein to the list of proteins. Allows to update the constant
attribute of the protein.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
protein |
Protein
|
Protein object to add to the list of proteins. |
required |
constant |
bool | None
|
Indicates whether the |
None
|
assign_init_conditions(species, init_conc, conc_unit, to, ids=None, contributes_to_signal=None, silent=False)
Assigns a Molecule
or Protein
to specific wells on the plate based on the provided criteria.
In this way the initial concentration of the species can be set for the respective wells in a row,
column, all wells or all wells except for the specified. During the assignment, either an array of
initial concentrations or a single initial concentration can be provided. If a single initial
concentration is provided, it is assigned to all wells of e.g., a row or column.
If an array of initial concentrations is provided, the length of the array must match the number of
wells in the row or column.
Tip
For complex assignment scenarios, consider using the assign_init_conditions_from_spreadsheet
function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
species |
Molecule | Protein
|
The species to assign to the wells. |
required |
init_conc |
float | list[float]
|
The initial concentration(s) of the species. |
required |
conc_unit |
UnitDefinition
|
The unit of concentration. |
required |
to |
ASSIGN_CASE
|
The target location(s) for assigning the species. It should be one of the allowed cases. |
required |
ids |
str | int | list[str] | list[int]
|
The ID(s) of the target wells, rows, or columns. Defaults to None. |
None
|
contributes_to_signal |
bool
|
Indicates if the assigned species contributes to the signal. Defaults to None. |
None
|
silent |
bool
|
If True, no output is printed. Defaults to False. |
False
|
Raises:
Type | Description |
---|---|
AttributeError
|
If the species does not exist in the list of molecules or proteins. |
AttributeError
|
If the 'to' argument is not a valid |
Returns:
Type | Description |
---|---|
None |
assign_init_conditions_from_spreadsheet(conc_unit, path, header=0, index=0, silent=False)
Assign initial concentrations from an Excel spreadsheet to the wells on the plate.
Note
This function goes through the sheets in an excel spreadsheet. If the sheet name matches the id of a protein or molecule defined for the plate, the initial concentration form the plate map in the excel spreadsheet is assigned to the respective well.
The excel spreadsheet must have the following structure:
- The first row must contain the column numbers from 1 to 12.
- The first column must contain the row letters from A to H.
- If a cell is left empty for a species, the species is not assigned to the well.
- If the initial concentration is
0
, the species is added to the well. This is useful for specifying a product which is not present in the initial reaction mixture, but is formed during the reaction.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conc_unit |
UnitDefinition
|
The unit of concentration. |
required |
path |
str
|
Path to the Excel spreadsheet. |
required |
header |
int
|
Row to use as the column names. Defaults to 0. |
0
|
index |
int
|
Column to use as the row labels. Defaults to 0. |
0
|
silent |
bool
|
If True, no output is printed. Defaults to False. |
False
|
blank_species(species, wavelength=None, silent=False)
Blank the signal contribution of a species at a given wavelength. Therefore, control wells of that species must be present on the plate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
species |
Molecule | Protein
|
The species to blank. |
required |
wavelength |
float
|
The wavelength at which to blank the species. |
None
|
silent |
bool
|
If True, no output is printed. Defaults to False. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
If no wells are found to calculate the absorption contribution of the species. |
create_assignment_spreadsheet(path='assignment.xlsx', overwrite=False)
Create an Excel spreadsheet for assigning initial concentrations. The spreadsheet contains a separate sheet for each species defined on the plate, with validation to allow only numerical values in the input cells and prevent changes to all other cells.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to save the assignment spreadsheet. Defaults to "assignment.xlsx". |
'assignment.xlsx'
|
overwrite |
bool
|
If True, the file is overwritten if it already exists. Defaults to False. |
False
|
define_molecule(id, pubchem_cid, name=None, constant=False)
Defines a molecule which can be used to assign to wells on the plate.
If no name is provided, the molecule name is retrieved from the PubChem database.
If the molecule is not known in the PubChem database, please specify pubchem_cid=-1
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
Internal identifier of the molecule such as |
required |
pubchem_cid |
int
|
PubChem CID of the molecule. |
required |
name |
str | None
|
Name of the molecule. Defaults to None. |
None
|
constant |
bool
|
Indicates whether the molecule concentration is constant throughout the experiment. Defaults to False. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
If the PubChem CID is not an integer. |
ValueError
|
If the name is not provided and the PubChem CID is not available. |
Returns:
Name | Type | Description |
---|---|---|
Molecule |
Molecule
|
Molecule object. |
define_protein(id, name, uniprot_id=None, sequence=None, constant=True)
Defines a protein which can be used to assign to wells on the plate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
Internal identifier of the protein such as |
required |
name |
str
|
Name of the protein. |
required |
uniprot_id |
str | None
|
UniProt ID of the protein. Defaults to None. |
None
|
sequence |
str | None
|
Amino acid sequence of the protein. Defaults to None. |
None
|
constant |
bool
|
Indicates whether the protein concentration is constant throughout the experiment. Defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
Protein |
Protein
|
Protein object. |
get_calibrator(molecule, cutoff=None, wavelength=None)
Initialize a CaliPytion Calibrator
for a molecule on the plate.
The calibrator allows eighter to proceed with predefined suitable calibration models or
to define and fit custom models. For more information on the CaliPytion, please refer to the
(documentation)[https://fairchemistry.github.io/CaliPytion/usage/]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
molecule |
Molecule
|
The molecule for which to initialize the calibrator. |
required |
cutoff |
float | None
|
The cutoff value for the calibration. Absorption values above the cutoff are not considered for the calibration. Defaults to None. |
None
|
wavelength |
float | None
|
The wavelength at which to initialize the calibrator. If only one wavelength was measured, the wavelength is automatically set. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
Calibrator |
Calibrator
|
Calibrator object. |
get_species(id)
Get a species from the list of molecules and proteins by its id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
The id of the species. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the species with the given id is not found. |
Returns:
Type | Description |
---|---|
Protein | Molecule
|
Protein | Molecule: The species object. |
get_well(id)
Get a well from the plate by its id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id |
str
|
The id of the well. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the well with the given id is not found. |
Returns:
Name | Type | Description |
---|---|---|
Well |
Well
|
The well object. |
read_biotek(path, ph=None, name=None)
classmethod
Read a *.xlsx
file exported from a BioTek Epoch 2 software and create a PlateManager object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to the BioTek Epoch 2 file. |
required |
ph |
float | None
|
The pH value of the measurements. Defaults to None. |
None
|
name |
str | None
|
Name of the plate. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
PlateManager |
PlateManager
|
PlateManager object. |
read_multiskan_sky(path, ph=None, name=None)
classmethod
Read a *.xlsx
file exported from a Multiskan Sky and create a PlateManager object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to the Multiskan Sky file. |
required |
ph |
float | None
|
The pH value of the measurements. Defaults to None. |
None
|
name |
str | None
|
Name of the plate. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
PlateManager |
PlateManager
|
The PlateManager object. |
read_multiskan_spectrum_1500(path, time, time_unit, temperature, temperature_unit=C, ph=None, name=None)
classmethod
Read a *.txt
file exported from a Multiskan Spectrum 1500 and create a PlateManager object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Name of the plate. |
None
|
path |
str
|
Path to the Multiskan Spectrum 1500 file. |
required |
time |
list[float]
|
List of time points. |
required |
time_unit |
UnitDefinition
|
Unit of time. |
required |
temperature |
float
|
Temperature of the measurements. |
required |
temperature_unit |
UnitDefinition
|
Unit of temperature. Defaults to C. |
C
|
ph |
float | None
|
The pH value of the measurements. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
_type_ |
PlateManager
|
description |
read_new_device(path, temperature, ph=None, name=None, temperature_unit=C)
classmethod
Read a *.xlsx
file exported from a new device and create a PlateManager object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to the file. |
required |
temperature |
float
|
The temperature of the measurements. |
required |
ph |
float | None
|
The pH value of the measurements. Defaults to None. |
None
|
name |
str | None
|
Name of the plate. Defaults to None. |
None
|
temperature_unit |
UnitDefinition
|
Unit of temperature. Defaults to C. |
C
|
Returns:
Name | Type | Description |
---|---|---|
PlateManager |
PlateManager
|
PlateManager object. |
read_spectra_max_190(path, ph=None, name=None)
classmethod
Read a *.txt
file exported from a SpectraMax 190 software and create a PlateManager object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to the SpectraMax 190 file. |
required |
ph |
float | None
|
The pH value of the measurements. Defaults to None. |
None
|
name |
str | None
|
Name of the plate. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
PlateManager |
PlateManager
|
PlateManager object. |
read_tecan_spark(path, ph=None, name=None)
classmethod
Read a *.xlsx
TECAN Spark file and create a PlateManager object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to the TECAN Spark file. |
required |
ph |
float | None
|
The pH value of the measurements. Defaults to None. |
None
|
name |
str | None
|
Name of the plate. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
PlateManager |
PlateManager
|
PlateManager object. |
read_tekan_magellan(path, wavelength, ph=None, name=None)
classmethod
Read a *.xlsx
file exported from a TECAN Magellan software and create a PlateManager object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to the Magellan file. |
required |
wavelength |
float
|
The wavelength of the measurements. |
required |
ph |
Optional[float]
|
The pH value of the measurements. Defaults to None. |
None
|
name |
Optional[str]
|
Name of the plate. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
PlateManager |
PlateManager
|
PlateManager object. |
set_absorption_contribution(species, contributes_to_signal, wavelength=None, silent=False)
Set the contribution of a species to the signal in all wells.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
species |
Molecule | Protein
|
The species for which to set the contribution to the signal. |
required |
contributes_to_signal |
bool
|
If True, the species contributes to the signal. If False, the species does not contribute to the signal. |
required |
wavelength |
float | None
|
The wavelength at which to set the contribution to the signal. Defaults to None. |
None
|
silent |
bool
|
If True, no output is printed. Defaults to False. |
False
|
slice_data(start, end)
Slices the time and absorption data of all wells in the plate that only contains the data between the start and end time.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start |
float
|
Start time of the slice. |
required |
end |
float
|
End time of the slice. |
required |
to_enzymeml(detected_molecule, well_ids=None, catalyzed_only=True, name=None, to_concentration=False, extrapolate=False, wavelength=None, silent=False)
Convert the plate to an EnzymeML document.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str | None
|
Name of the EnzymeML document. Defaults to the name of the plate. |
None
|
detected_molecule |
Molecule
|
The molecule that was detected in the wells. |
required |
well_ids |
list[str] | None
|
List of well ids to include in the EnzymeML document. If not provided, all wells are included. Defaults to None. |
None
|
to_concentration |
bool
|
If True, the signal is converted to concentration. Therefore, a calibrator must be defined for the respective molecule. Defaults to False. |
False
|
extrapolate |
bool
|
If True, and |
False
|
catalyzed_only |
bool
|
If True, only wells that contain the detected molecule and a protein are included in the EnzymeML document. Defaults to True. |
True
|
wavelength |
float | None
|
If multiple wavelengths were measured, the wavelength for which to convert the signal to concentration needs to be specified. Defaults to None. |
None
|
silent |
bool
|
If True, no output is printed. Defaults to False. |
False
|
Returns:
Name | Type | Description |
---|---|---|
EnzymeMLDocument |
EnzymeMLDocument
|
|
visualize(zoom=False, wavelengths=[], darkmode=False)
Visualize the plate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zoom |
bool
|
If False, the scaling of the signal (y-axis) is the same for all wells. If True, the scaling is adjusted for each well. Defaults to False. |
False
|
wavelengths |
list[float]
|
Only visualize the signal at the specified wavelengths. If not specified, all wavelengths are visualized. Defaults to []. |
[]
|
darkmode |
bool
|
If True, the plot is displayed in dark mode. Defaults to False. |
False
|