Opentrons plate art

For this homework, the objective was to design python code that could be used with an Opentrons robot, in order to create a specific pattern, made of fluorescent bacteria, onto a black agar plate.

The key elements to take into account were avoiding waste of equipment and materials, such as pipette tips or bacterial culture.

The original code was present in the HTGAA colab notebook: https://colab.research.google.com/drive/1VoouRH0nqlk09g50rHxOElaLD-SVknYY

Several elements of the code needed to be left unmodified, in order for the whole to work. These included the setting up of the environment on the Colab space, setting up the robot, and define the different elements of labware.

From this example code, the display showed an array of 4 x 4 dots made from the fluorescent green bacteria.

<aside> 💡

In this example, we will create an array of dots, and streak the last dot using move_to

Aspirate

pipette_20ul.pick_up_tip()

pipette_20ul.aspirate(16, location_of_color('Green'))

Pattern a 1uL dot array

for i in range(4):

for j in range(4):

Get a location i5 mm right, j5 mm up from the center of the plate.

adjusted_location = center_location.move(types.Point(x=i5, y=j5))

dispense_and_jog(pipette_20ul, 1, adjusted_location)

Clean up!

pipette_20ul.drop_tip()

</aside>

=== VOLUME TOTALS BY COLOR ===
	Green:		 aspirated 16	 dispensed 16
	[all colors]:	[aspirated 16]	[dispensed 16]

=== TIP COUNT ===
	 Used 1 tip(s)  (ideally exactly one per unique color)
	 

image.png

Changing elements in there would modify the size of the array in different ways.

So, from that point, I tried different determining what made the different positions or the location of the array. I wanted to set up a specific shape, but I did not know the mathematical formula to create it, so using the ChatGPT LM, I arrived at an initial code.

My idea was making a leaf shape, but I ended up deciding against it, and just chose a tear shape.

This was the suggested mathematical expression:

x=a⋅sin(t)⋅(1−cos(t))

y=b⋅cos⁡(t)

y=b⋅cos(t)

It is important to remember that in order for mathematical expressions such as these to work, we need to previously import the “math” module (Command is import math in the console)

However, this only created half of the shape, so I needed to mirror the dots in the code.

This was just one of the issues the provided code had, along with some aspiration issues, or at times, the picking of a tip while a tip was already present in the pipette.