Jul-26-2017, 05:15 PM
Thank you for the dictionary. It was able to translate wells (A1) to their number (1) but I had trouble adding it into my code to convert the A1 coordinates to numbers. So, I tried out another thing.
I thought that maybe I could combine the rows/columns and create just one 'wells' as the target like this:
Here's the output-
I thought that maybe I could combine the rows/columns and create just one 'wells' as the target like this:
def transfer(p_amount, p_source, p_target): print("Transfering {:>5}ul from {} to {}".format(p_amount, p_source, p_target)) # number of mastermixes N_mm = 3 # number of cDNA samples N_cDNA = 2 # number of tests to run on each sample replicates = 2 mastermix_sources = list("A{}".format(j+1) for j in range(N_mm)) cDNA_sources = list("B{}".format(j+1) for j in range(N_cDNA)) for i, mm in enumerate(mastermix_sources): #list of targets for mastermix targets = for j in range(N_cDNA * replicates): wells = j + 1 + i*replicates target = "{}".format(wells) targets.append(target) transfer( 6, mm, targets )I did some fiddling around and it spits out the right numbers in ascending order (for the first half - haven't touched the cDNA portion yet) but it repeats numbers. Is there a way to restrict repeating numbers. I tried some if commands but I kept getting syntax errors.
Here's the output-
Transfering 6ul from A1 to ['1', '2', '3', '4'] Transfering 6ul from A2 to ['3', '4', '5', '6'] Transfering 6ul from A3 to ['5', '6', '7', '8']