Week 3 HW: Lab Automation

Assignment no. 1: Python Script for Opentrons Artwork

The code used was the following to create a simple swirl pattenr with four different colors:

from opentrons import types
import math

metadata = {
    'author': 'Jean Colmenares',
    'protocolName': 'Agar Swirl Pattern - 4 Colors',
    'description': 'Swirl pattern with four colors per branch',
    'source': 'HTGAA 2026 Opentrons Lab',
    'apiLevel': '2.20'
}

TIP_RACK_DECK_SLOT = 9
COLORS_DECK_SLOT = 6
AGAR_DECK_SLOT = 5
PIPETTE_STARTING_TIP_WELL = 'A1'

well_colors = {
    'A1': 'Red',
    'B1': 'Green',
    'C1': 'Orange',
    'D1': 'Blue'
}

def run(protocol):

    tips_20ul = protocol.load_labware(
        'opentrons_96_tiprack_20ul',
        TIP_RACK_DECK_SLOT,
        'Opentrons 20uL Tips'
    )

    pipette_20ul = protocol.load_instrument(
        "p20_single_gen2",
        "right",
        [tips_20ul]
    )

    temperature_module = protocol.load_module(
        'temperature module gen2',
        COLORS_DECK_SLOT
    )

    temperature_plate = temperature_module.load_labware(
        'opentrons_96_aluminumblock_generic_pcr_strip_200ul',
        'Cold Plate'
    )

    color_plate = temperature_plate

    agar_plate = protocol.load_labware(
        'htgaa_agar_plate',
        AGAR_DECK_SLOT,
        'Agar Plate'
    )

    center_location = agar_plate['A1'].top()

    pipette_20ul.starting_tip = tips_20ul.well(PIPETTE_STARTING_TIP_WELL)

    # ------------------------------------------------------------------
    # Helper functions
    # ------------------------------------------------------------------

    def location_of_color(color_string):
        for well, color in well_colors.items():
            if color.lower() == color_string.lower():
                return color_plate[well]
        raise ValueError(f"No well found with color {color_string}")

    def dispense_and_detach(pipette, volume, location):
        above_location = location.move(types.Point(z=location.point.z + 5))
        pipette.move_to(above_location)
        pipette.dispense(volume, location)
        pipette.move_to(above_location)

     # ------------------------------------------------------------------
    # SWIRL PATTERN — BIG + FIXED COLOR PER BRANCH (P20 SAFE)
    # ------------------------------------------------------------------

    DROP_VOLUME = 3

    branches = 4
    points_per_branch = 24

    radius_start = 3
    radius_step = 1.6
    angle_step = math.pi/9

    branch_colors = ['Red', 'Green', 'Orange', 'Blue']

    for branch in range(branches):

        base_angle = branch * (2*math.pi/branches)
        color = branch_colors[branch]
        source = location_of_color(color)

        for i in range(points_per_branch):

            pipette_20ul.pick_up_tip()

            pipette_20ul.aspirate(DROP_VOLUME, source.bottom(1))

            angle = base_angle + i * angle_step
            radius = radius_start + i * radius_step

            x = radius * math.cos(angle)
            y = radius * math.sin(angle)

            loc = center_location.move(types.Point(x=x, y=y, z=0))
            dispense_and_detach(pipette_20ul, DROP_VOLUME, loc)

            pipette_20ul.drop_tip()

The pattern is shown below:

Assignment no.2: Find and describe a published paper that utilizes the Opentrons or an automation tool to achieve novel biological applications.

Automated Strain Construction for Biosynthetic Pathway Screening in Yeast Astolfi et al., 2025

In this study, the researchers programmed a Hamilton Microlab VANTAGE liquid-handling robot (a high-end automation platform, not an Opentrons) to integrate with additional on- and off-deck hardware (e.g., thermocyclers, plate sealers, colony pickers) via its central arm. Together with custom software and a user interface developed in the Hamilton VENUS environment, this system automated key steps in yeast strain construction such as transformation setup, heat-shock, washing, and plating.

This automated workflow achieved a throughput of up to ~2,000 transformations per week, enabling high-throughput construction and screening of libraries of engineered yeast strains. As a proof of concept, the team applied the system to screen gene variants within a biosynthetic pathway for the plant alkaloid precursor verazine. They identified several genes that significantly increased pathway product titers, demonstrating the utility of automated strain construction for rapid pathway discovery and optimization.

Assignment no. 3: Write a description about what you intend to do with automation tools for your final project. You may include example pseudocode, Python scripts, 3D printed holders, a plan for how to use Ginkgo Nebula, and more. You may reference this week’s recitation slide deck for lab automation details.

For my final project, I would like to use automation tools to optimize dye biodegradation using Bacillus subtilis. A liquid-handling robot such as the Opentrons OT-2 could automate pipetting, sample preparation, and serial dilutions to test different enzyme and dye concentrations efficiently.

The system could be used to prepare multiple reactions in 96-well plates and measure dye degradation through absorbance readings. Automation would improve reproducibility, reduce human error, and increase experimental throughput.

Simple Python scripts could also be used to organize experimental data and calculate degradation efficiency automatically.

for enzyme_concentration in concentrations:
    add_samples()
    incubate()
    measure_absorbance()

Additionally, Ginkgo Nebula could be used for DNA construct design and sequence analysis related to enzyme production in Bacillus subtilis.

05/17: Since the idea was changed, the description is written below:

For my final project, I would like to use automation tools to optimize the expression and testing of the LigA protein in Escherichia coli. A liquid-handling robot such as the Opentrons OT-2 could automate pipetting steps, preparation of cultures, and testing of different expression conditions such as inducer concentration, temperature, and media composition.

Automation would allow faster screening of conditions that improve protein production and interaction studies with the designed peptide.