Jul-25-2017, 04:13 PM
Firstly, thank you SO much for your help! This has been amazing. I've been looking over the code though, and I had a few questions about adjustments I could make- here's what I wrote it as
def transfer(p_amount, p_source, p_target):
print("Transfering {:>10}ul from {} to {}".format(p_amount, p_source, p_target))
mastermix_sources = ['A1', 'A2' ]
cDNA_sources = ['B1', 'B2', 'B3', 'B4' ]
for i, mm in enumerate(mastermix_sources):
#list of targets for mastermix
targets =list("{}{}".format(chr(65+i), j+1) for j in range(len(cDNA_sources)))
transfer(
6,
mm,
targets
)
for i, mm in enumerate(cDNA_sources):
#list of targets for mastermix
targets =list("{}{}".format(chr(63+i), j+1) for j in range(len(mastermix_sources)))
transfer(
4,
mm,
targets
)
Sometimes we run the test twice or thrice so we need the mastermix to dispense into more wells. For example, if we had 3 mastermixes and 2 cDNA samples we would have
3 x 2 = 6 platings of mastermix, but if we wanted to preform it double it would be 12 (x2). How could I incorporate a double or triple feature into the code?
I also tried to copy what you did with the first part with mastermix and apply it to cDNA because first we dispense mastermix and then we dispense cDNA - do you know where I went wrong? The output I got was
Transfering 6ul from A1 to ['A1', 'A2', 'A3', 'A4']
Transfering 6ul from A2 to ['B1', 'B2', 'B3', 'B4']
Transfering 4ul from B4 to ['B1', 'B2']
And so the first part with mastermixes worked great - but not the part I did with cDNA. For cDNA In this case with 2 mastermixes and 4 cDNA samples I would want it to dispense
from B1 into (on the wells of a plate) into A1, B1
from B2 into (on the wells of a plate) into A2, B2 and so on (assuming we wanted to run the experiment just once, not twice or thrice.
Thank you for all your help!
def transfer(p_amount, p_source, p_target):
print("Transfering {:>10}ul from {} to {}".format(p_amount, p_source, p_target))
mastermix_sources = ['A1', 'A2' ]
cDNA_sources = ['B1', 'B2', 'B3', 'B4' ]
for i, mm in enumerate(mastermix_sources):
#list of targets for mastermix
targets =list("{}{}".format(chr(65+i), j+1) for j in range(len(cDNA_sources)))
transfer(
6,
mm,
targets
)
for i, mm in enumerate(cDNA_sources):
#list of targets for mastermix
targets =list("{}{}".format(chr(63+i), j+1) for j in range(len(mastermix_sources)))
transfer(
4,
mm,
targets
)
Sometimes we run the test twice or thrice so we need the mastermix to dispense into more wells. For example, if we had 3 mastermixes and 2 cDNA samples we would have
3 x 2 = 6 platings of mastermix, but if we wanted to preform it double it would be 12 (x2). How could I incorporate a double or triple feature into the code?
I also tried to copy what you did with the first part with mastermix and apply it to cDNA because first we dispense mastermix and then we dispense cDNA - do you know where I went wrong? The output I got was
Transfering 6ul from A1 to ['A1', 'A2', 'A3', 'A4']
Transfering 6ul from A2 to ['B1', 'B2', 'B3', 'B4']
Transfering 4ul from B4 to ['B1', 'B2']
And so the first part with mastermixes worked great - but not the part I did with cDNA. For cDNA In this case with 2 mastermixes and 4 cDNA samples I would want it to dispense
from B1 into (on the wells of a plate) into A1, B1
from B2 into (on the wells of a plate) into A2, B2 and so on (assuming we wanted to run the experiment just once, not twice or thrice.
Thank you for all your help!