Jul-27-2017, 01:22 AM
Thanks! Using that I tried it out for cDNA, and I've gotten really close but I haven't been quite able to hit the desired effect with modifying the line.
Do you know where I went wrong?
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 = 2 # 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 * N_cDNA target = "{}".format(wells) targets.append(target) transfer( 6, mm, targets ) for i, cd in enumerate(cDNA_sources): #list of targets for cDNA targets = # loop over the number of mastermixes then loop over the number of tests for j in range(N_mm): for k in range(replicates): wells = i + 1 + j * replicates + k target = "{}".format(wells) targets.append(target) transfer( 4, cd, targets )For the output I get close - but not quite
Transfering 6ul from A1 to ['1', '2', '3', '4'] Transfering 6ul from A2 to ['5', '6', '7', '8'] Transfering 4ul from B1 to ['1', '2', '3', '4'] Transfering 4ul from B2 to ['2', '3', '4', '5']The numbers repeat except for one. I don't think the equation needs to be shifted (adding numbers) but I was wondering what I should consider multiplying if that makes sense?
Do you know where I went wrong?