def Run(self):
        self.set_EvoMode()
        self.initialize()                       # set_defaults ??
        Rtv.NumOfSamples = self.NumOfSamples
        NumOfSamples = self.NumOfSamples
        wt           = self.worktable

        Itr.comment('Extracting RNA from {:s} samples with the MN-Vet kit'.format(str(NumOfSamples))).exec()


        #  Get Labwares (Cuvette, eppys, etc.) from the work table

        ElutBuf     = wt.getLabware(Lab.Trough_100ml,   "1-VEL-ElutionBuffer"   )
        LysBuf      = wt.getLabware(Lab.Trough_100ml,   "2-Vl Lysis Buffer"     )
        BindBuf     = wt.getLabware(Lab.Trough_100ml,   "3-VEB Binding Buffer"  )

        DiTi1000_1  = wt.getLabware(Lab.DiTi_1000ul,    "1000-1")
        DiTi1000_2  = wt.getLabware(Lab.DiTi_1000ul,    "1000-2")
        DiTi1000_3  = wt.getLabware(Lab.DiTi_1000ul,    "1000-3")

        Reactives   = wt.getLabware(Lab.GreinRack16_2mL, "Reactives" )

        #  Set the initial position of the tips

        self.go_first_pos()

        # Set volumen / sample

        SampleVolume        = 200.0
        LysisBufferVolume   = 180.0       # VL1
        IC2Volume           =   5.0       # ? 4
        BindingBufferVolume = 600.0
        B_BeadsVolume       =  20.0
        VEW1Volume          = 600.0
        VEW2Volume          = 600.0
        EtOH80pVolume       = 600.0
        ProtKVolume         =  20.0
        cRNAVolume          =   4.0
        IC_MS2Volume        =  20.0
        ElutionBufferVolume = 100.0


        # Liquid classes used for pippetting. Others liquidClass names are defined in "protocol_steps.py"

        SampleLiqClass = "Serum Asp"  # = TissueHomLiqClass   # SerumLiqClass="Serum Asp preMix3"


        all_samples = range(NumOfSamples)
        maxTips     = min  (self.nTips, NumOfSamples)
        maxMask     = Rbt.tipsMask[maxTips]


        # Define the reactives in each labware (Cuvette, eppys, etc.)

        LysisBuffer     = Rtv.Reagent("VL - Lysis Buffer ",
                                      LysBuf, volpersample=LysisBufferVolume, defLiqClass=B_liquidClass)
        IC2             = Rtv.Reagent("IC2 - synthetic RNA ",
                                      Reactives, pos=11, volpersample=  IC2Volume, defLiqClass=W_liquidClass)
        VEB             = Rtv.Reagent("VEB - Binding Buffer ",
                                      BindBuf, volpersample=BindingBufferVolume, defLiqClass=B_liquidClass)
        B_Beads         = Rtv.Reagent("B - Beads ", Reactives, initial_vol=1200,
                                      pos=1, volpersample= B_BeadsVolume, replicas=2, defLiqClass=Beads_LC_2)

        VEW1            = Rtv.Reagent("VEW1 - Wash Buffer ",
                                      wt.getLabware(Lab.Trough_100ml,  "4-VEW1 Wash Buffe"),
                                      volpersample=VEW1Volume, defLiqClass=B_liquidClass)
        VEW2            = Rtv.Reagent("VEW2 - WashBuffer ",
                                      wt.getLabware(Lab.Trough_100ml,  "5-VEW2-WashBuffer" ),
                                      volpersample=VEW2Volume, defLiqClass=B_liquidClass)
        EtOH80p         = Rtv.Reagent("Ethanol 80% ",
                                      wt.getLabware(Lab.Trough_100ml,  "7-EtOH80p"     ),
                                      volpersample=EtOH80pVolume, defLiqClass=B_liquidClass)
        ElutionBuffer   = Rtv.Reagent("Elution Buffer ",
                                      ElutBuf, volpersample=ElutionBufferVolume, defLiqClass="Eluat")

        ProtK           = Rtv.Reagent("Proteinase K ",
                                      Reactives, pos=16, volpersample= ProtKVolume, defLiqClass=Small_vol_disp)
        cRNA            = Rtv.Reagent("Carrier RNA ",
                                      Reactives, pos=15, volpersample=  cRNAVolume, defLiqClass=Small_vol_disp)
        IC_MS2          = Rtv.Reagent("IC MS2 phage culture ",
                                      Reactives, pos=14, volpersample= IC_MS2Volume, defLiqClass=Small_vol_disp)
        pK_cRNA_MS2     = Rtv.preMix  ("ProtK+cRNA+IC-MS2 mix "        ,
                                       Reactives, pos=12,   components=[ ProtK, cRNA, IC2 ]
                                         , defLiqClass=W_liquidClass, replicas=2)
#        Waste           = Rtv.Reagent("Waste "  , self.WashWaste )

        # Show the CheckList GUI to the user for posible small changes

        self.CheckList()
        self.set_EvoMode()

        Itr.wash_tips(wasteVol=30, FastWash=True).exec()


        with group("Prefill plates with VEW1, VEW2, EtOH and Elution buffer"):

            Itr.userPrompt("Put the plates for VEW1, Elution Buffer and VEW2"
                           " in the worktable defined order").exec()

            Plate_VEW1  = wt.getLabware(Lab.MP96deepwell, "Plate VEW1" )  # Plate 12 x 8 ?
            Plate_ElutB = wt.getLabware(Lab.MP96well,     "Plate ElutB")  # Plate 12 x 8 ? MP96well !!
            Plate_VEW2  = wt.getLabware(Lab.MP96deepwell, "Plate VEW2" )  # Plate 12 x 8 ?

            # Define samples and the place for temporal reactions
            for s in all_samples:
                Rtv.Reagent("VEW1_{:02d}".format(s + 1), Plate_VEW1, initial_vol=0.0, pos=s + 1,
                            excess=0)  # todo revise order !!!
                Rtv.Reagent("VEW2_{:02d}".format(s + 1), Plate_VEW2, initial_vol=0.0, pos=s + 1,
                            excess=0)  # todo revise order !!!
                Rtv.Reagent("ElutB_{:02d}".format(s + 1), Plate_ElutB, initial_vol=0.0, pos=s + 1,
                            excess=0)  # todo revise order !!!

            with tips(reuse=True, drop=False):
                spread(reactive=VEW1, to_labware_region=Plate_VEW1.selectOnly(all_samples))

            with tips(reuse=True, drop=False):
                spread(reactive=VEW2, to_labware_region=Plate_VEW2.selectOnly(all_samples))

            with tips(reuse=True, drop=False):
                spread(reactive=ElutionBuffer, to_labware_region=Plate_ElutB.selectOnly(all_samples))

            Itr.userPrompt("Retire the plates for VEW1, VEW2 and Elution Buffer, and "
                           "Put the plates for the lysis -in place of VEW1- and for EtOH80p -in place of VEW2-").exec()

            Plate_EtOH = wt.replaceWithNew(Plate_VEW2, "Plate_EtOH")  # Plate 12 x 8 ?
            for s in all_samples:
                Rtv.Reagent("EtOH_{:02d}".format(s + 1), Plate_EtOH, initial_vol=0.0, pos=s + 1,
                            excess=0)  # todo revise order !!!
            with tips(reuse=True, drop=False):
                spread(reactive=EtOH80p, to_labware_region=Plate_EtOH.selectOnly(all_samples))



        with group("Sample Lysis"):
            Samples     = wt.getLabware(Lab.EppRack6x16, "Proben")  # 6x16 = 12 x 8 ?
            Plate_lysis = wt.replaceWithNew(Plate_VEW1, "Lysis_Plate")  # Plate 12 x 8 ?

            # Define samples and the place for temporal reactions

            for s in all_samples:
                Rtv.Reagent("probe_{:02d}".format(s + 1), Samples, single_use=SampleVolume,
                            pos=s + 1, defLiqClass=SampleLiqClass, excess=0)
                Rtv.Reagent("lysis_{:02d}".format(s + 1), Plate_lysis, initial_vol=0.0, pos=s + 1,
                            excess=0)  # todo revise order !!!

            with tips(tipsMask=maxMask, reuse=True, drop=True):
                pK_cRNA_MS2.make(NumOfSamples)
                spread  (  reactive=pK_cRNA_MS2,   to_labware_region= Plate_lysis.selectOnly(all_samples))
                spread  (  reactive=LysisBuffer,   to_labware_region= Plate_lysis.selectOnly(all_samples))
            with tips(reuse=False, drop=True):
                transfer(  from_labware_region= Samples,
                           to_labware_region=   Plate_lysis,
                           volume=              SampleVolume,
                           using_liquid_class=  (SampleLiqClass, "Serum Disp postMix3"),
                           optimizeFrom         =False,     # optimizeTo= True,           # todo Really ??
                           NumSamples=          NumOfSamples)
            Itr.wash_tips(wasteVol=4, FastWash=True).exec()
            # with tips(reuse=False, drop=True):        # better reuse=True, drop=False, with normal Liquid Class ??
            #     spread  (  reactive=LysisBuffer,
            #                to_labware_region= Plate_lysis.selectOnly(all_samples),
            #                using_liquid_class=(None,"Serum Disp postMix3"))

            with incubation(minutes=15):
                Itr.userPrompt("Please Schutteln the plates for lysis in pos 1").exec()

        with group("Beads binding"):
            with tips(tipsMask=maxMask, reuse=True, drop=False):
                for p in [40, 50, 60, 65]:
                    mix_reactive(B_Beads, LiqClass=Beads_LC_1, cycles=1, maxTips=maxTips, v_perc=p)

            with tips(reuse=True, drop=True):
                spread( reactive=B_Beads,      to_labware_region=Plate_lysis.selectOnly(all_samples))
                spread( reactive=VEB,          to_labware_region=Plate_lysis.selectOnly(all_samples))

            # with tips(reuse=False, drop=True):   # better reuse=True, drop=False, with normal Liquid Class ??
            #     spread  (  reactive=VEB,
            #                to_labware_region= Plate_lysis.selectOnly(all_samples),
            #                using_liquid_class=(None,"Serum Disp postMix3"))
            with incubation(minutes=5):
                Itr.userPrompt("Please Schutteln the plates for lysis in pos 1").exec()

        self.done()
    def Run(self):
        self.set_EvoMode()   # this add: self.iRobot = EvoMode.iRobot(Itr.Pipette.LiHa1, nTips=self.nTips)
                             # in which: self.robot = Rbt.Robot(index=index, arms=arms, nTips=nTips)
        self.initialize()    # if needed calls Executable.initialize() and set_EvoMode
                             # which calls GUI.update_parameters() and set_defaults() from Evo200

        Rtv.NumOfSamples = self.NumOfSamples
        NumOfSamples = self.NumOfSamples
        wt           = self.worktable

        Itr.comment('Prefill {:d} plates with LysisBufferReact for {:d} samples.'\
                       .format(self.num_plates,
                               NumOfSamples     )).exec()

                                                            # Get Labwares (Cuvette, eppys, etc.) from the work table
        BufCuvette = wt.getLabware(Lab.Trough_100ml, "2-Vl Lysis Buffer")




        self.go_first_pos()                                                     #  Set the initial position of the tips

                                                                                  # Set volumen / sample
        BufferVolume   = 100.0       # VL1 or VL

        all_samples = range(NumOfSamples)
        maxTips     = min  (self.nTips, NumOfSamples)
        maxMask     = Rbt.tipsMask[maxTips]

                                                        # Define the reactives in each labware (Cuvette, eppys, etc.)

        BufferReact = Rtv.Reagent("Buffer ",
                                  BufCuvette,
                                  volpersample = BufferVolume,
                                  defLiqClass  = 'MN VL',
                                  num_of_samples= self.num_plates * NumOfSamples)

        # Show the CheckList GUI to the user for possible small changes

        self.CheckList()
        self.set_EvoMode()

        Itr.wash_tips(wasteVol=5, FastWash=True).exec()

        LysPlat = [wt.getLabware(Lab.MP96deepwell, "Plate lysis-"+str(i+1)) for i in range(self.num_plates)]

        par = LysPlat[0].parallelOrder(self.nTips, all_samples)

        # Define place for temporal reactions
        for i, LP in enumerate(LysPlat):
            for s in all_samples:
                Rtv.Reagent("lysis_{:d}-{:02d}".format(i + 1, s + 1),
                            LP,
                            initial_vol =0.0,
                            pos         =s + 1,
                            excess      =0)

        with group("Prefill plates with BufferReact"):

            Itr.userPrompt("Put the plates for BufferReact").exec()

            for LP in LysPlat:
                with self.tips(reuse=True, drop=False):
                    self.spread(reactive=BufferReact, to_labware_region=LP.selectOnly(all_samples))
                self.dropTips()

        self.done()
Beispiel #3
0
    def Run(self):
        self.set_EvoMode()
        self.initialize()                       #  set_defaults ??
        wt           = self.worktable

        Itr.comment('Extracting RNA from {:s} samples with the MN-Vet kit'.format(str(NumOfSamples))).exec()


        #  Get Labwares (Cuvette, eppys, etc.) from the work table

        DiTi1000_1  = wt.getLabware(Lab.DiTi_1000ul,    "1000-1")
        DiTi1000_2  = wt.getLabware(Lab.DiTi_1000ul,    "1000-2")
        DiTi1000_3  = wt.getLabware(Lab.DiTi_1000ul,    "1000-3")

        Reactives   = wt.getLabware(Lab.GreinRack16_2mL,"Reactives" )

        #  Set the initial position of the tips

        self.go_first_pos()

        # Set volumen / sample

        SampleVolume        = 200.0
        EtOH80pVolume       = 600.0



        SampleLiqClass = "Serum Asp"  # = TissueHomLiqClass   # SerumLiqClass="Serum Asp preMix3"

        all_samples = range(NumOfSamples)
        maxTips     = min  (self.nTips, NumOfSamples)
        maxMask     = Rbt.tipsMask[maxTips]


        # Define the reactives in each labware (Cuvette, eppys, etc.)


        VEB             = Rtv.Reagent("VEB - Binding Buffer ",
                                      BindBuf, volpersample=BindingBufferVolume, defLiqClass=B_liquidClass)
        EtOH80p         = Rtv.Reagent("Ethanol 80% ",
                                      wt.getLabware(Lab.Trough_100ml,  "7-EtOH80p"     ),
                                      volpersample=EtOH80pVolume, defLiqClass=B_liquidClass)


        # Show the CheckList GUI to the user for possible small changes

        self.CheckList()
        self.set_EvoMode()

        Itr.wash_tips(wasteVol=30, FastWash=True).exec()

        Plate_lysis = wt.getLabware(Lab.MP96deepwell,   "Plate lysis"   )  # Plate 12 x 8 ?
        Plate_EtOH  = wt.getLabware(Lab.MP96deepwell,   "Plate EtOH"    )  # Plate 12 x 8 ? MP96well !!
        Samples     = wt.getLabware(Lab.EppRack6x16,    "Proben"        )  # 6x16 = 12 x 8 ?


        # Define samples and the place for temporal reactions
        par = Plate_lysis.parallelOrder(self.nTips, all_samples)
        for s in all_samples:
            Rtv.Reagent("probe_{:02d}".format(s + 1), Samples, single_use=SampleVolume,
                        pos=s + 1, defLiqClass=SampleLiqClass, excess=0)
            Rtv.Reagent("lysis_{:02d}".format(s + 1), Plate_lysis, initial_vol=0.0, pos=par[s] + 1,
                        excess=0)  # todo revise order !!!

            Rtv.Reagent("EtOH80p_{:02d}".format(s + 1), Plate_EtOH, initial_vol=0.0, pos=par[s] + 1,
                        excess=0)  # todo revise order !!!


        with group("Prefill plate with EtOH80p"):
            with tips(reuse=True, drop=False, drop_last=True):
                spread(reactive=EtOH80p, to_labware_region=Plate_EtOH.selectOnly(all_samples))
        dropTips()
        self.done()




        PanFla_119 = PrimerMix("PanFLA", ID="119", components=[Primer.IDs[320], Primer.IDs[321]])
        WNV_INNT_37 = PrimerMix("WNV_5p", ID="37", components=[Primer.IDs[20], Primer.IDs[21], Primer.IDs[22]])

        Exp_300 = PCRexperiment(300, "PanFLA mosq Grecia")

        samples = ["Pool-1",
                   "Pool-2",
                   "Pool-3",
                   "Pool-4"]

        Exp_300.addReactions(PanFla_119, samples)
        Exp_300.addReactions(WNV_INNT_37, samples)

        Exp_300.pippete_mix()  # Evo75
        Exp_300.pippete_samples()  # Evo100
    def Run(self):
        self.set_EvoMode()
        self.initialize()                       # set_defaults ??
        Rtv.NumOfSamples = self.NumOfSamples
        NumOfSamples = self.NumOfSamples
        wt           = self.worktable

        Itr.comment('Extracting RNA from {:s} samples with the MN-Vet kit'.format(str(NumOfSamples))).exec()

                                                              # Get Labwares (Cuvette, eppys, etc.) from the work table

        LysBuf      = wt.getLabware(Lab.Trough_100ml,   "2-Vl Lysis Buffer"     )
        BindBuf     = wt.getLabware(Lab.Trough_100ml,   "3-VEB Binding Buffer"  )

        DiTi1000_1  = wt.getLabware(Lab.DiTi_1000ul,    "1000-1")
        DiTi1000_2  = wt.getLabware(Lab.DiTi_1000ul,    "1000-2")
        DiTi1000_3  = wt.getLabware(Lab.DiTi_1000ul,    "1000-3")

        Reactives   = wt.getLabware(Lab.GreinRack16_2mL, "Reactives" )

                                                              #  Set the initial position of the tips

        self.go_first_pos()

                                                              # Set volumen / sample

        ProtKVolume         =  20.0
        cRNAVolume          =   4.0
        LysisBufferVolume   = 100.0                 # VL1 or VL
        IC_MS2Volume        =  10.0                 # IC2
        IC2Volume           =   5.0                 # ? 4
        BindingBufferVolume = 350.0                 # VEB
        B_BeadsVolume       =  20.0                 # B-Beads
        EtOH80pVolume       = 600.0
        SampleVolume        = 100.0
        InitLysisVol        = 0.0

        if self.version == 'in-VL inactivated':
            InitLysisVol  = SampleVolume + LysisBufferVolume

        elif self.version == 'pre Inactivated':
            InitLysisVol  = SampleVolume + ProtKVolume + cRNAVolume + IC_MS2Volume + LysisBufferVolume

                                                        # Liquid classes used for pippetting.
                                                        # Others liquidClass names are defined in "protocol_steps.py"

        SampleLiqClass = "Serum Asp"  # = TissueHomLiqClass   # SerumLiqClass="Serum Asp preMix3"

        all_samples = range(NumOfSamples)
        maxTips     = min  (self.nTips, NumOfSamples)
        maxMask     = Rbt.tipsMask[maxTips]

                                                        # Define the reactives in each labware (Cuvette, eppys, etc.)

        if self.version != 'pre Inactivated':             # we need to add ProtK+cRNA+MS2 mix
            ProtK       = Rtv.Reagent("Proteinase K ",
                                      Reactives,
                                      replicas     = 2,
                                      pos          = [15, 16],
                                      volpersample = ProtKVolume,
                                      defLiqClass  = Small_vol_disp)

            cRNA        = Rtv.Reagent("Carrier RNA ", Reactives, pos=14, volpersample=  cRNAVolume, defLiqClass=Small_vol_disp)
            IC_MS2      = Rtv.Reagent("IC MS2 phage culture ", Reactives, pos=13, volpersample= IC_MS2Volume, defLiqClass=Small_vol_disp)

            # IC2         = Rtv.Reagent("IC2 - synthetic RNA " ,  Reactives, pos=13, volpersample=  IC2Volume ,defLiqClass=W_liquidClass)

            pK_cRNA_MS2 = Rtv.preMix  ("ProtK+cRNA+IC-MS2 mix "  ,
                                           Reactives,
                                           pos=8,
                                           components=[  cRNA, ProtK, IC_MS2] ,
                                           defLiqClass=W_liquidClass,
                                           excess=20)

            if self.version != 'in-VL inactivated':
                LysisBuffer     = Rtv.Reagent("VL - Lysis Buffer ", LysBuf, volpersample=LysisBufferVolume, defLiqClass='MN VL')



        B_Beads         = Rtv.Reagent("B - Beads ",
                                      Reactives,
                                      pos          = [1,2],
                                      initial_vol  = 1200,
                                      volpersample = B_BeadsVolume,
                                      defLiqClass  = Beads_LC_2,
                                      maxFull      = 70)

        VEB             = Rtv.Reagent("VEB - Binding Buffer ", BindBuf, volpersample=BindingBufferVolume, defLiqClass=B_liquidClass)

        EtOH80p         = Rtv.Reagent("Ethanol 80% ", wt.getLabware(Lab.Trough_100ml, "7-EtOH80p"), volpersample=EtOH80pVolume, defLiqClass=B_liquidClass)


                                                        # Show the CheckList GUI to the user for possible small changes

        self.CheckList()
        self.set_EvoMode()

                                                        # Define the reactives not shown in the CheckList GUI
                                                        # Define samples and the place for temporal reactions

        Plate_lysis = wt.getLabware(Lab.MP96deepwell,   "Plate lysis"   )  # Plate 12 x 8 ?
        Plate_EtOH  = wt.getLabware(Lab.MP96deepwell,   "Plate EtOH"    )  # Plate 12 x 8 ? MP96well !!

        if self.version != 'original samples':
           Samples  = wt.getLabware(Lab.EppRack6x16,    "Proben"        )  # 6x16 = 12 x 8 ?


        par = Plate_lysis.parallelOrder(self.nTips, all_samples)

        for s in all_samples:

            if self.version == 'original samples':
                Rtv.Reagent("probe_{:02d}".format(s + 1), Samples, single_use=SampleVolume,
                            pos=s + 1, defLiqClass=SampleLiqClass, excess=0)

            Rtv.Reagent("lysis_{:02d}".format(s + 1), Plate_lysis, initial_vol=InitLysisVol, pos=s + 1,
                        excess=0)

            Rtv.Reagent("EtOH80p_{:02d}".format(s + 1), Plate_EtOH, initial_vol=0.0, pos=par[s] + 1,
                        excess=0)  # todo revise order !!!


        Itr.wash_tips(wasteVol=30, FastWash=True).exec()

        with group("Prefill plate with EtOH80p"):
            with self.tips(reuse=True, drop=False, drop_last=True):
                self.spread(reactive=EtOH80p, to_labware_region=Plate_EtOH.selectOnly(all_samples))


        with group("Sample Lysis"):
            if self.version != 'pre Inactivated':                            #  add  ProtK+cRNA+MS2 mix

                with self.tips(tipsMask=maxMask, reuse=True, drop=False, drop_last=True):
                    self.makePreMix(pK_cRNA_MS2)
                    self.spread  (  reactive=pK_cRNA_MS2,   to_labware_region= Plate_lysis.selectOnly(all_samples))


                if self.version != 'in-VL inactivated':                      # add  LysisBuffer

                    with self.tips(tipsMask=maxMask, reuse=True, drop=False, drop_last=True):
                        self.spread  (  reactive=LysisBuffer,   to_labware_region= Plate_lysis.selectOnly(all_samples))


            if self.version == 'original samples':                       # add samples

                Itr.userPrompt("Please make sure the samples are in place").exec()
                with self.tips(reuse=False, drop=True):
                    self.transfer(  from_labware_region= Samples,
                               to_labware_region=   Plate_lysis,
                               volume=              SampleVolume,
                               using_liquid_class=  (SampleLiqClass, "Serum Disp postMix3"),
                               optimizeFrom         = False,
                               optimizeTo           = False,           # todo Really ??
                               NumSamples           = NumOfSamples)
                Itr.wash_tips(wasteVol=4, FastWash=True).exec()

            if self.version != 'pre Inactivated':
                Itr.userPrompt("Please Schutteln the plates for lysis in pos 1").exec()
                with incubation(minutes=5): pass

        if self.version != 'prefill inactivation':
            Itr.userPrompt("Please make sure the samples are back in place").exec()

        with group("Beads binding"):
            with self.tips(tipsMask=maxMask, reuse=True, drop=False):
                for p in [40, 50, 60, 65]:
                    self.mix_reactive(B_Beads, LiqClass=Beads_LC_1, cycles=1, maxTips=maxTips, v_perc=p)
            with self.tips(reuse=True, drop=False):
                self.spread( reactive=B_Beads,      to_labware_region=Plate_lysis.selectOnly(all_samples))
            self.dropTips()

            with self.tips(reuse=True, drop=False):
                self.spread( reactive=VEB,          to_labware_region=Plate_lysis.selectOnly(all_samples))

            Itr.userPrompt("Please Schutteln the plates for lysis in pos 1").exec()

        self.dropTips()
        self.done()
    def Run(self):
        self.set_EvoMode()
        self.initialize()                       # set_defaults ??
        Rtv.NumOfSamples = self.NumOfSamples
        NumOfSamples = self.NumOfSamples
        wt           = self.worktable

        Itr.comment('Prefill plates with VEW1, Elution buffer and VEW2 for {:s} samples.'.format(str(NumOfSamples))).exec()


        # Get Labwares (Cuvette, eppys, etc.) from the work table

        ElutBuf     = wt.getLabware(Lab.Trough_100ml,   "1-VEL-ElutionBuffer"   )

        DiTi1000_1  = wt.getLabware(Lab.DiTi_1000ul,    "1000-1")
        DiTi1000_2  = wt.getLabware(Lab.DiTi_1000ul,    "1000-2")
        DiTi1000_3  = wt.getLabware(Lab.DiTi_1000ul,    "1000-3")

        Plate_VEW1  = wt.getLabware(Lab.MP96deepwell,   "Plate VEW1"    )  # Plate 12 x 8 ?
        Plate_VEW2  = wt.getLabware(Lab.MP96deepwell,   "Plate VEW2"    )  # Plate 12 x 8 ?
        Plate_Eluat = wt.getLabware(Lab.MP96well,       "Plate ElutB"   )  # Plate 12 x 8 ? MP96well !!


        #  Set the initial position of the tips

        self.go_first_pos()

        # Set volumen / sample

        VEW1Volume          = 600.0
        VEW2Volume          = 600.0
        ElutionBufferVolume = 100.0


        # Liquid classes used for pippetting. Others liquidClass names are defined in "protocol_steps.py"

        # SampleLiqClass = "Serum Asp"  # = TissueHomLiqClass   # SerumLiqClass="Serum Asp preMix3"


        all_samples = range(NumOfSamples)
        maxTips     = min  (self.nTips, NumOfSamples)
        maxMask     = Rbt.tipsMask[maxTips]


        # Define the reactives in each labware (Cuvette, eppys, etc.)

        VEW1            = Rtv.Reagent("VEW1 - Wash Buffer ",
                                      wt.getLabware(Lab.Trough_100ml, "4-VEW1 Wash Buffe"),
                                      volpersample  = VEW1Volume,
                                      defLiqClass   = B_liquidClass)

        VEW2            = Rtv.Reagent("VEW2 - WashBuffer ",
                                      wt.getLabware(Lab.Trough_100ml,  "5-VEW2-WashBuffer" ),
                                      volpersample  =VEW2Volume,
                                      defLiqClass   =B_liquidClass)

        ElutionBuffer   = Rtv.Reagent("Elution Buffer ",
                                      ElutBuf,
                                      volpersample  =ElutionBufferVolume,
                                      defLiqClass   =B_liquidClass)

        # Show the CheckList GUI to the user for posible small changes

        self.CheckList()
        self.set_EvoMode()

        Itr.wash_tips(wasteVol=30, FastWash=True).exec()

        par = Plate_VEW1.parallelOrder(self.nTips, all_samples)

        # Define samples and the place for temporal reactions
        for s in all_samples:
            Rtv.Reagent("VEW1_{:02d}".format(s + 1),
                        Plate_VEW1,
                        initial_vol  = 0.0,
                        pos          = par[s]+1,
                        excess       = 0)  # todo revise order !!!

            Rtv.Reagent("VEW2_{:02d}".format(s + 1),
                        Plate_VEW2,
                        initial_vol = 0.0,
                        pos         = par[s] + 1,
                        excess      = 0)

            Rtv.Reagent("Eluat_{:02d}".format(s + 1),
                        Plate_Eluat,
                        initial_vol = 0.0,
                        pos         = par[s] + 1,
                        excess      = 0)


        with group("Prefill plates with VEW1, Elution buffer and VEW2"):

            Itr.userPrompt("Put the plates for VEW1, Elution buffer and VEW2 in that order").exec()

            with self.tips(reuse=True, drop=False):
                self.spread(reactive=ElutionBuffer, to_labware_region=Plate_Eluat.selectOnly(all_samples) )  # ,optimize=False

            with self.tips(reuse=True, drop=False):
                self.spread(reactive=VEW2, to_labware_region=Plate_VEW2.selectOnly(all_samples) )  # , optimize=False

            with self.tips(reuse=True, drop=False):
                self.spread(reactive=VEW1, to_labware_region=Plate_VEW1.selectOnly(all_samples))  # , optimize=False

        self.dropTips()

        self.done()
    def Run(self):
        self.set_EvoMode()
        self.initialize()
        Rtv.NumOfSamples = self.NumOfSamples
        NumOfSamples = self.NumOfSamples
        wt           = self.worktable

        Itr.comment('Prefill {:d} plates with LysisBufferReact for {:d} samples.'\
                       .format(self.num_plates,
                               NumOfSamples     )).exec()

        # Get Labwares (Cuvette, eppys, etc.) from the work table
        LysBufCuvette = wt.getLabware(Lab.Trough_100ml, "2-Vl Lysis Buffer")

        DiTi1000_1  = wt.getLabware(Lab.DiTi_1000ul,    "1000-1")
        DiTi1000_2  = wt.getLabware(Lab.DiTi_1000ul,    "1000-2")
        DiTi1000_3  = wt.getLabware(Lab.DiTi_1000ul,    "1000-3")


        self.go_first_pos()                      #  Set the initial position of the tips

        # Set volumen / sample
        LysisBufferVolume   = 100.0       # VL1 or VL

        all_samples = range(NumOfSamples)
        maxTips     = min  (self.nTips, NumOfSamples)
        maxMask     = Rbt.tipsMask[maxTips]

        # Define the reactives in each labware (Cuvette, eppys, etc.)

        LysisBufferReact = Rtv.Reagent("VL - Lysis Buffer ",
                                       LysBufCuvette,
                                       volpersample = LysisBufferVolume,
                                       defLiqClass  = 'MN VL',
                                       num_of_samples= self.num_plates * NumOfSamples)

        # Show the CheckList GUI to the user for possible small changes

        self.CheckList()
        self.set_EvoMode()

        Itr.wash_tips(wasteVol=5, FastWash=True).exec()

        LysPlat = [wt.getLabware(Lab.MP96deepwell, "Plate lysis-"+str(i+1)) for i in range(self.num_plates)]

        par = LysPlat[0].parallelOrder(self.nTips, all_samples)

        # Define place for temporal reactions
        for i, LP in enumerate(LysPlat):
            for s in all_samples:
                Rtv.Reagent("lysis_{:d}-{:02d}".format(i + 1, s + 1),
                            LP,
                            initial_vol =0.0,
                            pos         =s + 1,
                            excess      =0)

        with group("Prefill plates with LysisBufferReact"):

            Itr.userPrompt("Put the plates for LysisBufferReact").exec()

            for LP in LysPlat:
                with self.tips(reuse=True, drop=False):
                    self.spread(reactive=LysisBufferReact, to_labware_region=LP.selectOnly(all_samples))
                self.dropTips()

        self.done()
Beispiel #7
0
    def waste(self,  from_labware_region=None, using_liquid_class=None, volume=None, to_waste_labware=None, optimize=True):

        """

        :param from_labware_region:
        :param using_liquid_class:
        :param volume:
        :param to_waste_labware:
        :param optimize:
        :return:
        """
        to_waste_labware = to_waste_labware or self.worktable.def_WashWaste
        assert isinstance(from_labware_region, Lab.Labware), 'A Labware expected in from_labware_region to transfer'
        if not volume or volume< 0.0 : volume = 0.0
        assert isinstance(volume, (int, float))
        oriSel = from_labware_region.selected()
        nt = self.robot.curArm().nTips  # the number of tips to be used in each cycle of pippeting
        if not oriSel:
            oriSel = range(Rtv.NumOfSamples)
        if optimize:
            oriSel = from_labware_region.parallelOrder(nt, oriSel)
        NumSamples = len(oriSel)
        SampleCnt = NumSamples

        if nt > SampleCnt:
            nt = SampleCnt
        tm = Rbt.tipsMask[nt]
        nt = to_waste_labware.autoselect(maxTips=nt)
        mV = self.worktable.def_DiTi.maxVol      # todo revise !! What tip tp use !

        Rest = 50  # the volume we cannot more aspire with liquid detection, to small, collisions
        RestPlus = 50
        CtrVol = 0.5

        if volume:
            v = volume
        else:
            v = from_labware_region.Wells[oriSel[0]].vol

        Asp = Itr.aspirate(tm, Te_Mag_LC, volume, from_labware_region)
        # Asp = Itr.aspirate(tm, using_liquid_class[0], volume, from_labware_region)
        Dst = Itr.dispense(tm, using_liquid_class, volume, to_waste_labware)
        # Ctr = Itr.moveLiha(Itr.moveLiha.y_move, Itr.moveLiha.z_start, 3.0, 2.0, tm, from_labware_region)

        lf = from_labware_region
        msg = "Waste: {v:.1f} µL of {n:s}".format(v=v, n=lf.label)
        with group(msg):
            msg += " [grid:{fg:d} site:{fs:d}] in order:".format(fg=lf.location.grid, fs=lf.location.site+1) \
                                     + str([i+1 for i in oriSel])
            Itr.comment(msg).exec()
            while SampleCnt:
                curSample = NumSamples - SampleCnt
                if nt > SampleCnt:
                    nt = SampleCnt
                    tm = Rbt.tipsMask[nt]
                    Asp.tipMask = tm
                    Dst.tipMask = tm

                sel = oriSel[curSample:curSample + nt]
                spl = range(curSample, curSample + nt)
                Asp.labware.selectOnly(sel)

                if volume:
                    r = volume   # r: Waste_available yet; volume: to be Waste
                else:
                    vols = [w.vol for w in Asp.labware.selected_wells()]
                    r_min, r_max = min(vols), max(vols)
                    assert r_min == r_max
                    r = r_max

                if not using_liquid_class:
                        if sel:
                            Dst.liquidClass = Asp.labware.selected_wells()[0].reactive.defLiqClass

                with self.tips(tm, drop=True, preserve=False, selected_samples=spl):
                    while r > Rest:      # dont aspire Rest with these Liq Class (Liq Detect)
                        dV = r if r < mV else mV
                        if dV < Rest: break # ??
                        dV -= Rest       # the last Rest uL have to be aspired with the other Liq Class
                        Asp.volume = dV  #  with Liq Class with Detect: ">> AVR-Serum 1000 <<	365"
                        Dst.volume = dV
                        Asp.liquidClass = Te_Mag_LC # ">> AVR-Serum 1000 <<	365"  # "No Liq Detect"
                        Asp.exec()
                        Asp.volume = CtrVol
                        Asp.liquidClass = Te_Mag_Centre


                        with self.tips(allow_air=CtrVol):
                            Asp.exec()
                            if dV + Rest + RestPlus + 2*CtrVol > mV:
                                Dst.exec()
                                r -= dV
                                Dst.volume = 0
                            else:
                                break

                    Asp.volume = Rest
                    Asp.liquidClass =  Te_Mag_Rest # ">> AVR-Serum 1000 <<	367" # "No Liq Detect"
                    with self.tips(allow_air=Rest):
                            Asp.exec()
                    Asp.volume = CtrVol
                    Asp.liquidClass = Te_Mag_Force_Centre
                    with self.tips(allow_air=CtrVol):
                            Asp.exec()
                    Asp.volume = RestPlus
                    Asp.liquidClass =  Te_Mag_RestPlus # ">> AVR-Serum 1000 <<	369" # "No Liq Detect"
                    with self.tips(allow_air=RestPlus):
                            Asp.exec()
                    #Ctr.exec()
                    Asp.volume = CtrVol
                    Asp.liquidClass = Te_Mag_Force_Centre
                    Dst.volume += Rest + RestPlus
                    with self.tips(allow_air=CtrVol):
                            Asp.exec()
                    with self.tips(allow_air=Rest + RestPlus):
                            Dst.exec()

                SampleCnt -= nt
            Asp.labware.selectOnly(oriSel)
        Itr.wash_tips(wasteVol=4).exec()
        return oriSel
Beispiel #8
0
def waste(from_labware_region=None,
          using_liquid_class=None,
          volume=None,
          to_waste_labware=None,
          optimize=True):
    """

    :param from_labware_region:
    :param using_liquid_class:
    :param volume:
    :param to_waste_labware:
    :param optimize:
    :return:
    """
    to_waste_labware = to_waste_labware or Lab.def_WashWaste
    assert isinstance(
        from_labware_region,
        Lab.Labware), 'A Labware expected in from_labware_region to transfer'
    if not volume or volume < 0.0: volume = 0.0
    assert isinstance(volume, (int, float))
    oriSel = from_labware_region.selected()
    nt = Rbt.Robot.current.curArm(
    ).nTips  # the number of tips to be used in each cycle of pippeting
    if not oriSel:
        oriSel = range(Rtv.NumOfSamples)
    if optimize:
        oriSel = from_labware_region.parallelOrder(nt, oriSel)
    NumSamples = len(oriSel)
    SampleCnt = NumSamples

    if nt > SampleCnt:
        nt = SampleCnt
    tm = Rbt.tipsMask[nt]
    nt = to_waste_labware.autoselect(maxTips=nt)
    mV = Lab.def_DiTi.maxVol  # todo revise !! What tip tp use !

    Rest = 50  # the volume we cannot more aspire with liquid detection, to small, collisions
    RestPlus = 50
    CtrVol = 0.5

    if volume:
        v = volume
    else:
        v = from_labware_region.Wells[oriSel[0]].vol

    Asp = Itr.aspirate(tm, Te_Mag_LC, volume, from_labware_region)
    # Asp = Itr.aspirate(tm, using_liquid_class[0], volume, from_labware_region)
    Dst = Itr.dispense(tm, using_liquid_class, volume, to_waste_labware)
    # Ctr = Itr.moveLiha(Itr.moveLiha.y_move, Itr.moveLiha.z_start, 3.0, 2.0, tm, from_labware_region)

    lf = from_labware_region
    msg = "Waste: {v:.1f} µL of {n:s}".format(v=v, n=lf.label)
    with group(msg):
        msg += " [grid:{fg:d} site:{fs:d}] in order:".format(fg=lf.location.grid, fs=lf.location.site+1) \
                                 + str([i+1 for i in oriSel])
        Itr.comment(msg).exec()
        while SampleCnt:
            curSample = NumSamples - SampleCnt
            if nt > SampleCnt:
                nt = SampleCnt
                tm = Rbt.tipsMask[nt]
                Asp.tipMask = tm
                Dst.tipMask = tm

            sel = oriSel[curSample:curSample + nt]
            spl = range(curSample, curSample + nt)
            Asp.labware.selectOnly(sel)

            if volume:
                r = volume  # r: Waste_available yet; volume: to be Waste
            else:
                vols = [w.vol for w in Asp.labware.selected_wells()]
                r_min, r_max = min(vols), max(vols)
                assert r_min == r_max
                r = r_max

            if not using_liquid_class:
                if sel:
                    Dst.liquidClass = Asp.labware.selected_wells(
                    )[0].reactive.defLiqClass

            with tips(tm, drop=True, preserve=False, selected_samples=spl):
                while r > Rest:  # dont aspire Rest with these Liq Class (Liq Detect)
                    dV = r if r < mV else mV
                    if dV < Rest: break  # ??
                    dV -= Rest  # the last Rest uL have to be aspired with the other Liq Class
                    Asp.volume = dV  #  with Liq Class with Detect: ">> AVR-Serum 1000 <<	365"
                    Dst.volume = dV
                    Asp.liquidClass = Te_Mag_LC  # ">> AVR-Serum 1000 <<	365"  # "No Liq Detect"
                    Asp.exec()
                    Asp.volume = CtrVol
                    Asp.liquidClass = Te_Mag_Centre

                    with tips(allow_air=CtrVol):
                        Asp.exec()
                        if dV + Rest + RestPlus + 2 * CtrVol > mV:
                            Dst.exec()
                            r -= dV
                            Dst.volume = 0
                        else:
                            break

                Asp.volume = Rest
                Asp.liquidClass = Te_Mag_Rest  # ">> AVR-Serum 1000 <<	367" # "No Liq Detect"
                with tips(allow_air=Rest):
                    Asp.exec()
                Asp.volume = CtrVol
                Asp.liquidClass = Te_Mag_Force_Centre
                with tips(allow_air=CtrVol):
                    Asp.exec()
                Asp.volume = RestPlus
                Asp.liquidClass = Te_Mag_RestPlus  # ">> AVR-Serum 1000 <<	369" # "No Liq Detect"
                with tips(allow_air=RestPlus):
                    Asp.exec()
                #Ctr.exec()
                Asp.volume = CtrVol
                Asp.liquidClass = Te_Mag_Force_Centre
                Dst.volume += Rest + RestPlus
                with tips(allow_air=CtrVol):
                    Asp.exec()
                with tips(allow_air=Rest + RestPlus):
                    Dst.exec()

            SampleCnt -= nt
        Asp.labware.selectOnly(oriSel)
    Itr.wash_tips(wasteVol=4).exec()
    return oriSel
    def Run(self):
        self.set_EvoMode()
        self.initialize()
        Rtv.NumOfSamples = self.NumOfSamples
        NumOfSamples = self.NumOfSamples
        wt           = self.worktable

        Itr.comment((self.version + 'for extracting RNA from {:s} samples with the MN-Vet kit').format(str(NumOfSamples))).exec()

                                                               # Get Labwares (Cuvette, eppys, etc.) from the work table

        if self.add_VL:
            LysBuf      = wt.getLabware(Lab.Trough_100ml,   "2-Vl Lysis Buffer"     )

        if self.do_extraction:
            BindBuf     = wt.getLabware(Lab.Trough_100ml,   "3-VEB Binding Buffer"  )
            ElutBuf     = wt.getLabware(Lab.Trough_100ml,   "1-VEL-ElutionBuffer"   )
            Eluat       = wt.getLabware(Lab.EppRack3x16R,    "Eluat")

        Samples     = wt.getLabware(Lab.EppRack3x16,     "Proben")
        Lysis       = Samples

        DiTi1000_1  = wt.getLabware(Lab.DiTi_1000ul,    "1000-1")
        DiTi1000_2  = wt.getLabware(Lab.DiTi_1000ul,    "1000-2")
        DiTi1000_3  = wt.getLabware(Lab.DiTi_1000ul,    "1000-3")

        Reactives   = wt.getLabware(Lab.GreinRack16_2mL, "Reactives" )

        if self.do_extraction:
            self.TeMg_Heat = wt.getLabware(Lab.TeMag48, "48 Pos Heat")
            self.TeMag     = wt.getLabware(Lab.TeMag48, "48PosMagnet")
            TeMag          = self.TeMag
            Lysis  =  TeMag

                                                               #  Set the initial position of the tips

        self.go_first_pos()

                                                               # Set volumen / sample

        SampleVolume        = 200.0
        LysisBufferVolume   = 180.0             # VL
        IC2Volume           = 4.0               # IC2
        BindingBufferVolume = 600.0             # VEB
        B_BeadsVolume       = 20.0              # B-Beads
        VEW1Volume          = 600.0             # VEW1
        VEW2Volume          = 600.0             # VEW2
        EtOH80pVolume       = 600.0
        ProtKVolume         = 20.0
        cRNAVolume          = 4.0
        IC_MS2Volume        = 20.0              # MS2
        ElutionBufferVolume = 100.0             # VEL

        InitLysisVol        = 0.0
        if self.do_extraction:
            if not self.add_samples:    InitLysisVol += SampleVolume
            if not self.add_preMix:     InitLysisVol += ProtKVolume + cRNAVolume + IC_MS2Volume
            if not self.add_VL:         InitLysisVol += LysisBufferVolume


        # Liquid classes used for pippetting.
                                                        # Others liquidClass names are defined in "protocol_steps.py"

        SampleLiqClass      = "Serum Asp"  # = TissueHomLiqClass   # SerumLiqClass="Serum Asp preMix3"

        all_samples = range(NumOfSamples)
        maxTips     = min  (self.nTips, NumOfSamples)
        maxMask     = Rbt.tipsMask[maxTips]
        if self.do_extraction:
            par         = TeMag.parallelOrder(self.nTips, all_samples)

                                                        # Define the reactives in each labware (Cuvette, eppys, etc.)

        # IC2         = Rtv.Reagent("IC2 - synthetic RNA " ,  Reactives, pos=13, volpersample=  IC2Volume ,defLiqClass=W_liquidClass)

        if self.add_preMix:
            ProtK = Rtv.Reagent("Proteinase K ",
                                Reactives,
                                replicas=2,
                                pos=[15, 16],  # only 16 ?  pos=16
                                volpersample=ProtKVolume,
                                defLiqClass=Small_vol_disp)

            cRNA   = Rtv.Reagent("Carrier RNA ", Reactives, pos=14, volpersample=cRNAVolume, defLiqClass=Small_vol_disp)
            IC_MS2 = Rtv.Reagent("IC MS2 phage culture ", Reactives, pos=13, volpersample=IC_MS2Volume, defLiqClass=Small_vol_disp)

            pK_cRNA_MS2 = Rtv.preMix("ProtK+cRNA+IC-MS2 mix ",
                                     Reactives,
                                     pos=8,
                                     components=[cRNA, ProtK, IC_MS2],
                                     defLiqClass=W_liquidClass,
                                     excess=20)

        if self.add_VL:
            LysisBuffer = Rtv.Reagent("VL - Lysis Buffer ", LysBuf, volpersample=LysisBufferVolume, defLiqClass='MN VL')

        if self.do_extraction:
            B_Beads         = Rtv.Reagent("B - Beads ",
                                          Reactives,
                                          pos          = [1,2],
                                          initial_vol  = 1200,
                                          volpersample = B_BeadsVolume,
                                          defLiqClass  = Beads_LC_2,
                                          maxFull      = 70)

            BindingBuffer   = Rtv.Reagent("VEB - Binding Buffer ", BindBuf, volpersample=BindingBufferVolume, defLiqClass=B_liquidClass)

            VEW1            = Rtv.Reagent("VEW1 - Wash Buffer ",
                                          wt.getLabware(Lab.Trough_100ml, "4-VEW1 Wash Buffe"),
                                          volpersample  = VEW1Volume,
                                          defLiqClass   = B_liquidClass)

            VEW2            = Rtv.Reagent("VEW2 - WashBuffer ",
                                          wt.getLabware(Lab.Trough_100ml,  "5-VEW2-WashBuffer" ),
                                          volpersample  =VEW2Volume,
                                          defLiqClass   =B_liquidClass)

            EtOH80p         = Rtv.Reagent("Ethanol 80% ",
                                          Lab.getLabware(Lab.Trough_100ml,  "7-EtOH80p"     ),
                                          volpersample=EtOH80pVolume, defLiqClass=B_liquidClass)

            ElutionBuffer   = Rtv.Reagent("Elution Buffer ",
                                          ElutBuf,
                                          volpersample  =ElutionBufferVolume,
                                          defLiqClass   =B_liquidClass)            # defLiqClass="Eluat"   ??

                                                        # Show the CheckList GUI to the user for possible small changes
        self.CheckList()
        self.set_EvoMode()
                                                        # Define the reactives not shown in the CheckList GUI
                                                        # Define samples and the place for temporal reactions
        for s in all_samples:
            Rtv.Reagent("lysis_{:02d}".format(s + 1), Lysis, initial_vol=InitLysisVol,
                        pos=s + 1, defLiqClass=SampleLiqClass, excess=0)
            if self.do_extraction:
                Rtv.Reagent("RNA_{:02d}".format(s + 1), Eluat, initial_vol= 0.0,
                            pos=s+1, defLiqClass=def_liquidClass, excess=0)
                if self.add_samples:
                    Rtv.Reagent("probe_{:02d}".format(s + 1), Samples, single_use=SampleVolume,
                                pos=s+1, defLiqClass=SampleLiqClass, excess=0)

        Itr.wash_tips(wasteVol=30, FastWash=True).exec()
        if self.do_extraction:
            Te_MagS_ActivateHeater(50).exec()
            Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Dispense).exec()

        if self.add_preMix:                                                               #  add  ProtK+cRNA+MS2 mix
            with self.tips(tipsMask=maxMask, reuse=True, drop=False):
                self.makePreMix(pK_cRNA_MS2)
                self.spread  (  reactive=pK_cRNA_MS2,   to_labware_region= Lysis.selectOnly(all_samples))

        if self.add_samples:                                                               # add samples
            with self.tips(reuse=True, drop=True, preserve=True):
                self.transfer( from_labware_region  = Samples,
                               to_labware_region    = Lysis,
                               volume               = SampleVolume,
                               using_liquid_class   = (SampleLiqClass, "Serum Disp postMix3"),
                               optimizeFrom         = False,
                               optimizeTo           = True,
                               NumSamples           = NumOfSamples)
            Itr.wash_tips(wasteVol=4, FastWash=True).exec()

        if self.add_VL:                                                                     # add  LysisBuffer
            with self.tips(reuse=True, drop=False):    # better reuse=True, drop=False ??
                self.spread  (  reactive=LysisBuffer,   to_labware_region= Lysis.selectOnly(all_samples))


        if not self.do_extraction:
            self.done()
            return

        with incubation(10): pass


        with group("Beads binding"):

            with self.tips(tipsMask=maxMask, reuse=True, drop=False):
                for p in [40, 50, 60, 65]:
                    self.mix_reactive(B_Beads, LiqClass=Beads_LC_1, cycles=1, maxTips=maxTips, v_perc=p)
            with self.tips(reuse=True, drop=True):
                self.spread( reactive=B_Beads,      to_labware_region=TeMag.selectOnly(all_samples))

            with self.tips(reuse=True, drop=False, preserve=True, usePreserved=True):
                self.wash_in_TeMag(reactive=BindingBuffer, wells=all_samples)



        with self.tips(reuse=True, drop=False, preserve=True):
            self.wash_in_TeMag(reactive=VEW1, wells=all_samples)
            self.wash_in_TeMag(reactive=VEW2, wells=all_samples)

            with self.group("Wash in TeMag with " + EtOH80p.name), self.tips():
                self.spread( reactive=EtOH80p, to_labware_region= TeMag.selectOnly(all_samples))

                with parallel_execution_of(mix_mag_sub, repeat=NumOfSamples//self.nTips + 1):
                    self.mix( TeMag.selectOnly(all_samples), EtOH80p.defLiqClass)
                with incubation(minutes=0.5):
                    Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Aspirate, z_pos=24).exec()
                with self.tips(usePreserved=self.preserveingTips()):
                    self.waste( from_labware_region=    TeMag.selectOnly(all_samples))

                with incubation(minutes=4):
                    Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Incubation).exec()
                with incubation(minutes=4):
                    Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Aspirate, z_pos=24).exec()


            self.spread( reactive=ElutionBuffer, to_labware_region=TeMag.selectOnly(all_samples))
            with incubation(minutes=2):
                Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Incubation).exec()

            Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Dispense).exec()
            with parallel_execution_of(mix_mag_eluat, repeat=NumOfSamples//self.nTips+1):
                self.mix(TeMag.selectOnly(all_samples), ElutionBuffer.defLiqClass)

            with self.tips(usePreserved=self.preserveingTips(), preserve=False, drop=True):
                with incubation(minutes=1.0, timer=2):
                    Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Aspirate).exec()
                self.transfer(   from_labware_region=   TeMag.selectOnly(all_samples),
                                 to_labware_region=     Eluat.selectOnly(all_samples),
                                 volume=                ElutionBufferVolume,
                                 optimizeTo=            False,
                                 using_liquid_class=(ElutionBuffer.defLiqClass, ElutionBuffer.defLiqClass))
        self.done()
Beispiel #10
0
def extractRNA_with_MN_Vet_Kit(NumOfSamples, CheckList=None):

    Rtv.NumOfSamples = NumOfSamples
    import protocols.RNAextractionMN_Mag.RobotInitRNAextraction as RI

    Itr.comment('Extracting RNA from {:s} samples with the MN-Vet kit'.format(
        str(NumOfSamples))).exec()

    # DiTi1000_1.fill('C06')
    # DiTi1000_2.fill('A11')
    # DiTi1000_3.fill('A10')
    Itr.set_DITI_Counter2(RI.DiTi1000_1, posInRack='A01').exec()

    SampleVolume = 200.0
    LysisBufferVolume = 180.0
    IC2Volume = 4.0
    BindingBufferVolume = 600.0
    B_BeadsVolume = 20.0
    VEW1Volume = 600.0
    VEW2Volume = 600.0
    EtOH80pVolume = 600.0
    ProtKVolume = 20.0
    cRNAVolume = 4.0
    IC_MS2Volume = 20.0
    ElutionBufferVolume = 100.0

    SampleLiqClass = "Serum Asp"  # = TissueHomLiqClass   # SerumLiqClass="Serum Asp preMix3"

    all_samples = range(Rtv.NumOfSamples)
    maxTips = min(Rbt.nTips, Rtv.NumOfSamples)
    maxMask = Rbt.tipsMask[maxTips]
    par = RI.TeMag.parallelOrder(Rbt.nTips, all_samples)

    LysisBuffer = Rtv.Reactive("VL - Lysis Buffer ",
                               RI.LysBuf,
                               volpersample=LysisBufferVolume,
                               defLiqClass=B_liquidClass)
    IC2 = Rtv.Reactive("IC2 - synthetic RNA ",
                       RI.Reactives,
                       pos=11,
                       volpersample=IC2Volume,
                       defLiqClass=W_liquidClass)
    BindingBuffer = Rtv.Reactive("VEB - Binding Buffer ",
                                 RI.BindBuf,
                                 volpersample=BindingBufferVolume,
                                 defLiqClass=B_liquidClass)
    B_Beads = Rtv.Reactive("B - Beads ",
                           RI.Reactives,
                           initial_vol=1200,
                           pos=1,
                           volpersample=B_BeadsVolume,
                           replicas=2,
                           defLiqClass=Beads_LC_2)

    VEW1 = Rtv.Reactive("VEW1 - Wash Buffer ",
                        Lab.Cuvette(Lab.Trough_100ml,
                                    Lab.Labware.Location(22, 4),
                                    "4-VEW1 Wash Buffer"),
                        volpersample=VEW1Volume,
                        defLiqClass=B_liquidClass)
    VEW2 = Rtv.Reactive("VEW2 - WashBuffer ",
                        Lab.Cuvette(Lab.Trough_100ml,
                                    Lab.Labware.Location(22, 5),
                                    "5-VEW2-WashBuffer"),
                        volpersample=VEW2Volume,
                        defLiqClass=B_liquidClass)
    EtOH80p = Rtv.Reactive("Ethanol 80% ",
                           Lab.Cuvette(Lab.Trough_100ml,
                                       Lab.Labware.Location(24, 1),
                                       "7-Ethanol 80%"),
                           volpersample=EtOH80pVolume,
                           defLiqClass=B_liquidClass)
    ElutionBuffer = Rtv.Reactive("Elution Buffer ",
                                 RI.ElutBuf,
                                 volpersample=ElutionBufferVolume,
                                 defLiqClass="Eluat")

    ProtK = Rtv.Reactive("Proteinase K ",
                         RI.Reactives,
                         pos=16,
                         volpersample=ProtKVolume,
                         defLiqClass=Small_vol_disp)
    cRNA = Rtv.Reactive("Carrier RNA ",
                        RI.Reactives,
                        pos=15,
                        volpersample=cRNAVolume,
                        defLiqClass=Small_vol_disp)
    IC_MS2 = Rtv.Reactive("IC MS2 phage culture ",
                          RI.Reactives,
                          pos=14,
                          volpersample=IC_MS2Volume,
                          defLiqClass=Small_vol_disp)
    pK_cRNA_MS2 = Rtv.preMix("ProtK+cRNA+IC-MS2 mix ",
                             RI.Reactives,
                             pos=12,
                             components=[ProtK, cRNA, IC_MS2],
                             defLiqClass=W_liquidClass,
                             replicas=2)
    Waste = Rtv.Reactive("Waste ", RI.WashWaste)

    if CheckList is not None:
        CheckList()

    for s in all_samples:
        Rtv.Reactive("probe_{:02d}".format(s + 1),
                     RI.Samples,
                     single_use=SampleVolume,
                     pos=s + 1,
                     defLiqClass=SampleLiqClass,
                     excess=0)
        Rtv.Reactive("lysis_{:02d}".format(s + 1),
                     RI.TeMag,
                     initial_vol=0.0,
                     pos=par[s] + 1,
                     defLiqClass=def_liquidClass,
                     excess=0)
        Rtv.Reactive("RNA_{:02d}".format(s + 1),
                     RI.Eluat,
                     initial_vol=0.0,
                     pos=s + 1,
                     defLiqClass=def_liquidClass,
                     excess=0)

    Itr.wash_tips(wasteVol=30, FastWash=True).exec()
    Te_MagS_ActivateHeater(50).exec()
    Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Dispense).exec()

    with tips(tipsMask=maxMask, reuse=True, drop=False):
        pK_cRNA_MS2.make()
        spread(reactive=pK_cRNA_MS2,
               to_labware_region=RI.TeMag.selectOnly(all_samples))

    with tips(reuse=True, drop=True, preserve=True):
        transfer(from_labware_region=RI.Samples,
                 to_labware_region=RI.TeMag,
                 volume=SampleVolume,
                 using_liquid_class=(SampleLiqClass, "Serum Disp postMix3"),
                 optimizeFrom=False,
                 optimizeTo=True,
                 NumSamples=Rtv.NumOfSamples)
    Itr.wash_tips(wasteVol=4, FastWash=True).exec()

    with tips(reuse=False, drop=True):
        spread(reactive=LysisBuffer,
               to_labware_region=RI.TeMag.selectOnly(all_samples))

    with incubation(10):
        pass

    with tips(tipsMask=maxMask, reuse=True, drop=False):
        for p in [40, 50, 60, 65]:
            mix_reactive(B_Beads,
                         LiqClass=Beads_LC_1,
                         cycles=1,
                         maxTips=maxTips,
                         v_perc=p)


#        mix_reactive(B_Beads, LiqClass=Beads_LC_2, cycles=3, maxTips=maxTips, v_perc=90)

    with tips(reuse=True, drop=True):
        spread(reactive=B_Beads,
               to_labware_region=RI.TeMag.selectOnly(all_samples))

    with tips(reuse=True, drop=False, preserve=True, usePreserved=True):
        wash_in_TeMag(reactive=BindingBuffer, wells=all_samples)

    with tips(reuse=True, drop=False, preserve=True):
        wash_in_TeMag(reactive=VEW1, wells=all_samples)
        wash_in_TeMag(reactive=VEW2, wells=all_samples)

        with group("Wash in TeMag with " + EtOH80p.name), tips():
            spread(reactive=EtOH80p,
                   to_labware_region=RI.TeMag.selectOnly(all_samples))

            with parallel_execution_of(mix_mag_sub,
                                       repeat=Rtv.NumOfSamples // Rbt.nTips +
                                       1):
                mix(RI.TeMag.selectOnly(all_samples), EtOH80p.defLiqClass)
            with incubation(minutes=0.5):
                Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Aspirate,
                                       z_pos=24).exec()
            with tips(usePreserved=preserveingTips()):
                waste(from_labware_region=RI.TeMag.selectOnly(all_samples))

            with incubation(minutes=4):
                Te_MagS_MoveToPosition(
                    Te_MagS_MoveToPosition.Incubation).exec()
            with incubation(minutes=4):
                Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Aspirate,
                                       z_pos=24).exec()

        spread(reactive=ElutionBuffer,
               to_labware_region=RI.TeMag.selectOnly(all_samples))
        with incubation(minutes=2):
            Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Incubation).exec()

        Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Dispense).exec()
        with parallel_execution_of(mix_mag_eluat,
                                   repeat=Rtv.NumOfSamples // Rbt.nTips + 1):
            mix(RI.TeMag.selectOnly(all_samples), ElutionBuffer.defLiqClass)

        with tips(usePreserved=preserveingTips(), preserve=False, drop=True):
            with incubation(minutes=1.0, timer=2):
                Te_MagS_MoveToPosition(Te_MagS_MoveToPosition.Aspirate).exec()
            transfer(from_labware_region=RI.TeMag.selectOnly(all_samples),
                     to_labware_region=RI.Eluat.selectOnly(all_samples),
                     volume=ElutionBufferVolume,
                     optimizeTo=False,
                     using_liquid_class=(ElutionBuffer.defLiqClass,
                                         ElutionBuffer.defLiqClass))