How to use autoprotocol - 10 common examples

To help you get started, we’ve selected a few autoprotocol examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github autoprotocol / autoprotocol-python / autoprotocol / container.py View on Github external
WellGroup
            WellGroup of all Wells in Container

        """
        if columnwise:
            num_cols = self.container_type.col_count
            num_rows = self.container_type.well_count // num_cols
            return WellGroup(
                [
                    self._wells[row * num_cols + col]
                    for col in range(num_cols)
                    for row in range(num_rows)
                ]
            )
        else:
            return WellGroup(self._wells)
github autoprotocol / autoprotocol-python / autoprotocol / container.py View on Github external
Parameters
        ----------
        columnwise : bool, optional
            returns the WellGroup columnwise instead of rowwise (ordered by
            well index).

        Returns
        -------
        WellGroup
            WellGroup of all Wells in Container

        """
        if columnwise:
            num_cols = self.container_type.col_count
            num_rows = self.container_type.well_count // num_cols
            return WellGroup(
                [
                    self._wells[row * num_cols + col]
                    for col in range(num_cols)
                    for row in range(num_rows)
                ]
            )
        else:
            return WellGroup(self._wells)
github autoprotocol / autoprotocol-python / autoprotocol / instruction.py View on Github external
def __init__(
        self, object, acceleration, duration, flow_direction=None, spin_direction=None
    ):
        spin_json = {
            "object": object,
            "acceleration": acceleration,
            "duration": duration,
            "flow_direction": flow_direction,
            "spin_direction": spin_direction,
        }

        super(Spin, self).__init__(op="spin", data=spin_json)


class Thermocycle(Instruction):

    """
    Append a Thermocycle instruction to the list of instructions, with
    groups being a list of dicts in the form of:

    .. code-block:: python

        "groups": [{
            "cycles": integer,
            "steps": [{
              "duration": duration,
              "temperature": temperature,
              "read": boolean // optional (default true)
            },{
              "duration": duration,
              "gradient": {
github autoprotocol / autoprotocol-python / autoprotocol / container_type.py View on Github external
def robotize_static(well_ref, well_count, col_count):
        if isinstance(well_ref, list):
            return [
                ContainerType.robotize_static(well, well_count, col_count)
                for well in well_ref
            ]

        if not isinstance(well_ref, (str, int, Well)):
            raise TypeError(
                f"ContainerType.robotize(): Well reference "
                f"({well_ref}) given is not of type 'str', 'int', "
                f"or 'Well'."
            )

        if isinstance(well_ref, Well):
            well_ref = well_ref.index
        well_ref = str(well_ref)
        m = re.match(r"([a-z])([a-z]?)(\d+)$", well_ref, re.I)
        if m:
            row = ord(m.group(1).upper()) - ord("A")
            if m.group(2):
                row = 26 * (row + 1) + ord(m.group(2).upper()) - ord("A")
            col = int(m.group(3)) - 1
            row_count = well_count // col_count
            return ContainerType.well_from_coordinates_static(
                row, row_count, col, col_count
            )
        else:
            m = re.match(r"\d+$", well_ref)
            if m:
                well_num = int(m.group(0))
github autoprotocol / autoprotocol-python / autoprotocol / container_type.py View on Github external
def robotize_static(well_ref, well_count, col_count):
        if isinstance(well_ref, list):
            return [
                ContainerType.robotize_static(well, well_count, col_count)
                for well in well_ref
            ]

        if not isinstance(well_ref, (str, int, Well)):
            raise TypeError(
                f"ContainerType.robotize(): Well reference "
                f"({well_ref}) given is not of type 'str', 'int', "
                f"or 'Well'."
            )

        if isinstance(well_ref, Well):
            well_ref = well_ref.index
        well_ref = str(well_ref)
        m = re.match(r"([a-z])([a-z]?)(\d+)$", well_ref, re.I)
        if m:
            row = ord(m.group(1).upper()) - ord("A")
            if m.group(2):
                row = 26 * (row + 1) + ord(m.group(2).upper()) - ord("A")
            col = int(m.group(3)) - 1
            row_count = well_count // col_count
github autoprotocol / autoprotocol-python / autoprotocol / container_type.py View on Github external
capabilities=["liquid_handle", "incubate", "cover", "dispense", "liquid_handle"],
    shortname="res-mw12-hp",
    col_count=12,
    dead_volume_ul=Unit(1.8, "milliliter"),
    safe_min_volume_ul=Unit(5, "milliliter"),
    true_max_vol_ul=Unit(21.0, "milliliter"),
    vendor="Axygen",
    cat_no="res-mw12-hp",
)

#:
FLAT96CLEARTC = ContainerType(
    name="96-well flat-bottom TC treated plate",
    well_count=96,
    well_depth_mm=None,
    well_volume_ul=Unit(340.0, "microliter"),
    well_coating=None,
    sterile=False,
    is_tube=False,
    cover_types=["low_evaporation", "standard", "universal"],
    seal_types=None,
    capabilities=[
        "liquid_handle",
        "spin",
        "absorbance",
        "fluorescence",
        "luminescence",
        "incubate",
        "gel_separate",
        "gel_purify",
        "cover",
        "dispense",
github autoprotocol / autoprotocol-python / autoprotocol / container_type.py View on Github external
"liquid_handle",
        "incubate",
        "gel_separate",
        "mag_dry",
        "mag_incubate",
        "mag_collect",
        "mag_release",
        "mag_mix",
        "cover",
        "dispense",
    ],
    shortname="96-deep-kf",
    is_tube=False,
    col_count=12,
    dead_volume_ul=Unit(50, "microliter"),
    safe_min_volume_ul=Unit(50, "microliter"),
    vendor="Fisher",
    cat_no="22-387-031",
)

#:
V96CC = ContainerType(
    name="96-well cell culture multiple well plate, V bottom",
    well_count=96,
    well_depth_mm=10.668,
    well_volume_ul=Unit(200.0, "microliter"),
    well_coating=None,
    sterile=True,
    is_tube=False,
    cover_types=["standard", "universal", "low_evaporation", "ultra-clear", "foil"],
    seal_types=None,
    capabilities=[
github autoprotocol / autoprotocol-python / autoprotocol / container_type.py View on Github external
RESSW96HP = ContainerType(
    name="96-well singlewell highprofile reservoir",
    well_count=1,
    well_depth_mm=None,
    well_volume_ul=Unit(170.0, "milliliter"),
    well_coating=None,
    sterile=False,
    is_tube=False,
    cover_types=["universal"],
    seal_types=None,
    capabilities=["liquid_handle", "incubate", "cover", "dispense", "liquid_handle"],
    shortname="res-sw96-hp",
    col_count=1,
    dead_volume_ul=Unit(25, "milliliter"),
    safe_min_volume_ul=Unit(30, "milliliter"),
    true_max_vol_ul=Unit(280.0, "milliliter"),
    vendor="Axygen",
    cat_no="res-sw96-hp",
)

#:
RESMW8HP = ContainerType(
    name="8-row multiwell highprofile reservoir",
    well_count=8,
    well_depth_mm=None,
    well_volume_ul=Unit(24.0, "milliliter"),
    well_coating=None,
    sterile=False,
    is_tube=False,
    cover_types=["universal"],
    seal_types=None,
    capabilities=["liquid_handle", "incubate", "cover", "dispense", "liquid_handle"],
github autoprotocol / autoprotocol-python / autoprotocol / protocols / golden_braid.py View on Github external
"fragment_vol": "3:microliter",
            "water_vol": "2:microliter",
            "ligation_time": "10:minute",
            "deactivation_time": "5:minute",
            "deactivation_temp": "65:celsius",
        }
    }
    '''

    params = make_dottable_dict(params)
    refs = make_dottable_dict(params.refs)

    MM_vol = Unit.fromstring(params.backbone_vol) + Unit.fromstring(params.enzyme_vol) + Unit.fromstring(params.buffer_vol) + Unit.fromstring(params.ligase_vol) + Unit.fromstring(params.fragment_vol) + Unit.fromstring(params.water_vol)
    # make master mix
    protocol.transfer(params.backbone, params.MM_loc, Unit.fromstring(params.backbone_vol) * Unit((params.reaction_number + 2),"microliter"))
    protocol.transfer(params.T4_ligase, params.MM_loc, Unit.fromstring(params.ligase_vol) * Unit((params.reaction_number + 2),"microliter"))
    protocol.transfer(params.enzyme, params.MM_loc, Unit.fromstring(params.enzyme_vol) * Unit((params.reaction_number + 2),"microliter"))
    protocol.transfer(params.buffer, params.MM_loc, Unit.fromstring(params.buffer_vol) * Unit((params.reaction_number + 2),"microliter"))

    # distribute master mix
    protocol.distribute(params.MM_loc,
        refs.destination_plate.wells_from(params.reaction_start,
        params.reaction_number), MM_vol )

    protocol.seal("destination_plate")

    protocol.thermocycle("destination_plate", [
        {"cycles": 1, "steps": [
            {"temperature": "37:celsius", "duration": "2:minute"},
        ]},
        {"cycles": 1, "steps":[
            {"temperature": "16:celsius", "duration": "5:minute"},
github autoprotocol / autoprotocol-python / autoprotocol / container_type.py View on Github external
#:
RESSW384LP = ContainerType(
    name="384-well singlewell lowprofile reservoir",
    well_count=1,
    well_depth_mm=None,
    well_volume_ul=Unit(35, "milliliter"),
    well_coating=None,
    sterile=False,
    is_tube=False,
    cover_types=["universal"],
    seal_types=None,
    capabilities=["liquid_handle", "incubate", "cover", "dispense", "liquid_handle"],
    shortname="res-sw384-lp",
    col_count=1,
    dead_volume_ul=Unit(10, "milliliter"),
    safe_min_volume_ul=Unit(30, "milliliter"),
    true_max_vol_ul=Unit(92, "milliliter"),
    vendor="Axygen",
    cat_no="res-sw384-lp",
)

#:
ECHO384LDV = ContainerType(
    # Compatible with Labcyte Echo 520 and 55x only
    name="384-well Echo low dead volume plate",
    well_count=384,
    well_depth_mm=None,
    well_volume_ul=Unit(14.0, "microliter"),
    well_coating=None,
    sterile=None,
    is_tube=False,
    cover_types=["universal"],