Jul-24-2017, 05:58 PM
(This post was last modified: Jul-24-2017, 05:58 PM by KatherineHov.)
I'm new to coding, but I've taken on a project to write a python code that generates plating for PCR set up.
At my lab we use a machine called OpenTrons hood and within it through python you can program protocols. This part is generally straightforward. Below is one code I set up for a PCR set up:
What I want to do though, is set up a code that allows you to enter in a number of mastermixes, a number of cDNA samples, and generates the plating for you (as you can see it dictates exactly what plate to transport liquid into in the code).
Here is what I want the code to do:
1. Assign mastermix to the x or y axis
The plate has rows A-H (y) and columns (1-12) (x). Assign mastermix to any number of rows or columns
I.e. say we had 3 mastermixes we could arrange it as
Mastermix 1 (A)
Mastermix 2 (B)... and so on
2. Assign cDNA & water to the remaining axis
Say we were testing 3 cDNA samples and we wanted to preform this test twice it would look something like this...
cDNA 1 (1-2)
cDNA 2 (3-4)
cDNA 3 (5-6)
then water for our negatives
water (7-8)
The code would then generate the plating for you.
In the code you might also notice tubing - there is a tube rack where we aspirate liquid from and it (will have) default set up as
A1 - Ax for mastermix
B1 - Bx for cDNA
C1 - water
I'm very new to coding and I was wondering how I could first approach creating this code.
**in the code I posted water is B4 but I will move it to C1 for simplicity
At my lab we use a machine called OpenTrons hood and within it through python you can program protocols. This part is generally straightforward. Below is one code I set up for a PCR set up:
from opentrons import robot, containers, instruments robot.head_speed(x=3000, y=3000, z=800, a=300, b=300) # containers plate = containers.load('96-PCR-short', 'D1', 'plate') tube_rack = containers.load('tube-rack-.75ml', 'C1', 'tube_rack') # a tip rack for our pipette p10rack = containers.load('tiprack-10ul', 'B1', 'tiprack') trash = containers.load('point', 'A1', 'trash' ) # p10 pipette on robot axis A p10 = instruments.Pipette( trash_container=trash, name="p10", axis= "a", min_volume=1, max_volume=10, tip_racks=[p10rack] ) # simple, atomic commands to control fine details p10.pick_up_tip() p10.transfer( 6, tube_rack.wells('A1'), plate.wells('A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'C1', 'C2', 'C3', 'G1', 'G2', 'G3'), blow_out=True ) p10.transfer( 6, tube_rack.wells('A2'), plate.wells('D1', 'D2', 'D3', 'E1', 'E2', 'E3', 'F1', 'F2', 'F3', 'H1', 'H2', 'H3'), blow_out=True ) p10.transfer( 4, tube_rack.wells('B1'), plate.wells('A1', 'B1', 'C1', 'D1', 'E1', 'F1'), blow_out=True ) p10.transfer( 4, tube_rack.wells('B2'), plate.wells('A2', 'B2', 'C2', 'D2', 'E2', 'F2'), blow_out=True ) p10.transfer( 4, tube_rack.wells('B3'), plate.wells('A3', 'B3', 'C3', 'D3', 'E3', 'F3',), blow_out=True ) p10.transfer( 4, tube_rack.wells('B4'), plate.wells('G1', 'G2', 'G3', 'H1', 'H2', 'H3',), blow_out=True )What this code does is first it pipettes different master mixes (liquid) into a certain amount of holes (wells). Then, it transfer another liquid (cDNA samples) into certain wells to test each mastermix against each cDNA sample 3 times. Lastly, it transfers water into 3 wells for each mastermix as a negative. The code above is for 2 mastermixes and 3 samples of cDNA and preforms this trice.
What I want to do though, is set up a code that allows you to enter in a number of mastermixes, a number of cDNA samples, and generates the plating for you (as you can see it dictates exactly what plate to transport liquid into in the code).
Here is what I want the code to do:
1. Assign mastermix to the x or y axis
The plate has rows A-H (y) and columns (1-12) (x). Assign mastermix to any number of rows or columns
I.e. say we had 3 mastermixes we could arrange it as
Mastermix 1 (A)
Mastermix 2 (B)... and so on
2. Assign cDNA & water to the remaining axis
Say we were testing 3 cDNA samples and we wanted to preform this test twice it would look something like this...
cDNA 1 (1-2)
cDNA 2 (3-4)
cDNA 3 (5-6)
then water for our negatives
water (7-8)
The code would then generate the plating for you.
In the code you might also notice tubing - there is a tube rack where we aspirate liquid from and it (will have) default set up as
A1 - Ax for mastermix
B1 - Bx for cDNA
C1 - water
I'm very new to coding and I was wondering how I could first approach creating this code.
**in the code I posted water is B4 but I will move it to C1 for simplicity