Пример #1
0
from Experiment.sample import Sample
from Experiment.experiment import Experiment
import math
from TRPLib.TRP import TRP

reagents=None
input="BT411"
ctl="L2b12Ctl"
srcprefix="A"
prodprefix="B"

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)
Пример #2
0
        if Sample.lookup("MQ"+pm)==None:
            Sample("MQ"+pm,Experiment.REAGENTPLATE,None,10.0/6)

for pm in tmplqpcr:
    if Sample.lookup("MQ"+pm)==None:
        Sample("MQ"+pm,Experiment.REAGENTPLATE,None,10.0/6)
    
reagents=None


for iteration in range(2):
    print "Iteration ",iteration+1
    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()

    t71=trp.runT7(theo=False,src=srcs,tgt=[],vol=10,srcdil=10.0/6,dur=15,stopmaster=stop)
    #print t71
    t71=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=False)
    
    rt1=trp.runRT(pos=True,src=t71,tgt=[],vol=30,srcdil=2)
    rt1=trp.diluteInPlace(tgt=rt1,dil=5)
Пример #3
0
print "PCR2 input conc=%.3g pM, PCR cycles=%.1f, End Conc=%.0f nM" % (
    pcrinconc2 * 1e12, cycles2, pcrinconc2 * (math.pow(pcreff, cycles2)) * 1e9)
print "Diversity at PCR1 input in first round = %.1g molecules" % (
    pcrinconc1 * (inputConc / tmplConc) * (pcrvol * 1e-6) * 6.022e23)
print "Diversity at PCR2 input in second round = %.1g molecules" % (
    pcrinconc2 * (pcrvol * 1e-6) * 6.022e23)

for iteration in range(2):
    print "Iteration ", iteration + 1
    trp = TRP()
    templates = [inname + "-" + srcprefix, inname + "-" + srcprefix + "-spike"]

    if iteration == 0:
        #rnastore=Sample("RNA Storage",Experiment.REAGENTPLATE,None,None)
        trp.addTemplates(
            templates, inputConc * 1e9
        )  # Add a template with stock concentration same as subsequent PCR products
        trp.addTemplates(
            ["BT371"],
            10)  # Add a template with known concentration as reference
    else:
        reagents = Sample.getAllOnPlate(Experiment.REAGENTPLATE)
        for r in reagents:
            if r.volume < 0:
                r.initvolume = -r.volume + 20
        Sample.clearall()

    currprefix = srcprefix
    if currprefix == 'A':
        altprefix = 'B'
    else:
Пример #4
0
        if Sample.lookup("MQ" + pm) == None:
            Sample("MQ" + pm, Experiment.REAGENTPLATE, None, 10.0 / 6)

for pm in tmplqpcr:
    if Sample.lookup("MQ" + pm) == None:
        Sample("MQ" + pm, Experiment.REAGENTPLATE, None, 10.0 / 6)

reagents = None

for iteration in range(2):
    print "Iteration ", iteration + 1
    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()

    t71 = trp.runT7(theo=False,
                    src=srcs,
                    tgt=[],
                    vol=10,
                    srcdil=10.0 / 6,
Пример #5
0
    for i in range(len(input)):
        if nreplicates[i] > k:
            inputs = inputs + [input[i]]
            srcprefixes = srcprefixes + [srcprefix[i]]
            if srcprefix[i] == 'A':
                prodprefixes = prodprefixes + ['B']
            else:
                prodprefixes = prodprefixes + ['A']

reagents = None

for iteration in range(2):
    print "Iteration ", iteration + 1
    trp = TRP()
    if iteration == 0:
        trp.addTemplates(input,
                         8)  # Add a template with stock concentration 8nM
    else:
        reagents = Sample.getAllOnPlate(Experiment.REAGENTPLATE)
        for r in reagents:
            if r.volume < 0:
                r.initvolume = -r.volume + 20
        Sample.clearall()

    t71 = trp.runT7(theo=[False for i in inputs] + [True for i in inputs],
                    src=inputs + inputs,
                    tgt=[],
                    vol=10,
                    srcdil=80.0 / 24,
                    dur=15)
    trp.diluteInPlace(tgt=t71, dil=2)
    rt1 = trp.runRT(pos=True, src=t71, tgt=[], vol=5, srcdil=2)
Пример #6
0
ligconc=tmplConc*3.0/10.0*rnagain/ligdil   # Expected concentration of ligation product here
pcrinconc=ligconc/4;
cycles=math.ceil(math.log(endconc/pcrinconc,pcreff))   # Amplify to end of exponential phase
print "PCR input conc=%.3g pM, PCR cycles=%.1f, End Conc=%.0f nM"%(pcrinconc*1e12,cycles,pcrinconc*(math.pow(pcreff,cycles))*1e9)

# Additional QPCR dilution
qdillig=10000/(ligdil*5)
t7dil=rnagain*2*25   # Back out expected RNA gain
qdilt7=10000/t7dil
print "QPCR 2nd dilution: Ligation products: %.1f, T7 products: %.1f"%(qdillig, qdilt7)

for iteration in range(2):
    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)
Пример #7
0
import math
from TRPLib.TRP import TRP
from TRPLib.TRP import findsamps
import copy

reagents=None
inputs=[]
concs=[10,5,2.5,1.25]
for iteration in range(2):
    print "Iteration ",iteration+1
    trp=TRP()
    if iteration==0:
        for conc in concs:
            input="DNA@%d"%conc
            inputs.append(input)
            trp.addTemplates([input],conc,finalconc=conc)  
    else:   
        reagents=Sample.getAllOnPlate(Experiment.REAGENTPLATE)
        for r in reagents:
            if r.volume<0:
                r.initvolume=-r.volume+20
        Sample.clearall()

    dilneeded=[c/.020 for c in concs]
    qdil1=[min(40,d/2) for d in dilneeded]   # 40x for first dilution
    qdil2=[dilneeded[i]*1.0/qdil1[i] for i in range(len(qdil1))]   # Whatever remains
    qpcrdil1=trp.runQPCRDIL(src=inputs,tgt=[],vol=100,srcdil=qdil1,dilPlate=False)   # First dilution before starting PCR (so the rest of the QPCR setup can be done while PCR is running)
    qpcrdil2x1=trp.runQPCRDIL(src=qpcrdil1,tgt=[],vol=100,srcdil=qdil2)
    #    qpcrdil2x2=trp.runQPCRDIL(src=qpcrdil1[0:2],tgt=['x2a','x2b'],vol=100,srcdil=[d*2 for d in qdil2[0:2]])
    qpcrdil2x4=trp.runQPCRDIL(src=qpcrdil1[0:2],tgt=['x4a','x4b'],vol=100,srcdil=[d*4 for d in qdil2[0:2]])
    qpcrdil2x4b=trp.runQPCRDIL(src=qpcrdil2x1[0:2],tgt=['x4ab','x4bb'],vol=100,srcdil=[4 for d in qdil2[0:2]])
Пример #8
0
srcprefix = "A"
prodprefix = "B"
rnagain = 10
# Assumed DNA:RNA gain
endconc = 10e-9
# PCR end concentration (nM) (at end of exponential phase)
pcreff = 1.9
# Mean efficiency of PCR during exponential phase
tmplConc = endconc / 3
# nM

for iteration in range(2):
    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 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)
Пример #9
0
cycles2=math.ceil(math.log(endconc/pcrinconc2,pcreff))   # Amplify to end of exponential phase

# Add an extra 2 cycles to be sure
cycles1+=2
cycles2+=2

print "PCR1 input conc=%.3g pM, PCR cycles=%.1f, End Conc=%.0f nM"%(pcrinconc1*1e12,cycles1,pcrinconc1*(math.pow(pcreff,cycles1))*1e9)
print "PCR2 input conc=%.3g pM, PCR cycles=%.1f, End Conc=%.0f nM"%(pcrinconc2*1e12,cycles2,pcrinconc2*(math.pow(pcreff,cycles2))*1e9)

for iteration in range(2):
    print "Iteration ",iteration+1
    trp=TRP()
    input="IN-"+srcprefix
    if iteration==0:
        #rnastore=Sample("RNA Storage",Experiment.REAGENTPLATE,None,None)
        trp.addTemplates([input],tmplConc*1e9)   # Add a template with stock concentration same as subsequent PCR products
    else:   
        reagents=Sample.getAllOnPlate(Experiment.REAGENTPLATE)
        for r in reagents:
            if r.volume<0:
                r.initvolume=-r.volume+20
        Sample.clearall()

    currprefix=srcprefix
    if currprefix=='A':
        altprefix='B'
    else:
        altprefix='A'
    sv=[]
    svligtype=[]
    svdil=[]
Пример #10
0
    for i in range(len(input)):
        if nreplicates[i]>k:
            inputs=inputs+[input[i]];
            srcprefixes=srcprefixes+[srcprefix[i]];
            if srcprefix[i]=='A':
                prodprefixes=prodprefixes+['B'];
            else:
                prodprefixes=prodprefixes+['A'];

reagents=None

for iteration in range(2):
    print "Iteration ",iteration+1
    trp=TRP()
    if iteration==0:
        trp.addTemplates(input,8)   # Add a template with stock concentration 8nM
    else:   
        reagents=Sample.getAllOnPlate(Experiment.REAGENTPLATE)
        for r in reagents:
            if r.volume<0:
                r.initvolume=-r.volume+20
        Sample.clearall()

    t71=trp.runT7(theo=[False for i in inputs]+[True for i in inputs],src=inputs+inputs,tgt=[],vol=10,srcdil=80.0/24,dur=15)
    trp.diluteInPlace(tgt=t71,dil=2)
    rt1=trp.runRT(pos=True,src=t71,tgt=[],vol=5,srcdil=2)
    trp.diluteInPlace(tgt=rt1,dil=4)
    lig1=trp.runLig(prefix=[prodprefixes[i%len(prodprefixes)] for i in range(len(rt1))],src=rt1,tgt=[],vol=10,srcdil=3)
    trp.diluteInPlace(tgt=lig1,dil=4)
    # Dilute input samples
    qpcrdil1=trp.runQPCRDIL(src=inputs,tgt=[],vol=100,srcdil=40,dilPlate=True)   
Пример #11
0
cycles1+=6+2
cycles2+=3+2

print "PCR1 input conc=%.3g pM, PCR cycles=%.1f, End Conc=%.0f nM"%(pcrinconc1*1e12,cycles1,pcrinconc1*(math.pow(pcreff,cycles1))*1e9)
print "PCR2 input conc=%.3g pM, PCR cycles=%.1f, End Conc=%.0f nM"%(pcrinconc2*1e12,cycles2,pcrinconc2*(math.pow(pcreff,cycles2))*1e9)
print "Diversity at PCR1 input in first round = %.1g molecules"%(pcrinconc1*(inputConc/tmplConc)*(pcrvol*1e-6)*6.022e23)
print "Diversity at PCR2 input in second round = %.1g molecules"%(pcrinconc2*(pcrvol*1e-6)*6.022e23)

for iteration in range(2):
    print "Iteration ",iteration+1
    trp=TRP()
    templates=[inname+"-"+srcprefix,inname+"-"+srcprefix+"-spike"]
    
    if iteration==0:
        #rnastore=Sample("RNA Storage",Experiment.REAGENTPLATE,None,None)
        trp.addTemplates(templates,inputConc*1e9)   # Add a template with stock concentration same as subsequent PCR products
        trp.addTemplates(["BT371"],10)   # Add a template with known concentration as reference
    else:   
        reagents=Sample.getAllOnPlate(Experiment.REAGENTPLATE)
        for r in reagents:
            if r.volume<0:
                r.initvolume=-r.volume+20
        Sample.clearall()

    currprefix=srcprefix
    if currprefix=='A':
        altprefix='B'
    else:
        altprefix='A'
    ligsave1=[]
    ligsave2=[]