trp=TRP() if iteration==0: trp.addTemplates(input,stockconc=10.0/6.0,units="x",plate=Experiment.EPPENDORFS) # Add a template else: reagents=Sample.getAllOnPlate(Experiment.REAGENTPLATE)+Sample.getAllOnPlate(Experiment.EPPENDORFS) for r in reagents: if r.volume<=0: r.initvolume=-r.volume+r.plate.unusableVolume Sample.clearall() t71master=["%s.MT"%s for s in srcs] trp.runT7Setup(theo=False,src=srcs,tgt=t71master,vol=len(timepoints)*12.2+15,srcdil=10.0/6) t71=[]; for i in range(len(timepoints)): t71=t71+trp.saveSamps(src=t71master,tgt=["%s.T%d"%(s,timepoints[i]) for s in srcs],vol=10,dil=1,plate=trp.e.SAMPLEPLATE) # Stop one sample immediately for a zero timepoint trp.runT7Stop(theo=False,vol=10, tgt=t71[0:len(srcs)],stopmaster=stop) trp.runT7Pgm(vol=10,dur=timepoints[-1]) for s in findsamps(t71[len(srcs):]): s.volume=s.volume+10 # Program doesn't know that they were diluted 2x by hand s.addhistory("Manual stop",10,None) # No stop, done during run trp.diluteInPlace(tgt=t71,dil=5) # Dilute input samples enough to use in qPCR directly (should be 5000/(rnagain*2*5) = 20) qpcrdil1=trp.runQPCRDIL(src=t71,tgt=[],vol=100,srcdil=20,dilPlate=True) rt1=trp.runRT(pos=True,src=t71,tgt=[],vol=5,srcdil=2)
else: reagents=Sample.getAllOnPlate(Experiment.REAGENTPLATE)+Sample.getAllOnPlate(Experiment.EPPENDORFS) for r in reagents: if r.volume<=0: r.initvolume=-r.volume+r.plate.unusableVolume Sample.clearall() t71=trp.runT7Setup(theo=False,src=srcs*2,tgt=["%s.T%d"%(srcs[i],timepoints[j]) for j in range(len(timepoints)) for i in range(len(srcs))],vol=10,srcdil=10.0/6) timesofar=0 for i in range(len(timepoints)): lastelapse=trp.e.w.elapsed trp.runT7Pgm(10,timepoints[i]-timesofar) # vol, duration timesofar=timesofar+timepoints[i] tp=trp.runT7Stop(theo=False,vol=10,tgt=t71[(i*len(srcs)):((i+1)*len(srcs))],stopmaster=stop) print "Dead time=%.1f min"%((trp.e.w.elapsed-lastelapse)/60.0) trp.diluteInPlace(tgt=t71,dil=5) # Dilute input samples enough to use in qPCR directly (should be 5000/(rnagain*2*5) = 20) qpcrdil1=trp.runQPCRDIL(src=t71,tgt=[],vol=100,srcdil=20,dilPlate=True) rt1=trp.runRT(pos=True,src=t71,tgt=[],vol=10,srcdil=2) rt1=trp.diluteInPlace(tgt=rt1,dil=5) lig1=trp.runLig(src=rt1,tgt=[],vol=25,srcdil=3,master=ligmaster) prods=trp.saveSamps(lig1,vol=5,dil=10,plate=Experiment.DILPLATE) trp.runQPCR(src=qpcrdil1,vol=15,srcdil=10.0/4,primers=["WX","REF"]) trp.runQPCR(src=prods,vol=15,srcdil=10.0/4,primers=["WX","AX","REF"]) trp.finish()
for iteration in range(2): print "Iteration ",iteration+1 trp=TRP() if iteration==0: trp.addTemplates([input,ctl],160) # Add a template with stock concentration 80nM else: reagents=Sample.getAllOnPlate(Experiment.REAGENTPLATE) for r in reagents: if r.volume<0: r.initvolume=-r.volume+20 Sample.clearall() # Round 1 (Keep uncleaved +theo) t71=trp.runT7(theo=[False,True,False],src=[input,input,ctl],tgt=[],vol=18,srcdil=80.0/24) sv1t7=trp.saveSamps(src=t71,tgt=[],vol=10,dil=4) rt1=trp.runRT(pos=[True,True,True ],src=t71,tgt=[],vol=22,srcdil=2) trp.diluteInPlace(tgt=rt1,dil=2) sv1rt=trp.saveSamps(src=rt1,tgt=[],vol=15,dil=2) pcr1=trp.runPCR(prefix=[srcprefix],src=rt1[1],tgt=[],vol=50,srcdil=4) trp.diluteInPlace(tgt=pcr1,dil=3) sv1pcr=trp.saveSamps(src=pcr1,tgt=["R1"],vol=125,dil=1) # Round 2 (-theo, Ligate, keep cleaved) t72=trp.runT7(theo=[False,True],src=sv1pcr+sv1pcr,tgt=[],vol=17,srcdil=80.0/24) sv2t7=trp.saveSamps(src=t72,tgt=[],vol=7,dil=4) rt2=trp.runRT(pos=[True for i in t72+sv1t7]+[False for i in t72+sv1t7],src=t72+sv1t7+t72+sv1t7,tgt=[],vol=[12]+[9 for s in t72[1:]+sv1t7+t72+sv1t7],srcdil=2) trp.diluteInPlace(tgt=rt2,dil=2) lig2=trp.runLig(prefix=prodprefix,src=rt2+sv1rt,tgt=[],vol=[30]+[16 for s in rt2[1:]+sv1rt],srcdil=3) qsamps=lig2+sv1t7+sv2t7 # Samples for QPCR diltolig=[24 for s in t72]+[24*4 for s in sv1t7]+[24 for s in t72]+[24*4 for s in sv1t7]+[16 for s in sv1rt]+[8 for s in sv1t7]+[8 for s in sv2t7] # Their dilution so far from the T7 product point (before stop added)
print "Iteration ",iteration+1 trp=TRP() if iteration==0: trp.addTemplates(inputs,tmplConc*1e9) # Add a template with stock concentration else: reagents=Sample.getAllOnPlate(Experiment.REAGENTPLATE) for r in reagents: if r.volume<0: r.initvolume=-r.volume+20 Sample.clearall() # Round 1 (Keep cleaved -theo) print "***** Round 1 T7 *****" t71=trp.runT7New(theo=[False for i in inputs]+[True for i in inputs],src=inputs+inputs,tgt=[],vol=10,srcdil=10.0/3) sv1t7=trp.saveSamps(src=t71,vol=3,dil=25,plate=trp.e.DILPLATE) rt1=trp.runRT(pos=True,src=t71,tgt=[],vol=5,srcdil=2) trp.diluteInPlace(tgt=rt1,dil=4) lig1=trp.runLig(prefix="B",src=rt1,tgt=[],vol=10,srcdil=3) trp.diluteInPlace(tgt=lig1,dil=5) # Save in dilution plate sv1lig=trp.saveSamps(src=lig1,vol=20,dil=5,plate=trp.e.DILPLATE) # Only need to PCR -theo case, cleaved pcr1=trp.runPCR(prefix="B",src=lig1[0:len(inputs)],tgt=["%s.c"%i for i in inputs],vol=25,srcdil=4,ncycles=cycles) trp.diluteInPlace(tgt=pcr1,dil=3) sv1pcr=trp.saveSamps(src=pcr1,tgt=[], vol=50,dil=1)
else: altprefix = 'A' ligsave1 = [] ligsave2 = [] pcrsave = [] input = templates for round in range(ndblrounds): # Round 1 (Keep uncleaved +theo) t71 = trp.runT7(theo=True, src=input, vol=12, srcdil=10.0 / 3, dur=15) rt1 = trp.runRT(pos=True, src=t71, vol=10, srcdil=2) t71 = trp.diluteInPlace(tgt=t71, dil=5) # Dilute more to conserve rt1 = trp.diluteInPlace(tgt=rt1, dil=3.5) # Save RT product so can do ligation during 2nd round sv1rt = trp.saveSamps(src=rt1, vol=8, dil=3, plate=trp.e.DILPLATE) prodbase = "R%d-%c" % (firstround + round * 2, currprefix) pcr1 = trp.runPCR(prefix=currprefix, src=rt1, tgt=[prodbase, prodbase + "-spike"], vol=pcrvol, srcdil=4, ncycles=cycles1) pcr1 = trp.diluteInPlace(tgt=pcr1, dil=2) eppie = trp.saveSamps(src=pcr1, tgt=[prodbase + ".D3", prodbase + "-spike.D3"], vol=26, dil=3, plate=trp.e.EPPENDORFS) # And save in dilution plate for qPCR (will need 400x dilution from this point) (also eppie may be removed before end)
for round in range(ndblrounds): # Round 1 (Keep uncleaved +theo) t71=trp.runT7(theo=[True],src=input,vol=[10],srcdil=10.0/3,dur=15) t71s=findsamps(t71)[0] trp.e.waitpgm() trp.e.w.userprompt("Check T7 volume in %s, should be %.1f ul"%(t71s.plate.wellname(t71s.well),t71s.volume)) t7all=t7all+t71 rt1=trp.runRT(pos=[True],src=t71,vol=[10],srcdil=2) rt1s=findsamps(rt1)[0] trp.e.waitpgm() trp.e.w.userprompt("Check RT volume in %s, should be %.1f ul"%(rt1s.plate.wellname(rt1s.well),rt1s.volume)) trp.diluteInPlace(tgt=t71,dil=5) # Dilute more to conserve trp.diluteInPlace(tgt=rt1,dil=3) if doqpcr: sv=sv+trp.saveSamps(src=rt1,vol=8,dil=5) svligtype=svligtype+[altprefix] svdil=svdil+[2*2*3*5] pcr1=trp.runPCR(prefix=[currprefix],src=rt1,vol=25,srcdil=4,ncycles=cycles1) pcr1s=findsamps(pcr1)[0] trp.e.waitpgm() trp.e.w.userprompt("Check PCR volume in %s, should be %.1f ul"%(pcr1s.plate.wellname(pcr1s.well),pcr1s.volume)) trp.diluteInPlace(tgt=pcr1,dil=6) #sv1pcr=trp.saveSamps(src=pcr1,tgt=["R%d-%c"%(firstround+round*2,currprefix)],vol=125,dil=1,plate=trp.e.EPPENDORFS) # # Round 2 (-theo, Ligate, keep cleaved) # t72=trp.runT7(theo=[False],src=sv1pcr,vol=10,srcdil=10.0/3) # t7all=t7all+t72 # rt2=trp.runRT(pos=True,src=t72,vol=[10],srcdil=2) # trp.diluteInPlace(tgt=t72,dil=5) # Dilute more to conserve # trp.diluteInPlace(tgt=rt2,dil=3)
Sample.clearall() # Round 1 (Keep uncleaved +theo) t71 = trp.runT7New(theo=True, src=inputs, tgt=["%s.T1+" % i for i in inputs], vol=10, srcdil=10.0 / 3, dur=30) trp.diluteInPlace(tgt=t71, dil=5) rt1 = trp.runRT(pos=True, src=t71, tgt=[], vol=5, srcdil=2) trp.diluteInPlace(tgt=rt1, dil=4) pcr1 = trp.runPCR(prefix=srcprefix, src=rt1, tgt=[], vol=25, srcdil=4) trp.diluteInPlace(tgt=pcr1, dil=3) sv1pcr = trp.saveSamps(src=pcr1, tgt=["%s.R1" % i for i in inputs], vol=55, dil=1) # Round 2 (both rounds, +/-theo, Ligate, keep cleaved) r2in = sv1pcr + inputs t72 = trp.runT7New(theo=[False for i in r2in] + [True for i in r2in], src=r2in + r2in, tgt=[], vol=10, srcdil=10.0 / 3) trp.diluteInPlace(tgt=t72, dil=5) sv2t7 = trp.saveSamps(src=t72, vol=10, dil=10, plate=trp.e.DILPLATE) rt2 = trp.runRT(pos=True, src=t72, tgt=[], vol=5, srcdil=2) trp.diluteInPlace(tgt=rt2, dil=4) lig2 = trp.runLig(prefix=prodprefix, src=rt2, tgt=[], vol=10, srcdil=3) trp.diluteInPlace(tgt=lig2, dil=5)
for round in range(ndblrounds): # Round 1 (Keep uncleaved +theo) t71 = trp.runT7(theo=[True], src=input, vol=12, srcdil=10.0 / 3, dur=15) t7all = t7all + t71 rt1 = trp.runRT(pos=[True], src=t71, vol=[10], srcdil=2) trp.diluteInPlace(tgt=t71, dil=5) # Dilute more to conserve trp.diluteInPlace( tgt=rt1, dil=9 ) # Dilute same as combined RT+Ligation steps in second half of double-round, reduce inhibition of PCR if doqpcr: sv = sv + trp.saveSamps(src=rt1, vol=8, dil=5) svligtype = svligtype + [altprefix] svdil = svdil + [2 * 2 * 3 * 5] pcr1 = trp.runPCR(prefix=[currprefix], src=rt1, vol=25, srcdil=4, ncycles=cycles1) trp.diluteInPlace(tgt=pcr1, dil=6) sv1pcr = trp.saveSamps( src=pcr1, tgt=["R%d-%c" % (firstround + round * 2, currprefix)], vol=125, dil=1, plate=trp.e.EPPENDORFS)
1e9) # Add a template with stock concentration else: reagents = Sample.getAllOnPlate(Experiment.REAGENTPLATE) for r in reagents: if r.volume < 0: r.initvolume = -r.volume + 20 Sample.clearall() # Round 1 (Keep cleaved -theo) print "***** Round 1 T7 *****" t71 = trp.runT7New(theo=[False for i in inputs] + [True for i in inputs], src=inputs + inputs, tgt=[], vol=10, srcdil=10.0 / 3) sv1t7 = trp.saveSamps(src=t71, vol=3, dil=25, plate=trp.e.DILPLATE) rt1 = trp.runRT(pos=True, src=t71, tgt=[], vol=5, srcdil=2) trp.diluteInPlace(tgt=rt1, dil=4) lig1 = trp.runLig(prefix="B", src=rt1, tgt=[], vol=10, srcdil=3) trp.diluteInPlace(tgt=lig1, dil=5) # Save in dilution plate sv1lig = trp.saveSamps(src=lig1, vol=20, dil=5, plate=trp.e.DILPLATE) # Only need to PCR -theo case, cleaved pcr1 = trp.runPCR(prefix="B", src=lig1[0:len(inputs)], tgt=["%s.c" % i for i in inputs], vol=25,
for i in range(len(timepoints)): lastelapse = trp.e.w.elapsed trp.runT7Pgm(10, timepoints[i] - timesofar) # vol, duration timesofar = timesofar + timepoints[i] tp = trp.runT7Stop(theo=False, vol=10, tgt=t71[(i * len(srcs)):((i + 1) * len(srcs))], stopmaster=stop) print "Dead time=%.1f min" % ((trp.e.w.elapsed - lastelapse) / 60.0) trp.diluteInPlace(tgt=t71, dil=5) # Dilute input samples enough to use in qPCR directly (should be 5000/(rnagain*2*5) = 20) qpcrdil1 = trp.runQPCRDIL(src=t71, tgt=[], vol=100, srcdil=20, dilPlate=True) rt1 = trp.runRT(pos=True, src=t71, tgt=[], vol=10, srcdil=2) rt1 = trp.diluteInPlace(tgt=rt1, dil=5) lig1 = trp.runLig(src=rt1, tgt=[], vol=25, srcdil=3, master=ligmaster) prods = trp.saveSamps(lig1, vol=5, dil=10, plate=Experiment.DILPLATE) trp.runQPCR(src=qpcrdil1, vol=15, srcdil=10.0 / 4, primers=["WX", "REF"]) trp.runQPCR(src=prods, vol=15, srcdil=10.0 / 4, primers=["WX", "AX", "REF"]) trp.finish()
else: altprefix='A' ligsave1=[] ligsave2=[] pcrsave=[] input=templates for round in range(ndblrounds): # Round 1 (Keep uncleaved +theo) t71=trp.runT7(theo=True,src=input,vol=12,srcdil=10.0/3,dur=15) rt1=trp.runRT(pos=True,src=t71,vol=10,srcdil=2) t71=trp.diluteInPlace(tgt=t71,dil=5) # Dilute more to conserve rt1=trp.diluteInPlace(tgt=rt1,dil=3.5) # Save RT product so can do ligation during 2nd round sv1rt=trp.saveSamps(src=rt1,vol=8,dil=3,plate=trp.e.DILPLATE) prodbase="R%d-%c"%(firstround+round*2,currprefix) pcr1=trp.runPCR(prefix=currprefix,src=rt1,tgt=[prodbase,prodbase+"-spike"],vol=pcrvol,srcdil=4,ncycles=cycles1) pcr1=trp.diluteInPlace(tgt=pcr1,dil=2) eppie=trp.saveSamps(src=pcr1,tgt=[prodbase+".D3",prodbase+"-spike.D3"],vol=26,dil=3,plate=trp.e.EPPENDORFS) # And save in dilution plate for qPCR (will need 400x dilution from this point) (also eppie may be removed before end) pcrsave=pcrsave+trp.saveSamps(src=eppie,vol=5,dil=20, plate=trp.e.DILPLATE) # Round 2 (-theo, Ligate, keep cleaved) t72=trp.runT7(theo=False,src=pcr1,vol=12,srcdil=10.0/3) rt2=trp.runRT(pos=True,src=t72,vol=10,srcdil=2) t72=trp.diluteInPlace(tgt=t72,dil=5) # Dilute more to conserve rt2=trp.diluteInPlace(tgt=rt2,dil=3)
Sample.clearall() # Round 1 (Keep uncleaved +theo) t71 = trp.runT7New(theo=True, src=inputs, tgt=["%s.T1+" % i for i in inputs], vol=10, srcdil=10.0 / 3, dur=30) trp.diluteInPlace(tgt=t71, dil=5) rt1 = trp.runRT(pos=True, src=t71, tgt=[], vol=5, srcdil=2) trp.diluteInPlace(tgt=rt1, dil=4) rtconc = tmplConc * 3.0 / 10.0 * rnagain / (2 * 5 * 2 * 4 * 4) # Expected concentration of ligation product here cycles = math.ceil(math.log(endconc / rtconc, pcreff)) # Amplify to end of exponential phase print "PCR input conc=%.3g pM, PCR cycles=%.1f, End Conc=%.0f nM" % (rtconc * 1e12, cycles, endconc * 1e9) pcr1 = trp.runPCR(prefix=srcprefix, src=rt1, tgt=[], vol=25, srcdil=4, ncycles=cycles) trp.diluteInPlace(tgt=pcr1, dil=3) sv1pcr = trp.saveSamps(src=pcr1, tgt=["%s.R1" % i for i in inputs], vol=55, dil=1) # Round 2 (both rounds, +/-theo, Ligate, keep cleaved) r2in = sv1pcr + inputs t72 = trp.runT7New( theo=[False for i in r2in] + [True for i in r2in], src=r2in + r2in, tgt=[], vol=10, srcdil=10.0 / 3 ) trp.diluteInPlace(tgt=t72, dil=5) sv2t7 = trp.saveSamps(src=t72, vol=10, dil=10, plate=trp.e.DILPLATE) rt2 = trp.runRT(pos=True, src=t72, tgt=[], vol=5, srcdil=2) trp.diluteInPlace(tgt=rt2, dil=4) lig2 = trp.runLig(prefix=prodprefix, src=rt2, tgt=[], vol=10, srcdil=3) trp.diluteInPlace(tgt=lig2, dil=5) qsamps = lig2 + sv2t7 # Samples for QPCR diltolig = [2 * 5 * 2 * 4 * 3 * 5 for d in lig2] + [ 2 * 5 * 10 * rnagain for d in sv2t7
else: altprefix='A' sv=[] svligtype=[] svdil=[] t7all=[] for round in range(ndblrounds): # Round 1 (Keep uncleaved +theo) t71=trp.runT7(theo=[True],src=input,vol=12,srcdil=10.0/3,dur=15) t7all=t7all+t71 rt1=trp.runRT(pos=[True],src=t71,vol=[10],srcdil=2) trp.diluteInPlace(tgt=t71,dil=5) # Dilute more to conserve trp.diluteInPlace(tgt=rt1,dil=9) # Dilute same as combined RT+Ligation steps in second half of double-round, reduce inhibition of PCR if doqpcr: sv=sv+trp.saveSamps(src=rt1,vol=8,dil=5) svligtype=svligtype+[altprefix] svdil=svdil+[2*2*3*5] pcr1=trp.runPCR(prefix=[currprefix],src=rt1,vol=25,srcdil=4,ncycles=cycles1) trp.diluteInPlace(tgt=pcr1,dil=6) sv1pcr=trp.saveSamps(src=pcr1,tgt=["R%d-%c"%(firstround+round*2,currprefix)],vol=125,dil=1,plate=trp.e.EPPENDORFS) # Round 2 (-theo, Ligate, keep cleaved) t72=trp.runT7(theo=[False],src=sv1pcr,vol=12,srcdil=10.0/3) t7all=t7all+t72 rt2=trp.runRT(pos=True,src=t72,vol=[10],srcdil=2) trp.diluteInPlace(tgt=t72,dil=5) # Dilute more to conserve trp.diluteInPlace(tgt=rt2,dil=3) if doqpcr: sv=sv+trp.saveSamps(src=rt2,vol=8,dil=5) svligtype=svligtype+[altprefix]
if r.volume<=0: r.initvolume=-r.volume+r.plate.unusableVolume Sample.clearall() t71master=["%s.MT"%s for s in srcs] trp.runT7Setup(theo=False,src=srcs,tgt=t71master,vol=len(timepoints)*(t7vol*1.02+2)+1+15+20,srcdil=10.0/6) startTime=trp.e.w.elapsed t71=[] stopDelay=0*60 for i in range(len(timepoints)): trp.e.sanitize() pauseTime=(timepoints[i]*60-(trp.e.w.elapsed-startTime)-stopDelay) if pauseTime>0: print "Pausing for %.1f minutes"%(pauseTime/60.0) trp.e.w.userprompt("Pausing to incubate first T7 at room temperature...",pauseTime) tp=trp.saveSamps(src=t71master,tgt=["%s.T%d"%(s,timepoints[i]) for s in srcs],vol=t7vol,dil=1,plate=trp.e.SAMPLEPLATE) trp.runT7Stop(theo=False,vol=t7vol,tgt=tp,stopmaster=stop) print "T7 stop %d done at %.1f minutes"%(i,(trp.e.w.elapsed-startTime)/60.0) trp.diluteInPlace(tgt=tp,dil=5) trp.e.w.flushQueue() t71=t71+tp # Dilute input samples enough to use in qPCR directly (should be 5000/(rnagain*2*5) = 20) qpcrdil1=trp.runQPCRDIL(src=t71,tgt=[],vol=100,srcdil=20,dilPlate=False) rt1=trp.runRT(pos=True,src=t71,tgt=[],vol=5,srcdil=2) rt1=trp.diluteInPlace(tgt=rt1,dil=5) lig1=trp.runLig(src=rt1,tgt=[],vol=10,srcdil=3,master=ligmaster) prods=trp.diluteInPlace(tgt=lig1,dil=10) for i in range(len(qpcrdil1)):