MFX Carriers and Modules#

MFX Carriers are a user-configurable carrier system, created by Hamilton. The user can configure the carrier system by placing plate sites, tip racks, tilt modules and other items at specific l;locations by screwing them into pre-threaded holes in the carrier. Different carrier bases are available.

In this tutorial, we will show how to create a custom carrier system using the MFX Carriers in PyLabRobot. We will use the MFX_CAR_L5_base as the base base, and a deep well plate module (MFX_DWP_rackbased_module) and a tip module (MFX_TIP_module) as the modules.

%load_ext autoreload
%autoreload 2
from pylabrobot.resources import (
  MFX_CAR_L5_base,
  MFX_DWP_rackbased_module,
  MFX_TIP_module,
)

Start by creating variables for your mfx modules. Depending on the type of module, the class might be a pylabrobot.resources.resource_holder.ResourceHolder (for tip rack holders), a pylabrobot.resources.carrier.PlateHolder (for plate modules), or a Machine class.

Let’s create plate and a tip rack modules:

my_plate_module = MFX_DWP_rackbased_module(name="my_plate_module")
my_plate_module
PlateHolder(name=my_plate_module, location=None, size_x=135.0, size_y=94.0, size_z=59.80500000000001, category=plate_holder)
my_tip_rack_module = MFX_TIP_module(name="my_tip_rack_module")
my_tip_rack_module
ResourceHolder(name=my_tip_rack_module, location=None, size_x=135.0, size_y=94.0, size_z=96.60500000000002, category=resource_holder)

Using a dictionary, you can place your mfx modules in arbitrary locations:

carrier = MFX_CAR_L5_base(
  name="my_carrier",
  modules={
    0: my_plate_module,
    3: my_tip_rack_module,
  }
)
{0: PlateHolder(name=my_plate_module, location=(000.000, 005.000, 018.195), size_x=135.0, size_y=94.0, size_z=59.80500000000001, category=plate_holder), 3: ResourceHolder(name=my_tip_rack_module, location=(000.000, 293.000, 018.195), size_x=135.0, size_y=94.0, size_z=96.60500000000002, category=resource_holder)}

The children of an MFXCarrier are the sites you specified when creating the carrier.

carrier[0]
PlateHolder(name=carrier-my_carrier-spot-0, location=(000.000, 005.000, 018.195), size_x=135.0, size_y=94.0, size_z=59.80500000000001, category=plate_holder)
carrier[3]
ResourceHolder(name=carrier-my_carrier-spot-3, location=(000.000, 293.000, 018.195), size_x=135.0, size_y=94.0, size_z=96.60500000000002, category=resource_holder)

When a site is not defined, indexing into it will raise a KeyError.

try:
  carrier[1]
except KeyError as e:
  print(f"KeyError, as expected.")
KeyError, as expected.

To define in PLR that there is a plate on some module in the carrier, you can assign a plate to that module using the usual assign_child_resource method.

from pylabrobot.resources import Cos_96_wellplate_2mL_Vb
my_plate = Cos_96_wellplate_2mL_Vb(name="my_plate")
carrier[0].assign_child_resource(my_plate)
my_plate.parent
PlateHolder(name=carrier-my_carrier-spot-0, location=(000.000, 005.000, 018.195), size_x=135.0, size_y=94.0, size_z=59.80500000000001, category=plate_holder)

As with other carriers, you can also assign it directly to the site using the following syntax:

from pylabrobot.resources import HTF
my_tip_rack = HTF(name="my_tip_rack")
carrier[3] = my_tip_rack
my_tip_rack.parent
ResourceHolder(name=carrier-my_carrier-spot-3, location=(000.000, 293.000, 018.195), size_x=135.0, size_y=94.0, size_z=96.60500000000002, category=resource_holder)