Week 3 HW: Lab Automation

Python Script for Opentrons Artwork

Exploring the Spiral of Ouro.

  1. Artistic Concept and Motivation

For this week’s assignment, I developed a “Spiral of Ouro.” This design is based on phyllotaxis principles, using the Golden Angle to distribute points across a 96-well plate. This choice reflects the core philosophy of my project: using mathematical and computational frameworks to simplify biological design. By translating natural patterns into a functional robotic protocols.

  1. Technical Implementation

The implementation uses a Python script for the Opentrons liquid handling robot. Instead of manual plotting, I developed an algorithmic approach to calculate Cartesian coordinates for the ninety-six wells. The script utilizes the simulate module to ensure precise movement. This methodology aligns with my goal of creating high-fidelity digital blueprints that can be shared globally, reducing the need for expensive proprietary software and making advanced laboratory automation more accessible to researchers in low-resource settings.

  1. Python Protocol Code

Below is the complete protocol used to generate the spiral. It includes the necessary metadata and the mathematical loop that defines the dispensing pattern.

import math
import matplotlib.pyplot as plt
import numpy as np
from opentrons import simulate

metadata = {
    'protocolName': 'Spiral of Ouro - Environmental SynBio Design',
    'author': 'Zaira Fabiola Guzman',
    'description': 'An algorithmic design for environmental ideation and accessible biotechnology.',
    'apiLevel': '2.13'
}

# Initial setup of the simulator and canvas
protocol = simulate.get_protocol_api('2.13')
plate = protocol.load_labware('corning_96_wellplate_360ul_flat', '1')

# Parameters for the Spiral of Ouro
n_points = 96
golden_angle = 137.508 * (math.pi / 180)
scale_factor = 3.5 
x_coords = []
y_coords = []

# Coordinate generation and movement simulation
for i in range(n_points):
    r = scale_factor * math.sqrt(i)
    theta = i * golden_angle
    x = r * math.cos(theta)
    y = r * math.sin(theta)
    x_coords.append(x)
    y_coords.append(y)
    well = plate.wells()[i]
    protocol.comment(f"Moving to spiral coordinate {i}: ({x:.2f}, {y:.2f})")

# Visualization block for Colab
plt.figure(figsize=(7, 7))
for well in plate.wells():
    plt.plot(well.geometry.position.x, well.geometry.position.y, 'ko', fillstyle='none', alpha=0.1)
plt.scatter(x_coords, y_coords, c=range(n_points), cmap='magma', s=100, edgecolors='white')
plt.title("Artistic Visualization: Spiral of Ouro")
plt.axis('equal')
plt.show()

Post-Lab Questions

Lab Automation and Biological Design

Part 1: Published Paper on Automation Tool

The paper titled “A low-cost, open-source Turbidostat design for in-vivo control experiments in Synthetic Biology” by Guarino et al.(2019) describes the design and implementation of an open-source, highly flexible turbidostat built with 3D printed parts and controlled by an Arduino board. This automation tool continuously monitors the optical density of a bacterial culture using an LED and photodiode circuit, and it autonomously triggers custom 3D-printed syringe or peristaltic pumps to inject fresh media when required.

The authors propose using this automated, modular machine for multicellular control experiments. In this novel application, the automation hardware is extended to connect two different culture chambers separated by a nanoporous membrane. This setup allows two distinct bacterial populations to be physically separated while exchanging sensing molecules, automating the precise maintenance of specific population ratios for synthetic microbial consortia.

Part 2: Final Project Automation Plan

I will automate the translation of the conceptual biological design into an executable liquid-handling script. Currently, a researcher must manually translate a metabolic pathway design into a step-by-step pipetting protocol. I will program my Python tool so that, once the AI and database search finalize the parts for a cell-free system (e.g., specific enzymes for plastic degradation), the software automatically generates and outputs a ready-to-run Opentrons Python script or a JSON payload formatted for Ginkgo Nebula’s cloud laboratory.

Part 2: Final Project Automation Plan

I will automate the translation of the conceptual biological design into an executable liquid-handling script. Currently, a researcher must manually translate a metabolic pathway design into a step-by-step pipetting protocol. I will program my Python tool so that, once the AI and database search finalize the parts for a cell-free system (e.g., specific enzymes for plastic degradation), the software automatically generates and outputs a ready-to-run Opentrons Python script or a JSON payload formatted for Ginkgo Nebula’s cloud laboratory.

import json
from opentrons import protocol_api

# AUTOMATICALLY GENERATED BY BIOCIRCULAR DESIGN TOOL
# Target: Ginkgo Nebula / Opentrons OT-2 Cloud Lab
# Design: Cell-free PET Degradation Pathway

metadata = {
    'protocolName': 'Automated Cell-Free Assembly',
    'author': 'BioCircular Tool Compiler',
    'description': 'Automated liquid handling protocol for testing a computationally designed cell-free system.',
    'apiLevel': '2.13'
}

def run(protocol: protocol_api.ProtocolContext):
    # The tool automatically calculated these volumes based on the DB sequence size
    reaction_setup = {
        'cell_free_extract': 15.0, 
        'enzyme_A_DNA': 3.5,       
        'enzyme_B_DNA': 4.2,       
        'buffer_solution': 7.3     
    }
    
    # Labware setup
    plate = protocol.load_labware('corning_96_wellplate_360ul_flat', '1')
    tuberack = protocol.load_labware('opentrons_24_tuberack', '2')
    pipette = protocol.load_instrument('p300_single_gen2', 'left')
    
    # Automated dispensing steps compiled by the in-silico tool
    protocol.comment("Initiating automated cell-free assembly based on digital design.")
    
    pipette.transfer(reaction_setup['cell_free_extract'], tuberack['A1'], plate['A1'])
    pipette.transfer(reaction_setup['enzyme_A_DNA'], tuberack['B1'], plate['A1'])
    pipette.transfer(reaction_setup['enzyme_B_DNA'], tuberack['C1'], plate['A1'])
    pipette.transfer(reaction_setup['buffer_solution'], tuberack['D1'], plate['A1'])
    
    pipette.mix(3, 20, plate['A1'])
    protocol.comment("Assembly complete. Ready for incubation and reading.")