science_jubilee.tools.Pipette
#
Module Contents#
Classes#
A class representation of an Opentrons OT2 pipette. |
|
A class to track the usage of pipette tips and their location in the tiprack |
Functions#
|
Decorator to check if the pipette has a tip attached before performing an action. |
Attributes#
- science_jubilee.tools.Pipette.logger#
- science_jubilee.tools.Pipette.tip_check(func)#
Decorator to check if the pipette has a tip attached before performing an action.
- class science_jubilee.tools.Pipette.Pipette(index, name, brand, model, max_volume, min_volume, zero_position, blowout_position, drop_tip_position, mm_to_ul)#
Bases:
science_jubilee.tools.Tool.Tool
A class representation of an Opentrons OT2 pipette.
- classmethod from_config(index, name, config_file: str, path: str = os.path.join(os.path.dirname(__file__), 'configs'))#
Initialize the pipette object from a config file
- Parameters:
index (int) – The tool index of the pipette on the machine
name (str) – The tool name
config_file (str) – The name of the config file containign the pipette parameters
path – The path to the labware configuration .json files for the labware, defaults to the ‘labware_definition/’ in the science_jubilee/labware directory.
- Returns:
A
Pipette
object- Return type:
- post_load()#
Prime the Pipette after loading it onto the Machine sot hat it is ready to use
- vol2move(vol)#
Converts desired volume in uL to a movement of the pipette motor axis
- Parameters:
vol (float) – The desired amount of liquid expressed in uL
- Returns:
The corresponding motor movement in mm
- Return type:
float
- prime(s=2500)#
Moves the plunger to the low-point on the pipette motor axis to prepare for further commands Note::This position should not engage the pipette tip plunger
- Parameters:
s (int) – The speed of the plunger movement in mm/min
- _aspirate(vol: float, s: int = 2000)#
Moves the plunger upwards to aspirate liquid into the pipette tip
- Parameters:
vol (float) – The volume of liquid to aspirate in uL
s (int) – The speed of the plunger movement in mm/min
- aspirate(vol: float, location: science_jubilee.labware.Labware.Well | Tuple | science_jubilee.labware.Labware.Location, s: int = 2000)#
Moves the pipette to the specified location and aspirates the desired volume of liquid
- Parameters:
- Raises:
ToolStateError – If the pipette does not have a tip attached
- _dispense(vol: float, s: int = 2000)#
Moves the plunger downwards to dispense liquid out of the pipette tip
- Parameters:
vol (float) – The volume of liquid to dispense in uL
s (int) – The speed of the plunger movement in mm/min
Note:: Ideally the user does not call this functions directly, but instead uses the :method:`dispense` method
- dispense(vol: float, location: science_jubilee.labware.Labware.Well | Tuple | science_jubilee.labware.Labware.Location, s: int = 2000)#
Moves the pipette to the specified location and dispenses the desired volume of liquid
- Parameters:
- Raises:
ToolStateError – If the pipette does not have a tip attached
- transfer(vol: float | list[float], source_well: science_jubilee.labware.Labware.Well | Tuple | science_jubilee.labware.Labware.Location, destination_well: science_jubilee.labware.Labware.Well | Tuple | science_jubilee.labware.Labware.Location, s: int = 3000, blowout=None, mix_before: tuple = None, mix_after: tuple = None, air_gap: float = 0, new_tip: str = 'always')#
Transfers the desired volume of liquid from the source well to the destination well
This is a combination of the :method:`aspirate` and :method:`dispense` steps.
- Parameters:
vol (float) – The volume of liquid to transfer in uL
source_well (Union[Well, Tuple, Location]) – The location from where to aspirate the liquid from.
destination_well (Union[Well, Tuple, Location]) – The location to dispense the liquid into.
s (int, optional) – The speed of the plunger movement in mm/min, defaults to 3000
blowout (Union[Well, Tuple, Location], optional) – The location to blowout any remainign liquid in the pipette tip
mix_before (tuple, optional) – The number of times to mix before dispensing and the volume to mix
mix_after (tuple, optional) – The number of times to mix after dispensing and the volume to mix
new_tip (str, optional) – Whether or not to use a new tip for the transfer. Can be ‘always’, ‘never’, or ‘once’
air_gap (float, optional) – The volume of air to aspirate after aspirating the liquid, defaults to None
Note:: :param new_tip: still not implemented at the moment (2023-11-16)
- _create_volume_list(volume, total_xfers)#
Creates a list of volumes to transfer
- Parameters:
volume (Union[float, list[float]]) – The volume of liquid to transfer
total_xfers (int) – The total number of transfer steps to perform
- Returns:
A list of volumes to transfer
Note: This function was taken from the Opentrons API and modified to work with the Pipette class of Science_Jubilee
- static _extend_source_target_lists(sources: List[science_jubilee.labware.Labware.Well | science_jubilee.labware.Labware.Location], targets: List[science_jubilee.labware.Labware.Well | science_jubilee.labware.Labware.Location])#
Extend source or target list to match the length of the other
- Parameters:
- Returns:
The extended source and target lists
- Return type:
Tuple[List[Union[Well, Location]], List[Union[Well, Location]]]
Note: This function was taken from the Opentrons API and modified to work with the Pipette class of Science_Jubilee
- static _expand_for_volume_contraints(volumes: Iterator[float], targets: Iterator, max_volume: float)#
Expands the volumes and targets to ensure that the volume does not exceed the maximum volume of the pipette
- Parameters:
volumes (Iterator[float]) – An iterator of the volumes to transfer
targets (Iterator) – An iterator of the targets to transfer the volumes to
max_volume (float) – The maximum volume of the pipette in uL
- Returns:
An iterator of the volumes and targets to transfer
- Return type:
Iterator
Note: This function was taken from the Opentrons API and modified to work with the Pipette class of Science_Jubilee
- blowout(s: int = 6000)#
Blows out any remaining liquid in the pipette tip
- Parameters:
s (int, optional) – The speed of the plunger movement in mm/min, defaults to 3000
- air_gap(vol)#
Moves the plunger upwards to aspirate air into the pipette tip
- Parameters:
vol (float) – The volume of air to aspirate in uL
- mix(vol: float, n: int, s: int = 5500)#
Mixes liquid by alternating aspirate and dispense steps for the specified number of times
- Parameters:
vol (float) – The volume of liquid to mix in uL
n (int) – The number of times to mix
s (int, optional) – The speed of the plunger movement in mm/min, defaults to 5000
- stir(n_times: int = 1, height: float = None)#
Stirs the liquid in the current well by moving the pipette tip in a circular motion
- Parameters:
n_times (int, optional) – The number of times to stir the liquid, defaults to 1
height (float, optional) – The z-coordinate to move the tip to during the stir step, defaults to None
- Raises:
ToolStateError – If the pipette does not have a tip attached before stirring or if the pipette is not in a well
- update_z_offset(tip: bool = None)#
Shift the z-offset of the tool to account for the tip length
- Parameters:
tip (bool, optional) – Parameter to indicated whether to add or remove the tip offset, defaults to None
- add_tiprack(tiprack: science_jubilee.labware.Labware.Labware | list)#
Associate a tiprack with the pipette tool
- Parameters:
tiprack (Union[Labware, list]) – The tiprack to associate with the pipette
- _pickup_tip(z)#
Moves the Jubilee Z-axis upwards to pick up a pipette tip and stops once the tip sensor is triggered
- Parameters:
z (float) – The z-coordinate to move the pipette to
- Raises:
ToolStateError – If the pipette already has a tip attached
- pickup_tip(tip_: science_jubilee.labware.Labware.Well | Tuple = None)#
Moves the pipette to the specified location and picks up a tip
This function can either take a specific tip or if not specified, will pick up the next available tip in the tiprack associated with the pipette.
- Parameters:
tip (Union[Well, Tuple], optional) – The location of the pipette tip to pick up, defaults to None
- return_tip(location: science_jubilee.labware.Labware.Well = None)#
Returns the pipette tip to the either the specified location or to where the tip was picked up from
- Parameters:
location (
Well
, optional) – The location to return the tip to, defaults to None (i.e. return to where the tip was picked up from)
- _drop_tip()#
Moves the plunger to eject the pipette tip
- Raises:
ToolConfigurationError – If the pipette does not have a tip attached
- drop_tip(location: science_jubilee.labware.Labware.Well | Tuple = None)#
Moves the pipette to the specified location and drops the pipette tip
- Parameters:
location (Union[
Well
, tuple]) – The location to drop the tip into
- class science_jubilee.tools.Pipette.TipTracker(tips, start_well=None)#
A class to track the usage of pipette tips and their location in the tiprack
- Parameters:
tips (list[
Well
]) – The list of tips in the tiprackstart_well (
Well
, optional) – The starting well to begin tracking the tips from, defaults to None
Note: This function was taken from the Opentrons API and modified to work with the Pipette class of Science_Jubilee
- next_tip(start_well=None)#
- use_tip(tip_well)#
- previous_tip()#
- return_tip(well=None)#
- assign_tip_to_stock(tip_well, stock_well)#