예제 #1
0
 def sanitize(self, nmix=1, deepvol=20, force=False):
     'Deep wash including RNase-Away treatment'
     fixedTips = (~self.DITIMASK) & 15
     worklist.flushQueue()
     if not force and fixedTips == self.cleanTips:
         # print no sanitize needed
         worklist.comment("Sanitize not needed cleanTips=%d" %
                          self.cleanTips)
         return
     worklist.comment("Sanitize (cleanTips=%d)" % self.cleanTips)
     worklist.wash(15, 1, 2)
     fixedWells = []
     if not self.overrideSanitize:
         for i in range(4):
             if (fixedTips & (1 << i)) != 0:
                 fixedWells.append(i)
                 decklayout.BLEACH.addhistory("SANITIZE", 0, 1 << i)
         worklist.mix(fixedTips, fixedWells, decklayout.BLEACH.mixLC, 200,
                      decklayout.BLEACH.plate, nmix, False)
         worklist.wash(fixedTips, 1, deepvol, True)
     self.cleanTips |= fixedTips
     # print "* Sanitize"
     worklist.comment(clock.statusString())
예제 #2
0
    def mix(self, tipMask, preaspirateAir=False, nmix=4):
        if self.isMixed() and self.wellMixed:
            logging.notice(
                "mix() called for sample %s, which is already mixed" %
                self.name)
            return False
        logging.mixwarning("Pipette mixing of %s may introduce bubbles" %
                           self.name)

        self.volcheck(tipMask, [self.well], 0)

        blowvol = 5
        mstr = ""
        extraspace = blowvol + 0.1
        if preaspirateAir:
            extraspace += 5
        mixvol = self.volume  # -self.plate.unusableVolume;  # Can mix entire volume, if air is aspirated, it will just be dispensed first without making a bubble
        if self.volume > MAXVOLUME - extraspace:
            mixvol = MAXVOLUME - extraspace
            logging.mixwarning(
                "Mix of %s limited to %.0f ul instead of full volume of %.0ful"
                % (self.name, mixvol, self.volume))
        well = [self.well if self.well != None else 2**(tipMask - 1) - 1]
        mixprefillvol = 5
        if mixvol < self.plate.unusableVolume - mixprefillvol:
            logging.notice("Not enough volume in sample %s (%.1f) to mix" %
                           (self.name, self.volume))
            self.history += "(UNMIXED)"
            return False
        else:
            if preaspirateAir:
                # Aspirate some air to avoid mixing with excess volume aspirated into pipette from source in previous transfer
                self.aspirateAir(tipMask, 5)
            if False:  # this results in losing mixprefillvol of sample which was not mixed; remainder has different concentration than planned
                worklist.aspirateNC(tipMask, well, self.inliquidLC,
                                    mixprefillvol, self.plate)
                self.removeVolume(mixprefillvol)
                self.addhistory("(PRE)", -mixprefillvol, tipMask)
                worklist.mix(tipMask, well, self.mixLC, mixvol, self.plate,
                             nmix)
                mstr = "(MB)"
            elif False:  # self.volume>=MINLIQUIDDETECTVOLUME:    # Another short-lived strategy
                worklist.mix(tipMask, well, self.inliquidLC, mixvol,
                             self.plate, nmix)
                self.history += "(MLD)"
            else:
                height = self.plate.getliquidheight(self.volume)
                if height is None:
                    worklist.mix(tipMask, well, self.mixLC, mixvol, self.plate,
                                 nmix)
                    mstr = "(MB)"
                else:
                    mixheight = math.floor(
                        height - 1)  # At least 1mm below liquid height
                    if mixheight < 2:
                        mixheight = 2
#                    print 'Vol=%.1f ul, height=%.1f mm, mix=%d, blow=%d'%(self.volume,height,mixheight,blowheight)
                    mixLC = liquidclass.LCMix[min(12, mixheight)]
                    if blowvol > 0:
                        blowoutLC = liquidclass.LCBlowoutLD
                        worklist.aspirateNC(tipMask, well, self.airLC,
                                            (blowvol + 0.1), self.plate)
                    if self.volume < 30:
                        worklist.mix(tipMask, well, self.mixLC, mixvol,
                                     self.plate, nmix)
                        mstr = "(MB)"
                    else:
                        for _ in range(nmix):
                            worklist.aspirateNC(tipMask, well, mixLC, mixvol,
                                                self.plate)
                            worklist.dispense(tipMask, well, mixLC, mixvol,
                                              self.plate)
                        mstr = "(M@%d)" % (mixheight)
                    if blowvol > 0:
                        worklist.dispense(tipMask, well, blowoutLC, blowvol,
                                          self.plate)
                        worklist.dispense(tipMask, well, liquidclass.LCDip,
                                          0.1, self.plate)

            self.removeVolume(MIXLOSS)
            self.addhistory(mstr, -MIXLOSS, tipMask)
            self.lastMixed = clock.elapsed()
            self.wellMixed = True
            return True
예제 #3
0
import worklist
import plate

#aspirate(1,"LC",[1,3,4],1,2,3,"wells")
plate1 = plate.Plate("Samples", 4, 3, 12, 8)
worklist.aspirate(7, ['B3', 'D3', 'E3'], "Water", [10, 20, 30], plate1)
worklist.aspirate(7, ['B4', 'D4', 'F4'], "Water", [10, 20, 30], plate1)
worklist.aspirate(1, ['B1'], "Water", [10], plate1)
worklist.dispense(2, ['B1'], "Water", [10], plate1)
worklist.mix(2, ['B1'], "Water", [10], plate1, 7)
worklist.vector("ROMAVector", plate1, worklist.SAFETOEND, True, worklist.OPEN,
                worklist.CLOSE)
worklist.execute("python test", True, "result")
worklist.userprompt("Script done")
worklist.dump()