autoprotocol.protocol

protocol.Protocol

class autoprotocol.protocol.Protocol(refs=None, instructions=None)

A Protocol is a sequence of instructions to be executed, and a set of containers on which those instructions act.

Initially, a Protocol has an empty sequence of instructions and no referenced containers. To add a reference to a container, use the ref() method, which returns a Container.

p = Protocol()
my_plate = p.ref("my_plate", id="ct1xae8jabbe6",
                        cont_type="96-pcr", storage="cold_4")

To add instructions to the protocol, use the helper methods in this class

p.transfer(source=my_plate.well("A1"),
           dest=my_plate.well("B4"),
           volume="50:microliter")
p.thermocycle(my_plate, groups=[
              { "cycles": 1,
                "steps": [
                  { "temperature": "95:celsius",
                    "duration": "1:hour"
                  }]
              }])

Autoprotocol Output:

{
  "refs": {
    "my_plate": {
      "id": "ct1xae8jabbe6",
      "store": {
        "where": "cold_4"
      }
    }
  },
  "instructions": [
    {
      "groups": [
        {
          "transfer": [
            {
              "volume": "50.0:microliter",
              "to": "my_plate/15",
              "from": "my_plate/0"
            }
          ]
        }
      ],
      "op": "pipette"
    },
    {
      "volume": "10:microliter",
      "dataref": null,
      "object": "my_plate",
      "groups": [
        {
          "cycles": 1,
          "steps": [
            {
              "duration": "1:hour",
              "temperature": "95:celsius"
            }
          ]
        }
      ],
      "op": "thermocycle"
    }
  ]
}

Protocol.container_type()

Protocol.container_type(shortname)

Convert a ContainerType shortname into a ContainerType object.

Parameters:shortname (str) – String representing one of the ContainerTypes in the _CONTAINER_TYPES dictionary.
Returns:Returns a Container type object corresponding to the shortname passed to the function. If a ContainerType object is passed, that same ContainerType is returned.
Return type:ContainerType
Raises:ValueError – If an unknown ContainerType shortname is passed as a parameter.

Protocol.ref()

Protocol.ref(name, id=None, cont_type=None, storage=None, discard=None, cover=None)

Add a Ref object to the dictionary of Refs associated with this protocol and return a Container with the id, container type and storage or discard conditions specified.

Example Usage:

p = Protocol()

# ref a new container (no id specified)
sample_ref_1 = p.ref("sample_plate_1",
                     cont_type="96-pcr",
                     discard=True)

# ref an existing container with a known id
sample_ref_2 = p.ref("sample_plate_2",
                     id="ct1cxae33lkj",
                     cont_type="96-pcr",
                     storage="ambient")

Autoprotocol Output:

{
  "refs": {
    "sample_plate_1": {
      "new": "96-pcr",
      "discard": true
    },
    "sample_plate_2": {
      "id": "ct1cxae33lkj",
      "store": {
        "where": "ambient"
      }
    }
  },
  "instructions": []
}
Parameters:
  • name (str) – name of the container/ref being created.
  • id (str) – id of the container being created, from your organization’s inventory on http://secure.transcriptic.com. Strings representing ids begin with “ct”.
  • cont_type (str, ContainerType) – container type of the Container object that will be generated.
  • storage ({“ambient”, “cold_20”, “cold_4”, “warm_37”}, optional) – temperature the container being referenced should be stored at after a run is completed. Either a storage condition must be specified or discard must be set to True.
  • discard (bool, optional) – if no storage condition is specified and discard is set to True, the container being referenced will be discarded after a run.
Returns:

container

Container object generated from the id and container type

provided.

Return type:

Container

Raises:
  • RuntimeError – If a container previously referenced in this protocol (existant in refs section) has the same name as the one specified.
  • RuntimeError – If no container type is specified.
  • RuntimeError – If no valid storage or discard condition is specified.

Protocol.append()

Protocol.append(instructions)

Append instruction(s) to the list of Instruction objects associated with this protocol. The other functions on Protocol() should be used in lieu of doing this directly.

Example Usage:

p = Protocol()
p.append(Incubate("sample_plate", "ambient", "1:hour"))

Autoprotocol Output:

"instructions": [
    {
      "duration": "1:hour",
      "where": "ambient",
      "object": "sample_plate",
      "shaking": false,
      "op": "incubate"
    }
]
Parameters:instructions (Instruction) – Instruction object to be appended.

Protocol.as_dict()

Protocol.as_dict()

Return the entire protocol as a dictionary.

Example Usage:

from autoprotocol.protocol import Protocol
import json

p = Protocol()
sample_ref_2 = p.ref("sample_plate_2",
                      id="ct1cxae33lkj",
                      cont_type="96-pcr",
                      storage="ambient")
p.seal(sample_ref_2)
p.incubate(sample_ref_2, "warm_37", "20:minute")

print json.dumps(p.as_dict(), indent=2)

Autoprotocol Output:

{
  "refs": {
    "sample_plate_2": {
      "id": "ct1cxae33lkj",
      "store": {
        "where": "ambient"
      }
    }
  },
  "instructions": [
    {
      "object": "sample_plate_2",
      "op": "seal"
    },
    {
      "duration": "20:minute",
      "where": "warm_37",
      "object": "sample_plate_2",
      "shaking": false,
      "op": "incubate"
    }
  ]
}
Returns:dict with keys “refs” and “instructions” and optionally “time_constraints” and “outs”, each of which contain the “refified” contents of their corresponding Protocol attribute.
Return type:dict

Protocol.get_instruction_index()

Protocol.get_instruction_index()

Get index of the last appended instruction

Example Usage:

p = Protocol()
plate_1 = p.ref("plate_1", id=None, cont_type="96-flat",
                discard=True)

p.cover(plate_1)
time_point_1 = p.get_instruction_index()  # time_point_1 = 0
Raises:ValueError – If an instruction index is less than 0
Returns:Index of the preceding instruction
Return type:int

Protocol.add_time_constraint()

Protocol.add_time_constraint(from_dict, to_dict, less_than=None, more_than=None, mirror=False)

Constraint the time between two instructions

Add time constraints from from_dict to to_dict. Time constraints guarantee that the time from the from_dict to the to_dict is less than or greater than some specified duration. Care should be taken when applying time constraints as constraints may make some protocols impossible to schedule or run.

Though autoprotocol orders instructions in a list, instructions do not need to be run in the order they are listed and instead depend on the preceding dependencies. Time constraints should be added with such limitations in mind.

Constraints are directional; use mirror=True if the time constraint should be added in both directions. Note that mirroring is only applied to the less_than constraint, as the more_than constraint implies both a minimum delay betweeen two timing points and also an explicit ordering between the two timing points.

Example Usage:

plate_1 = protocol.ref("plate_1", id=None, cont_type="96-flat",
                       discard=True)
plate_2 = protocol.ref("plate_2", id=None, cont_type="96-flat",
                       discard=True)

protocol.cover(plate_1)
time_point_1 = protocol.get_instruction_index()

protocol.cover(plate_2)
time_point_2 = protocol.get_instruction_index()

protocol.add_time_constraint(
    {"mark": plate_1, "state": "start"},
    {"mark": time_point_1, "state": "end"},
    less_than = "1:minute")
protocol.add_time_constraint(
    {"mark": time_point_2, "state": "start"},
    {"mark": time_point_1, "state": "start"},
    less_than = "1:minute", True)

Autoprotocol Output:

{
    "refs": {
        "plate_1": {
            "new": "96-flat",
            "discard": true
        },
        "plate_2": {
            "new": "96-flat",
            "discard": true
        }
    },
    "time_constraints": [
        {
            "to": {
                "instruction_end": 0
            },
            "less_than": "1.0:minute",
            "from": {
                "ref_start": "plate_1"
            }
        },
        {
            "to": {
                "instruction_start": 0
            },
            "less_than": "1.0:minute",
            "from": {
                "instruction_start": 1
            }
        },
        {
            "to": {
                "instruction_start": 1
            },
            "less_than": "1.0:minute",
            "from": {
                "instruction_start": 0
            }
        }
    ],
    "instructions": [
        {
            "lid": "standard",
            "object": "plate_1",
            "op": "cover"
        },
        {
            "lid": "standard",
            "object": "plate_2",
            "op": "cover"
        }
    ]
}
Parameters:
  • from_dict (dict) –

    Dictionary defining the initial time constraint condition. Composed of keys: “mark” and “state”

    mark: int or Container
    instruction index of container
    state: “start” or “end”
    specifies either the start or end of the “mark” point
  • to_dict (dict) – Dictionary defining the end time constraint condition. Specified in the same format as from_dict
  • less_than (str, Unit) – max time between from_dict and to_dict
  • more_than (str, Unit) – min time between from_dict and to_dict
  • mirror (bool, optional) – choice to mirror the from and to positions when time constraints should be added in both directions (only applies to the less_than constraint)
Raises:
  • ValueError – If an instruction mark is less than 0
  • TypeError – If mark is not container or integer
  • TypeError – If state not in [‘start’, ‘end’]
  • KeyError – If to_dict or from_dict does not contain ‘mark’
  • KeyError – If to_dict or from_dict does not contain ‘state’
  • ValueError – If time is less than ‘0:second’
  • RuntimeError – If from_dict and to_dict are equal
  • RuntimeError – If more_than is greater than less_than
  • RuntimeError – If from_dict[“marker”] and to_dict[“marker”] are equal and from_dict[“state”] = “end”

Protocol.distribute()

Protocol.distribute(source, dest, volume, allow_carryover=False, mix_before=False, mix_vol=None, repetitions=10, flowrate='100:microliter/second', aspirate_speed=None, aspirate_source=None, dispense_speed=None, distribute_target=None, pre_buffer=None, disposal_vol=None, transit_vol=None, blowout_buffer=None, tip_type=None, new_group=False)

Distribute liquid from source well(s) to destination wells(s).

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")
sample_source = p.ref("sample_source",
                      "ct32kj234l21g",
                      "micro-1.5",
                      storage="cold_20")

p.distribute(sample_source.well(0),
             sample_plate.wells_from(0,8,columnwise=True),
             "200:microliter",
             mix_before=True,
             mix_vol="500:microliter",
             repetitions=20)

Autoprotocol Output:

"instructions": [
  {
    "groups": [
      {
        "distribute": {
          "to": [
            {
              "volume": "150.0:microliter",
              "well": "sample_plate/0"
            },
            {
              "volume": "150.0:microliter",
              "well": "sample_plate/12"
            },
            {
              "volume": "150.0:microliter",
              "well": "sample_plate/24"
            },
            {
              "volume": "150.0:microliter",
              "well": "sample_plate/36"
            },
            {
              "volume": "150.0:microliter",
              "well": "sample_plate/48"
            },
            {
              "volume": "150.0:microliter",
              "well": "sample_plate/60"
            },
            {
              "volume": "150.0:microliter",
              "well": "sample_plate/72"
            },
            {
              "volume": "150.0:microliter",
              "well": "sample_plate/84"
            }
          ],
          "from": "sample_source/0",
          "mix_before": {
            "volume": "500:microliter",
            "repetitions": 20,
            "speed": "100:microliter/second"
          }
        }
      }
    ],
    "op": "pipette"
  }
]
Parameters:
  • source (Well, WellGroup) – Well or wells to distribute liquid from. If passed as a WellGroup with set_volume() called on it, liquid will be automatically be drawn from the wells specified using the fill_wells function.
  • dest (Well, WellGroup) – Well or wells to distribute liquid to.
  • volume (str, Unit, list) – Volume of liquid to be distributed to each destination well. If a single string or unit is passed to represent the volume, that volume will be distributed to each destination well. If a list of volumes is provided, that volume will be distributed to the corresponding well in the WellGroup provided. The length of the volumes list must therefore match the number of wells in the destination WellGroup if destination wells are recieving different volumes.
  • allow_carryover (bool, optional) – specify whether the same pipette tip can be used to aspirate more liquid from source wells after the previous volume aspirated has been depleted.
  • mix_before (bool, optional) – Specify whether to mix the liquid in the destination well before liquid is transferred.
  • mix_vol (str, Unit, optional) – Volume to aspirate and dispense in order to mix liquid in a wells before liquid is distributed.
  • repetitions (int, optional) – Number of times to aspirate and dispense in order to mix liquid in a well before liquid is distributed.
  • flowrate (str, Unit, optional) – Speed at which to mix liquid in well before liquid is distributed.
  • aspirate_speed (str, Unit, optional) – Speed at which to aspirate liquid from source well. May not be specified if aspirate_source is also specified. By default this is the maximum aspiration speed, with the start speed being half of the speed specified.
  • aspirate_source (fn, optional) – Can’t be specified if aspirate_speed is also specified.
  • dispense_speed (str, Unit, optional) – Speed at which to dispense liquid into the destination well. May not be specified if dispense_target is also specified.
  • distribute_target (fn, optional) – A function that contains additional parameters for distributing to target wells including depth, dispense_speed, and calibrated volume. If this parameter is specified, the same parameters will be applied to every destination well. Will supersede dispense_speed parameters if also specified.
  • pre_buffer (str, Unit, optional) – Volume of air aspirated before aspirating liquid.
  • disposal_vol (str, Unit, optional) – Volume of extra liquid to aspirate that will be dispensed into trash afterwards.
  • transit_vol (str, Unit, optional) – Volume of air aspirated after aspirating liquid to reduce presence of bubbles at pipette tip.
  • blowout_buffer (bool, optional) – If true the operation will dispense the pre_buffer along with the dispense volume. Cannot be true if disposal_vol is specified.
Raises:
  • RuntimeError – If no mix volume is specified for the mix_before instruction.
  • ValueError – If source and destination well(s) is/are not expressed as either Wells or WellGroups.

Protocol.transfer()

Protocol.transfer(source, dest, volume, one_source=False, one_tip=False, aspirate_speed=None, dispense_speed=None, aspirate_source=None, dispense_target=None, pre_buffer=None, disposal_vol=None, transit_vol=None, blowout_buffer=None, tip_type=None, new_group=False, **mix_kwargs)

Transfer liquid from one specific well to another. A new pipette tip is used between each transfer step unless the “one_tip” parameter is set to True.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     ct32kj234l21g,
                     "96-flat",
                     storage="warm_37")


# a basic one-to-one transfer:
p.transfer(sample_plate.well("B3"),
           sample_plate.well("C3"),
           "20:microliter")

# using a basic transfer in a loop:
for i in xrange(1, 12):
  p.transfer(sample_plate.well(i-1),
             sample_plate.well(i),
             "10:microliter")

# transfer liquid from each well in the first column of a 96-well
# plate to each well of the second column using a new tip and
# a different volume each time:
volumes = ["5:microliter", "10:microliter", "15:microliter",
           "20:microliter", "25:microliter", "30:microliter",
           "35:microliter", "40:microliter"]

p.transfer(sample_plate.wells_from(0,8,columnwise=True),
           sample_plate.wells_from(1,8,columnwise=True),
           volumes)

# transfer liquid from wells A1 and A2 (which both contain the same
# source) into each of the following 10 wells:
p.transfer(sample_plate.wells_from("A1", 2),
           sample_plate.wells_from("A3", 10),
           "10:microliter",
           one_source=True)

# transfer liquid from wells containing the same source to multiple
# other wells without discarding the tip in between:
p.transfer(sample_plate.wells_from("A1", 2),
           sample_plate.wells_from("A3", 10),
           "10:microliter",
           one_source=True,
           one_tip=True)
Parameters:
  • source (Well, WellGroup) – Well or wells to transfer liquid from. If multiple source wells are supplied and one_source is set to True, liquid will be transfered from each source well specified as long as it contains sufficient volume. Otherwise, the number of source wells specified must match the number of destination wells specified and liquid will be transfered from each source well to its corresponding destination well.
  • dest (Well, WellGroup) – Well or WellGroup to which to transfer liquid. The number of destination wells must match the number of source wells specified unless one_source is set to True.
  • volume (str, Unit, list) – The volume(s) of liquid to be transferred from source wells to destination wells. Volume can be specified as a single string or Unit, or can be given as a list of volumes. The length of a list of volumes must match the number of destination wells given unless the same volume is to be transferred to each destination well.
  • one_source (bool, optional) – Specify whether liquid is to be transferred to destination wells from a group of wells all containing the same substance.
  • one_tip (bool, optional) – Specify whether all transfer steps will use the same tip or not.
  • mix_after (bool, optional) – Specify whether to mix the liquid in the destination well after liquid is transferred.
  • mix_before (bool, optional) – Specify whether to mix the liquid in the source well before liquid is transferred.
  • mix_vol (str, Unit, optional) – Volume to aspirate and dispense in order to mix liquid in a wells before and/or after each transfer step.
  • repetitions (int, optional) – Number of times to aspirate and dispense in order to mix liquid in well before and/or after each transfer step.
  • flowrate (str, Unit, optional) – Speed at which to mix liquid in well before and/or after each transfer step.
  • aspirate_speed (str, Unit, optional) – Speed at which to aspirate liquid from source well. May not be specified if aspirate_source is also specified. By default this is the maximum aspiration speed, with the start speed being half of the speed specified.
  • dispense_speed (str, Unit, optional) – Speed at which to dispense liquid into the destination well. May not be specified if dispense_target is also specified.
  • aspirate_source (fn, optional) – Can’t be specified if aspirate_speed is also specified.
  • dispense_target (fn, optional) – Same but opposite of aspirate_source.
  • pre_buffer (str, Unit, optional) – Volume of air aspirated before aspirating liquid.
  • disposal_vol (str, Unit, optional) – Volume of extra liquid to aspirate that will be dispensed into trash afterwards.
  • transit_vol (str, Unit, optional) – Volume of air aspirated after aspirating liquid to reduce presence of bubbles at pipette tip.
  • blowout_buffer (bool, optional) – If true the operation will dispense the pre_buffer along with the dispense volume. Cannot be true if disposal_vol is specified.
  • tip_type (str, optional) – Type of tip to be used for the transfer operation.
  • new_group (bool, optional) –
Raises:
  • RuntimeError – If more than one volume is specified as a list but the list length does not match the number of destination wells given.
  • RuntimeError – If transferring from WellGroup to WellGroup that have different number of wells and one_source is not True.

Protocol.acoustic_transfer()

Protocol.acoustic_transfer(source, dest, volume, one_source=False, droplet_size='25:nanoliter')

Specify source and destination wells for transfering liquid via an acoustic liquid handler. Droplet size is usually device-specific.

Parameters:
  • source (Well, WellGroup) – Well or wells to transfer liquid from. If multiple source wells are supplied and one_source is set to True, liquid will be transfered from each source well specified as long as it contains sufficient volume. Otherwise, the number of source wells specified must match the number of destination wells specified and liquid will be transfered from each source well to its corresponding destination well.
  • dest (Well, WellGroup) – Well or WellGroup to which to transfer liquid. The number of destination wells must match the number of source wells specified unless one_source is set to True.
  • volume (str, Unit, list) – The volume(s) of liquid to be transferred from source wells to destination wells. Volume can be specified as a single string or Unit, or can be given as a list of volumes. The length of a list of volumes must match the number of destination wells given unless the same volume is to be transferred to each destination well.
  • one_source (bool, optional) – Specify whether liquid is to be transferred to destination wells from a group of wells all containing the same substance.
  • droplet_size (str, Unit, optional) – Volume representing a droplet_size. The volume of each transfer group should be a multiple of this volume.

Example Usage:

p.acoustic_transfer(
    echo.wells(0,1).set_volume("12:nanoliter"),
    plate.wells_from(0,5), "4:nanoliter", one_source=True)

Autoprotocol Output:

"instructions": [
{
  "groups": [
    {
      "transfer": [
        {
          "volume": "0.004:microliter",
          "to": "plate/0",
          "from": "echo_plate/0"
        },
        {
          "volume": "0.004:microliter",
          "to": "plate/1",
          "from": "echo_plate/0"
        },
        {
          "volume": "0.004:microliter",
          "to": "plate/2",
          "from": "echo_plate/0"
        },
        {
          "volume": "0.004:microliter",
          "to": "plate/3",
          "from": "echo_plate/1"
        },
        {
          "volume": "0.004:microliter",
          "to": "plate/4",
          "from": "echo_plate/1"
        }
      ]
    }
  ],
  "droplet_size": "25:microliter",
  "op": "acoustic_transfer"
}]

Protocol.consolidate()

Protocol.consolidate(sources, dest, volumes, allow_carryover=False, mix_after=False, mix_vol=None, flowrate='100:microliter/second', repetitions=10, aspirate_speed=None, dispense_speed=None, aspirate_source=None, dispense_target=None, pre_buffer=None, transit_vol=None, blowout_buffer=None, tip_type=None, new_group=False)

Aspirates from each source well, in order, the volume specified, then dispenses the sum volume into the target well. Be aware that the same tip will be used to aspirate from all the source wells, so if you want to avoid contaminating any of them you should use a separate transfer group. Consolidate is limited by the maximum volume of the disposable tip. If the total volume you want to dispense into the target well exceeds the volume that will fit in one tip, you must either specify allow_carryover to allow the tip to carry on pipetting from the source wells after it has touched the target well, or break up your operation into multiple groups with separate tips.

Parameters:
  • sources (Well, WellGroup) – Well or wells to transfer liquid from.
  • dest (Well) – Well to which to transfer consolidated liquid.
  • volumes (str, Unit, list) – The volume(s) of liquid to be transferred from source well(s) to destination well. Volume can be specified as a single string or Unit, or can be given as a list of volumes. The length of a list of volumes must match the number of source wells given.
  • mix_after (bool, optional) – Specify whether to mix the liquid in the destination well after liquid is transferred.
  • mix_vol (str, Unit, optional) – Volume to aspirate and dispense in order to mix liquid in a wells before and/or after each transfer step.
  • repetitions (int, optional) – Number of times to aspirate and dispense in order to mix liquid in well before and/or after each transfer step.
  • flowrate (str, Unit, optional) – Speed at which to mix liquid in well before and/or after each transfer step.
  • speed (aspirate) – Speed at which to aspirate liquid from source well. May not be specified if aspirate_source is also specified. By default this is the maximum aspiration speed, with the start speed being half of the speed specified.
  • dispense_speed (str, Unit, optional) – Speed at which to dispense liquid into the destination well. May not be specified if dispense_target is also specified.
  • aspirate_source (fn, optional) – Options for aspirating liquid. Cannot be specified if aspirate_speed is also specified.
  • dispense_target (fn, optional) – Options for dispensing liquid. Cannot be specified if dispense_speed is also specified.
  • pre_buffer (str, Unit, optional) – Volume of air aspirated before aspirating liquid.
  • transit_vol (str, Unit, optional) – Volume of air aspirated after aspirating liquid to reduce presence of bubbles at pipette tip.
  • blowout_buffer (bool, optional) – If true the operation will dispense the pre_buffer along with the dispense volume cannot be true if disposal_vol is specified.
Raises:
  • TypeError – If supplying more than one destination well for consolidation.
  • ValueError – If a volume list is supplied and the length does not match the number of source wells.

Protocol.dispense()

Protocol.dispense(ref, reagent, columns, speed_percentage=None, is_resource_id=False, step_size='5:microliter', x_cassette=None)

Dispense specified reagent to specified columns.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")

p.dispense(sample_plate,
           "water",
           [{"column": 0, "volume": "10:microliter"},
            {"column": 1, "volume": "20:microliter"},
            {"column": 2, "volume": "30:microliter"},
            {"column": 3, "volume": "40:microliter"},
            {"column": 4, "volume": "50:microliter"},
            {"column": 5, "volume": "60:microliter"},
            {"column": 6, "volume": "70:microliter"},
            {"column": 7, "volume": "80:microliter"},
            {"column": 8, "volume": "90:microliter"},
            {"column": 9, "volume": "100:microliter"},
            {"column": 10, "volume": "110:microliter"},
            {"column": 11, "volume": "120:microliter"}
           ])

Autoprotocol Output:

"instructions": [
    {
        "reagent": "water",
        "object": "sample_plate",
        "columns": [
            {
                "column": 0,
                "volume": "10:microliter"
            },
            {
                "column": 1,
                "volume": "20:microliter"
            },
            {
                "column": 2,
                "volume": "30:microliter"
            },
            {
                "column": 3,
                "volume": "40:microliter"
            },
            {
                "column": 4,
                "volume": "50:microliter"
            },
            {
                "column": 5,
                "volume": "60:microliter"
            },
            {
                "column": 6,
                "volume": "70:microliter"
            },
            {
                "column": 7,
                "volume": "80:microliter"
            },
            {
                "column": 8,
                "volume": "90:microliter"
            },
            {
                "column": 9,
                "volume": "100:microliter"
            },
            {
                "column": 10,
                "volume": "110:microliter"
            },
            {
                "column": 11,
                "volume": "120:microliter"
            }
        ],
        "op": "dispense"
    }
]
Parameters:
  • ref (Container) – Container for reagent to be dispensed to.
  • reagent (str, well) – Reagent to be dispensed. Use a string to specify the name or resource_id (see below) of the reagent to be dispensed. Alternatively, use a well to specify that the dispense operation must be executed using a specific aliquot as the dispense source.
  • columns (list) – Columns to be dispensed to, in the form of a list of dicts specifying the column number and the volume to be dispensed to that column. Columns are expressed as integers indexed from 0. [{“column”: <column num>, “volume”: <volume>}, ...]
  • speed_percentage (int, optional) – Integer between 1 and 100 that represents the percentage of the maximum speed at which liquid is dispensed from the reagent dispenser.
  • is_resource_id (bool, optional) – If true, interprets reagent as a resource ID
  • step_size (str, Unit, optional) – Specifies that the dispense operation must be executed using a peristaltic pump with the given step size. Note that the volume dispensed in each column must be an integer multiple of the step_size. Currently, step_size must be either 5 uL or 0.5 uL. If set to None, will use vendor specified defaults.
  • x_cassette (str, optional) – Specifies a specific cassette to be used with this instruction. Cassette will be checked against a list of allowed values. Each cassette has a pre-defined value for step_size, and certain cassettes may require human execution.

Protocol.dispense_full_plate()

Protocol.dispense_full_plate(ref, reagent, volume, speed_percentage=None, is_resource_id=False, step_size='5:microliter', x_cassette=None)

Dispense the specified amount of the specified reagent to every well of a container using a reagent dispenser.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")

p.dispense_full_plate(sample_plate,
                      "water",
                      "100:microliter")

Autoprotocol Output:

"instructions": [
    {
      "reagent": "water",
      "object": "sample_plate",
      "columns": [
        {
          "column": 0,
          "volume": "100:microliter"
        },
        {
          "column": 1,
          "volume": "100:microliter"
        },
        {
          "column": 2,
          "volume": "100:microliter"
        },
        {
          "column": 3,
          "volume": "100:microliter"
        },
        {
          "column": 4,
          "volume": "100:microliter"
        },
        {
          "column": 5,
          "volume": "100:microliter"
        },
        {
          "column": 6,
          "volume": "100:microliter"
        },
        {
          "column": 7,
          "volume": "100:microliter"
        },
        {
          "column": 8,
          "volume": "100:microliter"
        },
        {
          "column": 9,
          "volume": "100:microliter"
        },
        {
          "column": 10,
          "volume": "100:microliter"
        },
        {
          "column": 11,
          "volume": "100:microliter"
        }
      ],
      "op": "dispense"
    }
]
Parameters:
  • ref (Container) – Container for reagent to be dispensed to.
  • reagent (str, well) – Reagent to be dispensed. Use a string to specify the name or resource_id (see below) of the reagent to be dispensed. Alternatively, use a well to specify that the dispense operation must be executed using a specific aliquot as the dispense source.
  • volume (Unit, str) – Volume of reagent to be dispensed to each well
  • speed_percentage (int, optional) – Integer between 1 and 100 that represents the percentage of the maximum speed at which liquid is dispensed from the reagent dispenser.
  • is_resource_id (bool, optional) – If true, interprets reagent as a resource ID
  • step_size (str, Unit, optional) – Specifies that the dispense operation must be executed using a peristaltic pump with the given step size. Note that the volume dispensed in each column must be an integer multiple of the step_size. Currently, step_size must be either 5 uL or 0.5 uL. If set to None, will use vendor specified defaults.
  • x_cassette (str, optional) – Specifies a specific cassette to be used with this instruction. Cassette will be checked against a list of allowed values. Each cassette has a pre-defined value for step_size, and certain cassettes may require human execution.

Protocol.stamp()

Protocol.stamp(source_origin, dest_origin, volume, shape={'rows': 8, 'columns': 12}, mix_before=False, mix_after=False, mix_vol=None, repetitions=10, flowrate='100:microliter/second', aspirate_speed=None, dispense_speed=None, aspirate_source=None, dispense_target=None, pre_buffer=None, disposal_vol=None, transit_vol=None, blowout_buffer=None, one_source=False, one_tip=False, new_group=False)

Note: the way this method now works is significantly different to the way it has in previous versions, please make sure to read the documentation below and adjust existing scripts utilizing stamp() accordingly

A stamp instruction consists of a list of groups of transfers, each of which specifies from and to well references (ref/well_index) representing the top-left well or origin of a specified shape.

The volume field defines the volume of liquid that will be aspirated from every well of the shape specified starting at the from field and dispensed into the corresponding wells starting at the to field.

Currently, the shape field may only be a rectangle object defined by rows and columns attributes representing the number of contiguous tip rows and columns to transfer.

The shape parameter is optional and will default to a full 8 rows by 12 columns. The tip_layout field refers to the SBS compliant layout of tips, is optional, and will default to the layout of a 96 tip box.

The following plate types are currently supported: 96 and 384.

Example Usage:

p = Protocol()

plate_1_96 = p.ref("plate_1_96", None, "96-flat", discard=True)
plate_2_96 = p.ref("plate_2_96", None, "96-flat", discard=True)
plate_1_384 = p.ref("plate_1_384", None, "384-flat", discard=True)
plate_2_384 = p.ref("plate_2_384", None, "384-flat", discard=True)

# A full-plate transfer between two 96 or 384-well plates
p.stamp(plate_1_96, plate_2_96, "10:microliter")
p.stamp(plate_1_384, plate_2_384, "10:microliter")

# Defining shapes for selective stamping:
row_rectangle = dict(rows=1, columns=12)
two_column_rectangle = dict(rows=8, columns=2)

# A transfer from the G row to the H row of another 96-well plate
p.stamp(plate_1_96.well("G1"), plate_2_96.well("H1"),
"10:microliter", row_rectangle)

# A 2-column transfer from columns 1,2 of a 96-well plate to
#columns 2,4 of a 384-well plate
p.stamp(plate_1_96.well("A1"), plate_1_384.wells_from("A2", 2,
columnwise=True), "10:microliter", two_column_rectangle)

# A 2-row transfer from rows 1,2 of a 384-well plate to rows 2,3
#of a 96-well plate
p.stamp(plate_1_384.wells(["A1", "A2", "B1", "B2"]), plate_1_96.
wells(["B1", "B1", "C1", "C1"]), "10:microliter",
shape=row_rectangle)
Parameters:
  • source_origin (Container, Well, WellGroup, List of Wells) – Top-left well or wells where the rows/columns will be defined with respect to the source transfer. If a container is specified, stamp will be applied to all quadrants of the container.
  • dest_origin (Container, Well, WellGroup, List of Wells) – Top-left well or wells where the rows/columns will be defined with respect to the destination transfer. If a container is specified, stamp will be applied to all quadrants of the container
  • volume (str, Unit, list) – Volume(s) of liquid to move from source plate to destination plate. Volume can be specified as a single string or Unit, or can be given as a list of volumes. The length of a list of volumes must match the number of destination wells given unless the same volume is to be transferred to each destination well.
  • shape (dictionary, list, optional) –

    The shape(s) parameter is optional and will default to a rectangle corresponding to a full 96-well plate (8 rows by 12 columns). The rows and columns will be defined wrt the specified origin. The length of a list of shapes must match the number of destination wells given unless the same shape is to be used for each destination well. If the length of shape is greater than 1, one_tip=False.

    Example

    rectangle = {}
    rectangle["rows"] = 8
    rectangle["columns"] = 12
    
  • mix_after (bool, optional) – Specify whether to mix the liquid in destination wells after liquid is transferred.
  • mix_before (bool, optional) – Specify whether to mix the liquid in source wells before liquid is transferred.
  • mix_vol (str, Unit, optional) – Volume to aspirate and dispense in order to mix liquid in wells before and/or after it is transfered.
  • repetitions (int, optional) – Number of times to aspirate and dispense in order to mix liquid in wells before and/or after it is transfered.
  • flowrate (str, Unit, optional) – Speed at which to mix liquid in well before and/or after each transfer step in units of “microliter/second”.
  • dispense_speed (str, Unit, optional) – Speed at which to dispense liquid into the destination well. May not be specified if dispense_target is also specified.
  • aspirate_source (fn, optional) – Can’t be specified if aspirate_speed is also specified.
  • dispense_target (fn, optional) – Same but opposite of aspirate_source.
  • pre_buffer (str, Unit, optional) – Volume of air aspirated before aspirating liquid.
  • disposal_vol (str, Unit, optional) – Volume of extra liquid to aspirate that will be dispensed into trash afterwards.
  • transit_vol (str, Unit, optional) – Volume of air aspirated after aspirating liquid to reduce presence of bubbles at pipette tip.
  • blowout_buffer (bool, optional) – If true the operation will dispense the pre_buffer along with the dispense volume. Cannot be true if disposal_vol is specified.
  • one_source (bool, optional) – Specify whether liquid is to be transferred to destination origins from a group of origins all containing the same substance. Volume of all wells in the shape must be equal to or greater than the volume in the origin well. Specifying origins with overlapping shapes can produce undesireable effects.
  • one_tip (bool, optional) – Specify whether all transfer steps will use the same tip or not. If multiple different shapes are used, one_tip cannot be true.
  • new_group (bool, optional) –

    Example

    p.stamp(plate_1_96.well("A1"), plate_2_96.well("A1"),
    "10:microliter")
    p.stamp(plate_1_96.well("A1"), plate_2_96.well("A1"),
    "10:microliter")
    

    Autoprotocol Output:

    "instructions": [
        {
          "groups": [
            {
              "transfer": [
                {
                  "volume": "10.0:microliter",
                  "to": "plate_2_96/0",
                  "from": "plate_1_96/0"
                }
              ],
              "shape": {
                "rows": 8,
                "columns": 12
              },
              "tip_layout": 96
            }
          ],
          "op": "stamp"
        },
        {
          "groups": [
            {
              "transfer": [
                {
                  "volume": "10.0:microliter",
                  "to": "plate_2_96/0",
                  "from": "plate_1_96/0"
                }
              ],
              "shape": {
                "rows": 8,
                "columns": 12
              },
              "tip_layout": 96
            }
          ],
          "op": "stamp"
        }
      ]
    

Protocol.illuminaseq()

Protocol.illuminaseq(flowcell, lanes, sequencer, mode, index, library_size, dataref, cycles=None)

Load aliquots into specified lanes for Illumina sequencing. The specified aliquots should already contain the appropriate mix for sequencing and require a library concentration reported in ng/uL.

Example Usage:

p = Protocol()
sample_wells = p.ref(
    "test_plate", None, "96-pcr", discard=True).wells_from(0, 8)

p.illuminaseq("PE",
              [
                  {"object": sample_wells[0], "library_concentration": 1.0},
                  {"object": sample_wells[1], "library_concentration": 5.32},
                  {"object": sample_wells[2], "library_concentration": 54},
                  {"object": sample_wells[3], "library_concentration": 20},
                  {"object": sample_wells[4], "library_concentration": 23},
                  {"object": sample_wells[5], "library_concentration": 23},
                  {"object": sample_wells[6], "library_concentration": 21},
                  {"object": sample_wells[7], "library_concentration": 62}
              ],
              "hiseq", "rapid", 'none', 250, "my_illumina")

Autoprotocol Output:

"instructions": [
    {
      "dataref": "my_illumina",
      "index": "none",
      "lanes": [
        {
          "object": "test_plate/0",
          "library_concentration": 1.0
        },
        {
          "object": "test_plate/1",
          "library_concentration": 5.32
        },
        {
          "object": "test_plate/2",
          "library_concentration": 54
        },
        {
          "object": "test_plate/3",
          "library_concentration": 20
        },
        {
          "object": "test_plate/4",
          "library_concentration": 23
        },
        {
          "object": "test_plate/5",
          "library_concentration": 23
        },
        {
          "object": "test_plate/6",
          "library_concentration": 21
        },
        {
          "object": "test_plate/7",
          "library_concentration": 62
        }
      ],
      "flowcell": "PE",
      "mode": "mid",
      "sequencer": "hiseq",
      "library_size": 250,
      "op": "illumina_sequence"
    }
  ]
Parameters:
  • flowcell (str) – Flowcell designation: “SR” or ” “PE”
  • lanes (list of dicts) –
    "lanes": [{
          "object": aliquot, Well,
          "library_concentration": decimal, // ng/uL
        },
        {...}]
    
  • sequencer (str) – Sequencer designation: “miseq”, “hiseq” or “nextseq”
  • mode (str) – Mode designation: “rapid”, “mid” or “high”
  • index (str) – Index designation: “single”, “dual” or “none”
  • library_size (integer) – Library size expressed as an integer of basepairs
  • dataref (str) – Name of sequencing dataset that will be returned.
Raises:
  • TypeError: – If index and dataref are not of type str.
  • TypeError: – If library_concentration is not a number.
  • TypeError: – If library_size is not an integer.
  • ValueError: – If flowcell, sequencer, mode, index are not of type a valid option.
  • ValueError: – If number of lanes specified is more than the maximum lanes of the specified type of sequencer.

Protocol.sangerseq()

Protocol.sangerseq(cont, wells, dataref, type='standard', primer=None)

Send the indicated wells of the container specified for Sanger sequencing. The specified wells should already contain the appropriate mix for sequencing, including primers and DNA according to the instructions provided by the vendor.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")

p.sangerseq(sample_plate,
            sample_plate.wells_from(0,5).indices(),
            "seq_data_022415")

Autoprotocol Output:

"instructions": [
    {
      "dataref": "seq_data_022415",
      "object": "sample_plate",
      "wells": [
        "A1",
        "A2",
        "A3",
        "A4",
        "A5"
      ],
      "op": "sanger_sequence"
    }
  ]
Parameters:
  • cont (Container, str) – Container with well(s) that contain material to be sequenced.
  • type (str) – Type of sequencing reaction to take place (“standard” or “rca”), defaults to “standard”
  • wells (list, WellGroup, Well) – WellGroup of wells to be measured or a list of well references in the form of [“A1”, “B1”, “C5”, ...]
  • primer (container) – Tube containing sufficient primer for all RCA reactions. This field will be ignored if you specify the sequencing type as “standard”. Tube containing sufficient primer for all RCA reactions
  • dataref (str) – Name of sequencing dataset that will be returned.

Protocol.mix()

Protocol.mix(well, volume='50:microliter', speed='100:microliter/second', repetitions=10, one_tip=False)

Mix specified well using a new pipette tip

Example Usage:

p = Protocol()
sample_source = p.ref("sample_source",
                      None,
                      "micro-1.5",
                      storage="cold_20")

p.mix(sample_source.well(0), volume="200:microliter",
      repetitions=25)

Autoprotocol Output:

"instructions": [
    {
      "groups": [
        {
          "mix": [
            {
              "volume": "200:microliter",
              "well": "sample_source/0",
              "repetitions": 25,
              "speed": "100:microliter/second"
            }
          ]
        }
      ],
      "op": "pipette"
    }
  ]
}
Parameters:
  • well (Well, WellGroup, list of Wells) – Well(s) to be mixed. If a WellGroup is passed, each well in the group will be mixed using the specified parameters.
  • volume (str, Unit, optional) – volume of liquid to be aspirated and expelled during mixing
  • speed (str, Unit, optional) – flowrate of liquid during mixing
  • repetitions (int, optional) – number of times to aspirate and expell liquid during mixing
  • one_tip (bool) – mix all wells with a single tip

Protocol.spin()

Protocol.spin(ref, acceleration, duration, flow_direction=None, spin_direction=None)

Apply acceleration to a container.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")

p.spin(sample_plate, "1000:g", "20:minute", flow_direction="outward)

Autoprotocol Output:

"instructions": [
    {
      "acceleration": "1000:g",
      "duration": "20:minute",
      "flow_direction": "outward",
      "spin_direction": [
        "cw",
        "ccw"
      ]
      "object": "sample_plate",
      "op": "spin"
    }
]
Parameters:
  • ref (Container) – The container to be centrifuged.
  • acceleration (str) – Acceleration to be applied to the plate, in units of g or meter/second^2.
  • duration (str, Unit) – Length of time that acceleration should be applied.
  • flow_direction (str) – Specifies the direction contents will tend toward with respect to the container. Valid directions are “inward” and “outward”, default value is “inward”.
  • spin_direction (list of strings) – A list of “cw” (clockwise), “cww” (counterclockwise). For each element in the list, the container will be spun in the stated direction for the set “acceleration” and “duration”. Default values are derived from the “flow_direction” parameter. If “flow_direction” is “outward”, then “spin_direction” defaults to [“cw”, “ccw”]. If “flow_direction” is “inward”, then “spin_direction” defaults to [“cw”].
Raises:
  • TypeError: – If ref to spin is not of type Container.
  • TypeError: – If spin_direction or flow_direction are not properly formatted.
  • ValueError: – If spin_direction or flow_direction do not have appropriate values.

Protocol.thermocycle()

Protocol.thermocycle(ref, groups, volume='10:microliter', dataref=None, dyes=None, melting_start=None, melting_end=None, melting_increment=None, melting_rate=None)

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

"groups": [{
    "cycles": integer,
    "steps": [{
      "duration": duration,
      "temperature": temperature,
      "read": boolean // optional (default false)
    },{
      "duration": duration,
      "gradient": {
        "top": temperature,
        "bottom": temperature
      },
      "read": boolean // optional (default false)
    }]
}],

Thermocycle can also be used for either conventional or row-wise gradient PCR as well as qPCR. Refer to the examples below for details.

Example Usage:

To thermocycle a container according to the protocol:
  • 1 cycle:
    • 95 degrees for 5 minutes
  • 30 cycles:
    • 95 degrees for 30 seconds
    • 56 degrees for 20 seconds
    • 72 degrees for 30 seconds
  • 1 cycle:
    • 72 degrees for 10 minutes
p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-pcr",
                     storage="warm_37")

# a plate must be sealed before it can be thermocycled
p.seal(sample_plate)

p.thermocycle(sample_plate,
            [
             {"cycles": 1,
              "steps": [{
                 "temperature": "95:celsius",
                 "duration": "5:minute",
                 }]
              },
              {"cycles": 30,
                  "steps": [
                     {"temperature": "95:celsius",
                      "duration": "30:second"},
                     {"temperature": "56:celsius",
                      "duration": "20:second"},
                     {"temperature": "72:celsius",
                      "duration": "20:second"}
                     ]
             },
                 {"cycles": 1,
                     "steps": [
                     {"temperature": "72:celsius", "duration":"10:minute"}]
                 }
            ])

Autoprotocol Output:

"instructions": [
{
  "object": "sample_plate",
  "op": "seal"
},
{
  "volume": "10:microliter",
  "dataref": null,
  "object": "sample_plate",
  "groups": [
    {
      "cycles": 1,
      "steps": [
        {
          "duration": "5:minute",
          "temperature": "95:celsius"
        }
      ]
    },
    {
      "cycles": 30,
      "steps": [
        {
          "duration": "30:second",
          "temperature": "95:celsius"
        },
        {
          "duration": "20:second",
          "temperature": "56:celsius"
        },
        {
          "duration": "20:second",
          "temperature": "72:celsius"
        }
      ]
    },
    {
      "cycles": 1,
      "steps": [
        {
          "duration": "10:minute",
          "temperature": "72:celsius"
        }
      ]
    }
  ],
  "op": "thermocycle"
}]

To gradient thermocycle a container according to the protocol:

  • 1 cycle:
    • 95 degrees for 5 minutes
  • 30 cycles:
    • 95 degrees for 30 seconds

    Top Row: * 55 degrees for 20 seconds Bottom Row: * 65 degrees for 20 seconds

    • 72 degrees for 30 seconds
  • 1 cycle:
    • 72 degrees for 10 minutes
p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-pcr",
                     storage="warm_37")

# a plate must be sealed before it can be thermocycled
p.seal(sample_plate)

p.thermocycle(sample_plate,
              [
               {"cycles": 1,
                "steps": [{
                   "temperature": "95:celsius",
                   "duration": "5:minute",
                   }]
                },
                {"cycles": 30,
                    "steps": [
                      {
                        "duration": "30:second",
                        "temperature": "95:celsius"
                      },
                      {
                       "duration": "20:second",
                       "gradient": {
                          "top": "56:celsius",
                          "bottom": "58:celsius"
                        }
                      },
                      {
                        "duration": "20:second",
                        "temperature": "72:celsius"
                      }
                      ]
               },
                   {"cycles": 1,
                        "steps": [{"temperature": "72:celsius", "duration":"10:minute"}]
                   }
              ])

To conduct a qPCR, at least one dye type and the dataref field has to be specified. The example below uses SYBR dye and the following temperature profile:

  • 1 cycle:
    • 95 degrees for 3 minutes
  • 40 cycles:
    • 95 degrees for 10 seconds
    • 60 degrees for 30 seconds (Read during extension)
p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-pcr",
                     storage="warm_37")

# a plate must be sealed before it can be thermocycled
p.seal(sample_plate)

p.thermocycle(sample_plate,
              [{"cycles": 1,
                "steps": [{
                    "temperature": "95:celsius",
                    "duration": "3:minute",
                    }]
               },
               {"cycles": 40,
                    "steps": [
                        {"temperature": "95:celsius",
                         "duration": "10:second",
                         "read": False},
                        {"temperature": "60:celsius",
                         "duration": "30:second",
                         "read": True},
                        ]
              }],
              dataref = "my_qpcr_data",
              dyes = {
                "SYBR": sample_plate.all_wells().indices()}
              )
Parameters:
  • ref (Container) – Container to be thermocycled.
  • groups (list of dicts) – List of thermocycling instructions formatted as above
  • volume (str, Unit, optional) – Volume contained in wells being thermocycled
  • dataref (str, optional) – Name of dataref representing read data if performing qPCR
  • dyes (dict, optional) – Dictionary mapping dye types to the wells they’re used in
  • melting_start (str, Unit) – Temperature at which to start the melting curve.
  • melting_end (str, Unit) – Temperature at which to end the melting curve.
  • melting_increment (str, Unit) – Temperature by which to increment the melting curve. Accepted increment values are between 0.1 and 9.9 degrees celsius.
  • melting_rate (str, Unit) – Specifies the duration of each temperature step in the melting curve.
Raises:
  • AttributeError: – If groups are not properly formatted
  • TypeError: – If ref to thermocycle is not of type Container.

Protocol.incubate()

Protocol.incubate(ref, where, duration, shaking=False, co2=0, uncovered=False, target_temperature=None, shaking_params=None)

Move plate to designated thermoisolater or ambient area for incubation for specified duration.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-pcr",
                     storage="warm_37")

# a plate must be sealed/covered before it can be incubated
p.seal(sample_plate)
p.incubate(sample_plate, "warm_37", "1:hour", shaking=True)

Autoprotocol Output:

"instructions": [
    {
       "object": "sample_plate",
       "op": "seal"
    },
    {
        "duration": "1:hour",
        "where": "warm_37",
        "object": "sample_plate",
        "shaking": true,
        "op": "incubate",
        "co2_percent": 0
    }
  ]
Parameters:
  • ref (Ref, str) – The container to be incubated
  • where ({“ambient”, “warm_37”, “cold_4”, “cold_20”, “cold_80”}) – Temperature at which to incubate specified container
  • duration (Unit, str) – Length of time to incubate container
  • shaking (bool, optional) – Specify whether or not to shake container if available at the specified temperature
  • target_tempterature (Unit, str, optional) – Specify a target temperature for a device (eg. an incubating block) to reach during the specified duration.
  • shaking_params (dict, optional) – Specifify “path” and “frequency” of shaking parameters to be used with compatible devices (eg. thermoshakes)

Protocol.absorbance()

Protocol.absorbance(ref, wells, wavelength, dataref, flashes=25, incubate_before=None, temperature=None)

Read the absorbance for the indicated wavelength for the indicated wells. Append an Absorbance instruction to the list of instructions for this Protocol object.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")

p.absorbance(sample_plate, sample_plate.wells_from(0,12),
             "600:nanometer", "test_reading", flashes=50)

Autoprotocol Output:

"instructions": [
    {
      "dataref": "test_reading",
      "object": "sample_plate",
      "wells": [
        "A1",
        "A2",
        "A3",
        "A4",
        "A5",
        "A6",
        "A7",
        "A8",
        "A9",
        "A10",
        "A11",
        "A12"
      ],
      "num_flashes": 50,
      "wavelength": "600:nanometer",
      "op": "absorbance"
    }
  ]
Parameters:
  • ref (str, Ref) –
  • wells (list, WellGroup, Well) – WellGroup of wells to be measured or a list of well references in the form of [“A1”, “B1”, “C5”, ...]
  • wavelength (str, Unit) – wavelength of light absorbance to be read for the indicated wells
  • dataref (str) – name of this specific dataset of measured absorbances
  • flashes (int, optional) –
  • temperature (str, Unit, optional) – set temperature to heat plate reading chamber
  • incubate_before (dict, optional) –

    incubation prior to reading if desired

    {
      "shaking": {
        "amplitude": str, Unit
        "orbital": bool
        }
    "duration": str, Unit
    }
    

Protocol.fluorescence()

Protocol.fluorescence(ref, wells, excitation, emission, dataref, flashes=25, temperature=None, gain=None, incubate_before=None)

Read the fluoresence for the indicated wavelength for the indicated wells. Append a Fluorescence instruction to the list of instructions for this Protocol object.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")

p.fluorescence(sample_plate, sample_plate.wells_from(0,12),
               excitation="587:nanometer", emission="610:nanometer",
               dataref="test_reading")

Autoprotocol Output:

"instructions": [
    {
      "dataref": "test_reading",
      "excitation": "587:nanometer",
      "object": "sample_plate",
      "emission": "610:nanometer",
      "wells": [
        "A1",
        "A2",
        "A3",
        "A4",
        "A5",
        "A6",
        "A7",
        "A8",
        "A9",
        "A10",
        "A11",
        "A12"
      ],
      "num_flashes": 25,
      "op": "fluorescence"
    }
  ]
Parameters:
  • ref (str, Container) – Container to plate read.
  • wells (list, WellGroup, Well) – WellGroup of wells to be measured or a list of well references in the form of [“A1”, “B1”, “C5”, ...]
  • excitation (str, Unit) – Wavelength of light used to excite the wells indicated
  • emission (str, Unit) – Wavelength of light to be measured for the indicated wells
  • dataref (str) – Name of this specific dataset of measured absorbances
  • flashes (int, optional) – Number of flashes.
  • temperature (str, Unit, optional) – set temperature to heat plate reading chamber
  • gain (float, optional) – float between 0 and 1, multiplier, gain=0.2 of maximum signal amplification
  • incubate_before (dict, optional) –

    incubation prior to reading if desired

    {
      "shaking": {
        "amplitude": str, Unit
        "orbital": bool
        }
    "duration": str, Unit
    }
    

Protocol.luminescence()

Protocol.luminescence(ref, wells, dataref, incubate_before=None, temperature=None)

Read luminescence of indicated wells.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")

p.luminescence(sample_plate, sample_plate.wells_from(0,12),
               "test_reading")

Autoprotocol Output:

"instructions": [
    {
      "dataref": "test_reading",
      "object": "sample_plate",
      "wells": [
        "A1",
        "A2",
        "A3",
        "A4",
        "A5",
        "A6",
        "A7",
        "A8",
        "A9",
        "A10",
        "A11",
        "A12"
      ],
      "op": "luminescence"
    }
  ]
Parameters:
  • ref (str, Container) – Container to plate read.
  • wells (list, WellGroup, Well) – WellGroup of wells to be measured or a list of well references in the form of [“A1”, “B1”, “C5”, ...]
  • dataref (str) – Name of this dataset of measured luminescence readings.
  • temperature (str, Unit, optional) – set temperature to heat plate reading chamber
  • incubate_before (dict, optional) –

    incubation prior to reading if desired

    {
      "shaking": {
        "amplitude": str, Unit
        "orbital": bool
        }
    "duration": str, Unit
    }
    

Protocol.gel_separate()

Protocol.gel_separate(wells, volume, matrix, ladder, duration, dataref)

Separate nucleic acids on an agarose gel.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")

p.gel_separate(sample_plate.wells_from(0,12), "10:microliter",
               "agarose(8,0.8%)", "ladder1", "11:minute",
               "genotyping_030214")

Autoprotocol Output:

"instructions": [
    {
      "dataref": "genotyping_030214",
      "matrix": "agarose(8,0.8%)",
      "volume": "10:microliter",
      "ladder": "ladder1",
      "objects": [
        "sample_plate/0",
        "sample_plate/1",
        "sample_plate/2",
        "sample_plate/3",
        "sample_plate/4",
        "sample_plate/5",
        "sample_plate/6",
        "sample_plate/7",
        "sample_plate/8",
        "sample_plate/9",
        "sample_plate/10",
        "sample_plate/11"
      ],
      "duration": "11:minute",
      "op": "gel_separate"
    }
]
Parameters:
  • wells (list, WellGroup, Well) – List of wella or WellGroup containing wells to be separated on gel.
  • volume (str, Unit) – Volume of liquid to be transferred from each well specified to a lane of the gel.
  • matrix (str) – Matrix (gel) in which to gel separate samples
  • ladder (str) – Ladder by which to measure separated fragment size
  • duration (str, Unit) – Length of time to run current through gel.
  • dataref (str) – Name of this set of gel separation results.

Protocol.gel_purify()

Protocol.gel_purify(extracts, volume, matrix, ladder, dataref)

Separate nucleic acids on an agarose gel and purify according to parameters. If gel extract lanes are not specified, they will be sequentially ordered and purified on as many gels as necessary.

Each element in extracts specifies a source loaded in a single lane of gel with a list of bands that will be purified from that lane. If the same source is to be run on separate lanes, a new dictionary must be added to extracts. It is also possible to add an element to extract with a source but without a list of bands. In that case, the source will be run in a lane without extraction.

Example Usage:

p = Protocol()
sample_wells = p.ref("test_plate", None, "96-pcr",
                     discard=True).wells_from(0, 8)
extract_wells = [p.ref("extract_" + str(i.index), None,
                       "micro-1.5", storage="cold_4").well(0)
                 for i in sample_wells]


extracts = [make_gel_extract_params(
                w,
                make_band_param(
                    "TE",
                    "5:microliter",
                    80,
                    79,
                    extract_wells[i]))
                for i, w in enumerate(sample_wells)]

p.gel_purify(extracts, "10:microliter",
             "size_select(8,0.8%)", "ladder1",
             "gel_purify_example")

Autoprotocol Output:

For extracts[0]

{
  "band_list": [
    {
      "band_size_range": {
        "max_bp": 80,
        "min_bp": 79
      },
      "destination": Well(Container(extract_0), 0, None),
      "elution_buffer": "TE",
      "elution_volume": "Unit(5.0, 'microliter')"
    }
  ],
  "gel": None,
  "lane": None,
  "source": Well(Container(test_plate), 0, None)
}
Parameters:
  • extracts (List of dicts) –

    Dictionary containing parameters for gel extraction, must be in the form of:

    [
      {
      "band_list": [
        {
          "band_size_range": {
            "max_bp": int,
            "min_bp": int
          },
          "destination": Well,
          "elution_buffer": str,
          "elution_volume": Volume
        }
      ],
      "gel": int or None,
      "lane": int or None,
      "source": Well
      }
    ]
    

    util.make_gel_extract_params() and util.make_band_param() can be used to create these dictionaries

  • band_list (list of dicts) – List of bands to be extracted from the lane
  • band_size_range (dict) – Dictionary for the size range of the band to be extracted
  • max_bp (int) – Maximum size for the band
  • min_bp (int) – Minimum size for the band
  • destination (Well) – Well to place the extracted material
  • elution_buffer (str) – Buffer to use to extract the band, commonly “water”
  • elution_volume (str, Unit) – Volume of elution_buffer to extract the band into
  • gel (int) – Integer identifier for the gel if using multiple gels
  • lane (int) – Integer identifier for the lane of a gel to run the source
  • source (Well) – Well from whcih to purify the material
  • volume (str, Unit) – Volume of liquid to be transferred from each well specified to a lane of the gel.
  • matrix (str) – Matrix (gel) in which to gel separate samples
  • ladder (str) – Ladder by which to measure separated fragment size
  • dataref (str) – Name of this set of gel separation results.
Raises:
  • RuntimeError: – If matrix is not properly formatted.
  • AttributeError: – If extract parameters are not a list of dictionaries.
  • KeyError: – If extract parameters do not contain the specified parameter keys.
  • ValueError: – If min_bp is greater than max_bp.
  • ValueError: – If extract destination is not of type Well.
  • ValueError: – If extract elution volume is not of type Unit
  • ValueError: – if extract elution volume is not greater than 0.
  • RuntimeError: – If gel extract lanes are set for some but not all extract wells.
  • RuntimeError: – If all samples do not fit on single gel type.
  • TypeError: – If lane designated for gel extracts is not an integer.
  • RuntimeError: – If designated lane index is outside lanes within the gel.
  • RuntimeError: – If lanes not designated and number of extracts not equal to number of samples.

Protocol.seal()

Protocol.seal(ref, type=None)

Seal indicated container using the automated plate sealer.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-pcr",
                     storage="warm_37")

p.seal(sample_plate)

Autoprotocol Output:

"instructions": [
    {
      "object": "sample_plate",
      "type": "ultra-clear"
      "op": "seal"
    }
  ]
Parameters:
  • ref (Container) – Container to be sealed
  • type (str) – Seal type to be used, such as “ultra-clear” or “foil”.
Raises:
  • TypeError – If ref is not of type Container.
  • RuntimeError – If container type does not have seal capability.
  • RuntimeError – If seal is not a valid seal type.
  • RuntimeError – If container is already covered with a lid.

Protocol.unseal()

Protocol.unseal(ref)

Remove seal from indicated container using the automated plate unsealer.

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-pcr",
                     storage="warm_37")
# a plate must be sealed to be unsealed
p.seal(sample_plate)

p.unseal(sample_plate)

Autoprotocol Output:

"instructions": [
    {
      "object": "sample_plate",
      "op": "seal",
      "type": "ultra-clear"
    },
    {
      "object": "sample_plate",
      "op": "unseal"
    }
  ]
Parameters:

ref (Container) – Container to be unsealed.

Raises:
  • TypeError – If ref is not of type Container.
  • RuntimeError – If container is covered with a lid not a seal.

Protocol.cover()

Protocol.cover(ref, lid=None)

Place specified lid type on specified container

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")
p.cover(sample_plate, lid="universal")

Autoprotocol Output:

"instructions": [
    {
      "lid": "universal",
      "object": "sample_plate",
      "op": "cover"
    }
  ]
Parameters:
  • ref (Container) – Container to be convered.
  • lid (str, optional) – Type of lid to cover the container. Must be a valid lid type for the container type.
Raises:
  • TypeError – If ref is not of type Container.
  • RuntimeError – If container type does not have cover capability.
  • RuntimeError – If lid is not a valid lid type.
  • RuntimeError – If container is already sealed with a seal.

Protocol.uncover()

Protocol.uncover(ref)

Remove lid from specified container

Example Usage:

p = Protocol()
sample_plate = p.ref("sample_plate",
                     None,
                     "96-flat",
                     storage="warm_37")
# a plate must have a cover to be uncovered
p.cover(sample_plate, lid="universal")

p.uncover(sample_plate)

Autoprotocol Output:

"instructions": [
    {
      "lid": "universal",
      "object": "sample_plate",
      "op": "cover"
    },
    {
      "object": "sample_plate",
      "op": "uncover"
    }
  ]
Parameters:

ref (Container) – Container to remove lid.

Raises:
  • TypeError – If ref is not of type Container.
  • RuntimeError – If container is sealed with a seal not covered with a lid.

Protocol.flow_analyze()

Protocol.flow_analyze(dataref, FSC, SSC, neg_controls, samples, colors=None, pos_controls=None)

Perform flow cytometry. The instruction will be executed within the voltage range specified for each channel, optimized for the best sample separation/distribution that can be achieved within these limits. The vendor will specify the device that this instruction is executed on and which excitation and emission spectra are available. At least one negative control is required, which will be used to define data acquisition parameters as well as to determine any autofluorescent properties for the sample set. Additional negative positive control samples are optional. Positive control samples will be used to optimize single color signals and, if desired, to minimize bleed into other channels.

For each sample this instruction asks you to specify the volume and/or captured_events. Vendors might also require captured_events in case their device does not support volumetric sample intake. If both conditions are supported, the vendor will specify if data will be collected only until the first one is met or until both conditions are fulfilled.

Example Usage:

p = Protocol()
dataref = "test_ref"
FSC = {"voltage_range": {"low": "230:volt", "high": "280:volt"},
       "area": True, "height": True, "weight": False}
SSC = {"voltage_range": {"low": "230:volt", "high": "280:volt"},
       "area": True, "height": True, "weight": False}
neg_controls = {"well": "well0", "volume": "100:microliter",
                "captured_events": 5, "channel": "channel0"}
samples = [
    {"well": "well0", "volume": "100:microliter", "captured_events": 9}]

p.flow_analyze(dataref, FSC, SSC, neg_controls,
               samples, colors=None, pos_controls=None)

Autoprotocol Output:

{
  "channels": {
    "FSC": {
      "voltage_range": {
        "high": "280:volt",
        "low": "230:volt"
      },
      "area": true,
      "height": true,
      "weight": false
    },
    "SSC": {
      "voltage_range": {
        "high": "280:volt",
        "low": "230:volt"
      },
      "area": true,
      "height": true,
      "weight": false
    }
  },
  "op": "flow_analyze",
  "negative_controls": {
    "channel": "channel0",
    "well": "well0",
    "volume": "100:microliter",
    "captured_events": 5
  },
  "dataref": "test_ref",
  "samples": [
    {
      "well": "well0",
      "volume": "100:microliter",
      "captured_events": 9
    }
  ]
}
Parameters:
  • dataref (str) – Name of flow analysis dataset generated.
  • FSC (dict) –

    Dictionary containing FSC channel parameters in the form of:

    {
      "voltage_range": {
        "low": "230:volt",
        "high": "280:volt"
        },
      "area": true,             //default: true
      "height": true,           //default: true
      "weight": false           //default: false
    }
    
  • SSC (dict) –

    Dictionary of SSC channel parameters in the form of:

    {
      "voltage_range": {
        "low": <voltage>,
        "high": <voltage>"
        },
      "area": true,             //default: true
      "height": true,           //default: false
      "weight": false           //default: false
    }
    
  • neg_controls (list of dicts) –

    List of negative control wells in the form of:

    {
        "well": well,
        "volume": volume,
        "captured_events": integer,     // optional, default infinity
        "channel": [channel_name]
    }
    

    at least one negative control is required.

  • samples (list of dicts) –

    List of samples in the form of:

    {
        "well": well,
        "volume": volume,
        "captured_events": integer     // optional, default infinity
    }
    

    at least one sample is required

  • colors (list of dicts, optional) –

    Optional list of colors in the form of:

    [{
      "name": "FitC",
      "emission_wavelength": "495:nanometer",
      "excitation_wavelength": "519:nanometer",
      "voltage_range": {
        "low": <voltage>,
        "high": <voltage>
      },
      "area": true,             //default: true
      "height": false,          //default: false
      "weight": false           //default: false
    }, ... ]
    
  • pos_controls (list of dicts, optional) –

    Optional list of positive control wells in the form of:

    [{
        "well": well,
        "volume": volume,
        "captured_events": integer,     // optional, default infinity
        "channel": [channel_name],
        "minimize_bleed": [{            // optional
          "from": color,
          "to": [color]
        }, ...
    ]
    
Raises:
  • TypeError – If inputs are not of the correct type.
  • UnitError – If unit inputs are not properly formatted.
  • AssertionError – If required parameters are missing.
  • ValueError – If volumes are not correctly formatted or present.

Protocol.oligosynthesize()

Protocol.oligosynthesize(oligos)

Specify a list of oligonucleotides to be synthesized and a destination for each product.

Example Usage:

oligo_1 = p.ref("oligo_1", None, "micro-1.5", discard=True)

p.oligosynthesize([{"sequence": "CATGGTCCCCTGCACAGG",
                    "destination": oligo_1.well(0),
                    "scale": "25nm",
                    "purification": "standard"}])

Autoprotocol Output:

"instructions": [
    {
      "oligos": [
        {
          "destination": "oligo_1/0",
          "sequence": "CATGGTCCCCTGCACAGG",
          "scale": "25nm",
          "purification": "standard"
        }
      ],
      "op": "oligosynthesize"
    }
  ]
Parameters:oligos (list of dicts) –

List of oligonucleotides to synthesize. Each dictionary should contain the oligo’s sequence, destination, scale and purification

[
    {
      "destination": "my_plate/A1",
      "sequence": "GATCRYMKSWHBVDN",
        // - standard IUPAC base codes
        // - IDT also allows rX (RNA), mX (2' O-methyl RNA), and
        //   X*/rX*/mX* (phosphorothioated)
        // - they also allow inline annotations for modifications,
        //   eg "GCGACTC/3Phos/" for a 3' phosphorylation
        //   eg "aggg/iAzideN/cgcgc" for an internal modification
      "scale": "25nm" | "100nm" | "250nm" | "1um",
      "purification": "standard" | "page" | "hplc",
        // default: standard
    },
    ...
]

Protocol.spread()

Protocol.spread(source, dest, volume)

Spread the specified volume of the source aliquot across the surface of the agar contained in the object container

Example Usage:

p = Protocol()

agar_plate = p.ref("agar_plate", None, "1-flat", discard=True)
bact = p.ref("bacteria", None, "micro-1.5", discard=True)

p.spread(bact.well(0), agar_plate.well(0), "55:microliter")

Autoprotocol Output:

{
  "refs": {
    "bacteria": {
      "new": "micro-1.5",
      "discard": true
    },
    "agar_plate": {
      "new": "1-flat",
      "discard": true
    }
  },
  "instructions": [
    {
      "volume": "55.0:microliter",
      "to": "agar_plate/0",
      "from": "bacteria/0",
      "op": "spread"
    }
  ]
}
Parameters:
  • source (Well) – Source of material to spread on agar
  • dest (Well) – Reference to destination location (plate containing agar)
  • volume (str, Unit) – Volume of source material to spread on agar

Protocol.autopick()

Protocol.autopick(sources, dests, min_abort=0, criteria={}, dataref='autopick', newpick=False)

Pick colonies from the agar-containing location(s) specified in sources to the location(s) specified in dests in highest to lowest rank order until there are no more colonies available. If fewer than min_abort pickable colonies have been identified from the location(s) specified in sources, the run will stop and no further instructions will be executed.

Example Usage:

Autoprotocol Output:

Parameters:
  • sources (Well, WellGroup, list of Wells) – Reference wells containing agar and colonies to pick
  • dests (Well, WellGroup, list of Wells) – List of destination(s) for picked colonies
  • criteria (dict) – Dictionary of autopicking criteria.
  • min_abort (int, optional) – Total number of colonies that must be detected in the aggregate list of from wells to avoid aborting the entire run.

Protocol.image_plate()

Protocol.image_plate(ref, mode, dataref)

Capture an image of the specified container.

Example Usage:

p = Protocol()

agar_plate = p.ref("agar_plate", None, "1-flat", discard=True)
bact = p.ref("bacteria", None, "micro-1.5", discard=True)

p.spread(bact.well(0), agar_plate.well(0), "55:microliter")
p.incubate(agar_plate, "warm_37", "18:hour")
p.image_plate(agar_plate, mode="top", dataref="my_plate_image_1")

Autoprotocol Output:

{
  "refs": {
    "bacteria": {
      "new": "micro-1.5",
      "discard": true
    },
    "agar_plate": {
      "new": "1-flat",
      "discard": true
    }
  },
  "instructions": [
    {
      "volume": "55.0:microliter",
      "to": "agar_plate/0",
      "from": "bacteria/0",
      "op": "spread"
    },
    {
      "where": "warm_37",
      "object": "agar_plate",
      "co2_percent": 0,
      "duration": "18:hour",
      "shaking": false,
      "op": "incubate"
    },
    {
      "dataref": "my_plate_image_1",
      "object": "agar_plate",
      "mode": "top",
      "op": "image_plate"
    }
  ]
}
Parameters:
  • ref (str, Container) – Container to take image of
  • mode (str) – Imaging mode (currently supported: “top”)
  • dataref (str) – Name of data reference of resulting image

Protocol.provision()

Protocol.provision(resource_id, dests, volumes)

Provision a commercial resource from a catalog into the specified destination well(s). A new tip is used for each destination well specified to avoid contamination.

Parameters:
  • resource_id (str) – Resource ID from catalog.
  • dests (Well, WellGroup, list of Wells) – Destination(s) for specified resource.
  • volumes (str, Unit, list of str, list of Unit) – Volume(s) to transfer of the resource to each destination well. If one volume of specified, each destination well recieve that volume of the resource. If destinations should recieve different volumes, each one should be specified explicitly in a list matching the order of the specified destinations.
Raises:
  • TypeError – If resource_id is not a string.
  • RuntimeError – If length of the list of volumes specified does not match the number of destination wells specified.
  • TypeError – If volume is not specified as a string or Unit (or a list of either)

Protocol.flash_freeze()

Protocol.flash_freeze(container, duration)

Flash freeze the contents of the specified container by submerging it in liquid nitrogen for the specified amount of time.

Example Usage:

p = Protocol()

sample = p.ref("liquid_sample", None, "micro-1.5", discard=True)
p.flash_freeze(sample, "25:second")

Autoprotocol Output:

{
  "refs": {
    "liquid_sample": {
      "new": "micro-1.5",
      "discard": true
    }
  },
  "instructions": [
    {
      "duration": "25:second",
      "object": "liquid_sample",
      "op": "flash_freeze"
    }
  ]
}
Parameters:
  • container (Container, str) – Container to be flash frozen.
  • duration (str, Unit) – Duration to submerge specified container in liquid nitrogen.

Protocol.mag_incubate()

Protocol.mag_incubate(head, container, duration, magnetize=False, tip_position=1.5, temperature=None, new_tip=False, new_instruction=False)

Incubate the container for a set time with tips set at tip_position.

Example Usage:

p = Protocol()
plate = p.ref("plate_0", None, "96-pcr", storage="cold_20")

p.mag_incubate("96-pcr", plate, "30:minute", magnetize=False,
               tip_position=1.5, temperature=None, new_tip=False)

Autoprotocol Output:

"instructions": [
    {
      "groups": [
        [
          {
            "incubate": {
              "duration": "30:minute",
              "tip_position": 1.5,
              "object": "plate_0",
              "magnetize": false,
              "temperature": null
            }
          }
        ]
      ],
      "magnetic_head": "96-pcr",
      "op": "magnetic_transfer"
    }
  ]
Parameters:
  • head (str) – Magnetic head to use for the magnetic bead transfers
  • container (Container) – Container to incubate beads
  • duration (str, Unit) – Time for incubation
  • magnetize (bool) – Specify whether to magnetize the tips
  • tip_position (float) – Position relative to well height that tips are held
  • temperature (str, Unit) – Temperature heat block is set at
  • new_tip (bool) – Specify whether to use a new tip to complete the step
  • new_instruction (bool) – Specify whether to create a new magnetic_transfer instruction

Protocol.mag_collect()

Protocol.mag_collect(head, container, cycles, pause_duration, bottom_position=0.0, temperature=None, new_tip=False, new_instruction=False)

Collect beads from a container by cycling magnetized tips in and out of the container with an optional pause at the bottom of the insertion.

Example Usage:

p = Protocol()
plate = p.ref("plate_0", None, "96-pcr", storage="cold_20")

p.mag_collect("96-pcr", plate, 5, "30:second", bottom_position=
              0.0, temperature=None, new_tip=False,
              new_instruction=False)

Autoprotocol Output:

"instructions": [
    {
      "groups": [
        [
          {
            "collect": {
              "bottom_position": 0.0,
              "object": "plate_0",
              "temperature": null,
              "cycles": 5,
              "pause_duration": "30:second"
            }
          }
        ]
      ],
      "magnetic_head": "96-pcr",
      "op": "magnetic_transfer"
    }
  ]
Parameters:
  • head (str) – Magnetic head to use for the magnetic bead transfers
  • container (Container) – Container to incubate beads
  • cycles (int) – Number of cycles to raise and lower tips
  • pause_duration (str, Unit) – Time tips are paused in bottom position each cycle
  • bottom_position (float) – Position relative to well height that tips are held during pause
  • temperature (str, Unit) – Temperature heat block is set at
  • new_tip (bool) – Specify whether to use a new tip to complete the step
  • new_instruction (bool) – Specify whether to create a new magnetic_transfer instruction

Protocol.mag_dry()

Protocol.mag_dry(head, container, duration, new_tip=False, new_instruction=False)

Dry beads with magnetized tips above and outside a container for a set time.

Example Usage:

p = Protocol()
plate = p.ref("plate_0", None, "96-pcr", storage="cold_20")

p.mag_dry("96-pcr", plate, "30:minute", new_tip=False,
          new_instruction=False)

Autoprotocol Output:

"instructions": [
    {
      "groups": [
        [
          {
            "dry": {
              "duration": "30:minute",
              "object": "plate_0"
            }
          }
        ]
      ],
      "magnetic_head": "96-pcr",
      "op": "magnetic_transfer"
    }
  ]
Parameters:
  • head (str) – Magnetic head to use for the magnetic bead transfers
  • container (Container) – Container to dry beads above
  • duration (str, Unit) – Time for drying
  • new_tip (bool) – Specify whether to use a new tip to complete the step
  • new_instruction (bool) – Specify whether to create a new magnetic_transfer instruction

Protocol.mag_mix()

Protocol.mag_mix(head, container, duration, frequency, center=0.5, amplitude=0.5, magnetize=False, temperature=None, new_tip=False, new_instruction=False)

Mix beads in a container by cycling tips in and out of the container.

Example Usage:

p = Protocol()
plate = p.ref("plate_0", None, "96-pcr", storage="cold_20")

p.mag_mix("96-pcr", plate, "30:second", "60:hertz", center=0.75,
          amplitude=0.25, magnetize=True, temperature=None,
          new_tip=False, new_instruction=False)

Autoprotocol Output:

"instructions": [
    {
      "groups": [
        [
          {
            "mix": {
              "center": 0.75,
              "object": "plate_0",
              "frequency": "2:hertz",
              "amplitude": 0.25,
              "duration": "30:second",
              "magnetize": true,
              "temperature": null
            }
          }
        ]
      ],
      "magnetic_head": "96-pcr",
      "op": "magnetic_transfer"
    }
  ]
Parameters:
  • head (str) – Magnetic head to use for the magnetic bead transfers
  • container (Container) – Container to incubate beads
  • duration (str, Unit) – Total time for this sub-operation
  • frequency (str, Unit) – Cycles per second (hertz) that tips are raised and lowered
  • center (float) – Position relative to well height where oscillation is centered
  • amplitude (float) – Distance relative to well height to oscillate around “center”
  • magnetize (bool) – Specify whether to magnetize the tips
  • temperature (str, Unit) – Temperature heat block is set at
  • new_tip (bool) – Specify whether to use a new tip to complete the step
  • new_instruction (bool) – Specify whether to create a new magnetic_transfer instruction

Protocol.mag_release()

Protocol.mag_release(head, container, duration, frequency, center=0.5, amplitude=0.5, temperature=None, new_tip=False, new_instruction=False)

Release beads into a container by cycling tips in and out of the container with tips unmagnetized.

Example Usage:

p = Protocol()
plate = p.ref("plate_0", None, "96-pcr", storage="cold_20")

p.mag_release("96-pcr", plate, "30:second", "60:hertz", center=0.75,
              amplitude=0.25, temperature=None, new_tip=False,
              new_instruction=False)

Autoprotocol Output:

"instructions": [
    {
      "groups": [
        [
          {
            "release": {
              "center": 0.75,
              "object": "plate_0",
              "frequency": "2:hertz",
              "amplitude": 0.25,
              "duration": "30:second",
              "temperature": null
            }
          }
        ]
      ],
      "magnetic_head": "96-pcr",
      "op": "magnetic_transfer"
    }
  ]
Parameters:
  • head (str) – Magnetic head to use for the magnetic bead transfers
  • container (Container) – Container to incubate beads
  • duration (str, Unit) – Total time for this sub-operation
  • frequency (str, Unit) – Cycles per second (hertz) that tips are raised and lowered
  • center (float) – Position relative to well height where oscillation is centered
  • amplitude (float) – Distance relative to well height to oscillate around “center”
  • temperature (str, Unit) – Temperature heat block is set at
  • new_tip (bool) – Specify whether to use a new tip to complete the step
  • new_instruction (bool) – Specify whether to create a new magnetic_transfer instruction

Protocol.measure_concentration()

Protocol.measure_concentration(wells, dataref, measurement, volume='2:microliter')

Measure the concentration of DNA, ssDNA, RNA or protein in the specified volume of the source aliquots.

Example Usage:

p = Protocol()

test_plate = p.ref("test_plate", id=None, cont_type="96-flat",
    storage=None, discard=True)
p.measure_concentration(test_plate.wells_from(0, 3), "mc_test",
    "DNA")
p.measure_concentration(test_plate.wells_from(3, 3),
    dataref="mc_test2", measurement="protein",
    volume="4:microliter")

Autoprotocol Output:

{
  "refs": {
    "test_plate": {
      "new": "96-flat",
      "discard": true
    }
  },
  "instructions": [
     {
        "volume": "2.0:microliter",
        "dataref": "mc_test",
        "object": [
            "test_plate/0",
            "test_plate/1",
            "test_plate/2"
        ],
        "op": "measure_concentration",
        "measurement": "DNA"
    },
    ...
  ]
}
Parameters:
  • wells (list, WellGroup, Well) – WellGroup of wells to be measured
  • volume (str, Unit) – Volume of sample required for analysis
  • dataref (str) – Name of this specific dataset of measurements
  • measurement (str) – Class of material to be measured. One of [“DNA”, “ssDNA”, “RNA”, “protein”].

Protocol.measure_mass()

Protocol.measure_mass(containers, dataref)

Measure the mass of a list of containers.

Example Usage:

p = Protocol()

test_plate = p.ref("test_plate", id=None, cont_type="96-flat",
    storage=None, discard=True)
p.measure_mass([test_plate], "test_data")

Autoprotocol Output:

{
  "refs": {
    "test_plate": {
      "new": "96-flat",
      "discard": true
    }
  },
  "instructions": [
     {
        "dataref": "test_data",
        "object": [
            "test_plate
        ],
        "op": "measure_mass"
      }
  ]
}
Parameters:
  • containers (list, Container) – list of containers to be measured
  • dataref (str) – Name of this specific dataset of measurements

Protocol.measure_volume()

Protocol.measure_volume(wells, dataref)

Measure the volume of each well in wells.

Example Usage:

p = Protocol()

test_plate = p.ref("test_plate", id=None, cont_type="96-flat",
    storage=None, discard=True)
p.measure_volume(test_plate.from_wells(0,2), "test_data")

Autoprotocol Output:

{
  "refs": {
    "test_plate": {
      "new": "96-flat",
      "discard": true
    }
  },
  "instructions": [
     {
        "dataref": "test_data",
        "object": [
            "test_plate/0",
            "test_plate/1"
        ],
        "op": "measure_volume"
      }
  ]
}
Parameters:
  • wells (list, well, WellGroup) – list of wells to be measured
  • dataref (str) – Name of this specific dataset of measurements

protocol.Ref

class autoprotocol.protocol.Ref(name, opts, container)

Link a ref name (string) to a Container instance.