Exemplo n.º 1
0
    def aspirate(self,tipMask,volume,multi=False):
        self.evapcheck('aspirate')
        if self.plate.curloc=='PTC':
            print "Aspirate from PTC!, loc=",self.plate.grid,",",self.plate.pos
            assert False

        if volume<0.1:
            print "WARNING: attempt to aspirate only %.1f ul from %s ignored"%(volume,self.name)
            return
        if volume<2 and not multi and self.name!="Water":
            print "WARNING: Inaccurate for < 2ul:  attempting to aspirate %.1f ul from %s"%(volume,self.name)
        if volume>self.volume and self.volume>0:
            print "ERROR:Attempt to aspirate %.1f ul from %s that contains only %.1f ul"%(volume, self.name, self.volume)
        if not self.isMixed() and self.plate.curloc!="Magnet":
            if self.hasBeads and self.lastMixed is not None:
                print "WARNING: Aspirate %.1f ul from sample %s that has beads and has not been mixed for %.0f sec. "%(volume,self.name,clock.elapsed()-self.lastMixed)
            else:
                print "WARNING: Aspirate %.1f ul from unmixed sample %s. "%(volume,self.name)
        if not self.wellMixed:
            print "WARNING: Aspirate %.1f ul from poorly mixed sample %s (shake speed was too low). "%(volume,self.name)
                
        if self.well is None:
            well=[]
            for i in range(4):
                if (tipMask & (1<<i)) != 0:
                    well.append(i)
        else:
            well=[self.well]

        lc=self.chooseLC(volume)
        if self.hasBeads and self.plate.curloc=="Magnet":
            # With beads don't do any manual conditioning and don't remove extra (since we usually want to control exact amounts left behind, if any)
            worklist.aspirateNC(tipMask,well,lc,volume,self.plate)
            remove=lc.volRemoved(volume,multi=False)
            if self.volume==volume:
                # Removing all, ignore excess remove
                remove=self.volume
                self.ingredients={}
        else:
            worklist.aspirate(tipMask,well,lc,volume,self.plate)
            # Manual conditioning handled in worklist
            remove=lc.volRemoved(volume,multi=True)

        if self.volume<remove and self.volume>0:
            print "WARNING: Removing all contents (%.1f from %.1ful) from %s"%(remove,self.volume,self.name)
            remove=self.volume
            self.ingredients={}
        for k in self.ingredients:
            if self.plate.curloc=="Magnet" and k=='BIND':
                pass
            else:
                self.ingredients[k] *= (self.volume-remove)/self.volume

        self.volume=self.volume-remove
        if self.volume+.001<self.plate.unusableVolume and self.volume+remove>0 and not (self.hasBeads and self.plate.curloc=='Magnet'):
            print "WARNING: Aspiration of %.1ful from %s brings volume down to %.1ful which is less than its unusable volume of %.1f ul"%(remove,self.name,self.volume,self.plate.unusableVolume)
            
        self.addhistory("",-remove,tipMask)
Exemplo n.º 2
0
    def aspirate(self,tipMask,volume,multi=False):
        self.evapcheck('aspirate')
        if self.plate.curloc=='PTC':
            logging.error( "Aspirate from PTC!, loc=%d,%d"%(self.plate.grid,self.plate.pos))

        removeAll=volume==self.volume
        if removeAll:
            logging.notice("Removing all contents (%.1ful) from %s"%(volume,self.name))
            
        if volume<0.1:
            logging.warning("attempt to aspirate only %.1f ul from %s ignored"%(volume,self.name))
            return
        if volume<2 and not multi and self.name!="Water":
            logging.warning("Inaccurate for < 2ul:  attempting to aspirate %.1f ul from %s"%(volume,self.name))
        if volume>self.volume and self.volume>0:
            logging.error("Attempt to aspirate %.1f ul from %s that contains only %.1f ul"%(volume, self.name, self.volume))
        if not self.isMixed() and self.plate.curloc!="Magnet":
            if self.hasBeads and self.lastMixed is not None:
                logging.mixwarning("Aspirate %.1f ul from sample %s that has beads and has not been mixed for %.0f sec. "%(volume,self.name,clock.elapsed()-self.lastMixed))
            else:
                logging.mixwarning("Aspirate %.1f ul from unmixed sample %s. "%(volume,self.name))
        if not self.wellMixed and self.plate.curloc!="Magnet":
            logging.mixwarning("Aspirate %.1f ul from poorly mixed sample %s (shake speed was too low). "%(volume,self.name))

        if self.well is None:
            well=[]
            for i in range(4):
                if (tipMask & (1<<i)) != 0:
                    well.append(i)
        else:
            well=[self.well]

        lc=self.chooseLC(volume)
            
        self.volcheck(tipMask,well,volume)

        if (self.hasBeads and self.plate.curloc=="Magnet") or removeAll:
            # With beads don't do any manual conditioning and don't remove extra (since we usually want to control exact amounts left behind, if any)
            worklist.aspirateNC(tipMask,well,lc,volume,self.plate)
            remove=lc.volRemoved(volume,multi=False)
            if self.volume==volume:
                # Removing all, ignore excess remove
                remove=self.volume-0.1   # Leave behind enough to be able to keep track of ingredients
                self.emptied=True
        else:
            worklist.aspirate(tipMask,well,lc,volume,self.plate)
            # Manual conditioning handled in worklist
            remove=lc.volRemoved(volume,multi=True)

            if self.volume<remove+0.1 and self.volume>0:
                logging.warning("Removing all contents (%.1f from %.1ful) from %s"%(remove,self.volume,self.name))
                remove=self.volume-0.1   # Leave residual

        for k in self.ingredients:
            self.ingredients[k] *= (self.volume-remove)/self.volume

        self.volume=self.volume-remove
        if self.volume+.001<self.plate.unusableVolume and self.volume+remove>0 and not (self.hasBeads and self.plate.curloc=='Magnet') and not removeAll:
            logging.warning("Aspiration of %.1ful from %s brings volume down to %.1ful which is less than its unusable volume of %.1f ul"%(remove,self.name,self.volume,self.plate.unusableVolume))
            
        self.addhistory("",-remove,tipMask)
Exemplo n.º 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()
Exemplo n.º 4
0
    def aspirate(self, tipMask, volume, multi=False):
        self.evapcheck('aspirate')
        if self.plate.curloc == 'PTC':
            logging.error("Aspirate from PTC!, loc=%d,%d" %
                          (self.plate.grid, self.plate.pos))

        removeAll = volume == self.volume
        if removeAll:
            logging.notice("Removing all contents (%.1ful) from %s" %
                           (volume, self.name))

        if volume < 0.1:
            logging.warning(
                "attempt to aspirate only %.1f ul from %s ignored" %
                (volume, self.name))
            return
        if volume < 2 and not multi and self.name != "Water":
            logging.warning(
                "Inaccurate for < 2ul:  attempting to aspirate %.1f ul from %s"
                % (volume, self.name))
        if volume > self.volume and self.volume > 0:
            logging.error(
                "Attempt to aspirate %.1f ul from %s that contains only %.1f ul"
                % (volume, self.name, self.volume))
        if not self.isMixed() and self.plate.curloc != "Magnet":
            if self.hasBeads and self.lastMixed is not None:
                logging.mixwarning(
                    "Aspirate %.1f ul from sample %s that has beads and has not been mixed for %.0f sec. "
                    % (volume, self.name, clock.elapsed() - self.lastMixed))
            else:
                logging.mixwarning(
                    "Aspirate %.1f ul from unmixed sample %s. " %
                    (volume, self.name))
        if not self.wellMixed and self.plate.curloc != "Magnet":
            logging.mixwarning(
                "Aspirate %.1f ul from poorly mixed sample %s (shake speed was too low). "
                % (volume, self.name))

        if self.well is None:
            well = []
            for i in range(4):
                if (tipMask & (1 << i)) != 0:
                    well.append(i)
        else:
            well = [self.well]

        lc = self.chooseLC(volume)

        self.volcheck(tipMask, well, volume)

        if (self.hasBeads and self.plate.curloc == "Magnet") or removeAll:
            # With beads don't do any manual conditioning and don't remove extra (since we usually want to control exact amounts left behind, if any)
            worklist.aspirateNC(tipMask, well, lc, volume, self.plate)
            remove = lc.volRemoved(volume, multi=False)
            if self.volume == volume:
                # Removing all, ignore excess remove
                remove = self.volume - 0.1  # Leave behind enough to be able to keep track of ingredients
                self.emptied = True
        else:
            worklist.aspirate(tipMask, well, lc, volume, self.plate)
            # Manual conditioning handled in worklist
            remove = lc.volRemoved(volume, multi=True)

            if self.volume < remove + 0.1 and self.volume > 0:
                logging.warning(
                    "Removing all contents (%.1f from %.1ful) from %s" %
                    (remove, self.volume, self.name))
                remove = self.volume - 0.1  # Leave residual

        self.removeVolume(remove)
        if self.volume + .001 < self.plate.unusableVolume and self.volume + remove > 0 and not (
                self.hasBeads
                and self.plate.curloc == 'Magnet') and not removeAll:
            logging.warning(
                "Aspiration of %.1ful from %s brings volume down to %.1ful which is less than its unusable volume of %.1f ul"
                % (remove, self.name, self.volume, self.plate.unusableVolume))

        self.addhistory("", -remove, tipMask)
Exemplo n.º 5
0
    def aspirate(self, tipMask, volume, multi=False):
        self.evapcheck('aspirate')
        if self.plate.curloc == 'PTC':
            print "Aspirate from PTC!, loc=", self.plate.grid, ",", self.plate.pos
            assert False

        if volume < 0.1:
            print "WARNING: attempt to aspirate only %.1f ul from %s ignored" % (
                volume, self.name)
            return
        if volume < 2 and not multi and self.name != "Water":
            print "WARNING: Inaccurate for < 2ul:  attempting to aspirate %.1f ul from %s" % (
                volume, self.name)
        if volume > self.volume and self.volume > 0:
            print "ERROR:Attempt to aspirate %.1f ul from %s that contains only %.1f ul" % (
                volume, self.name, self.volume)
        if not self.isMixed() and self.plate.curloc != "Magnet":
            if self.hasBeads and self.lastMixed is not None:
                print "WARNING: Aspirate %.1f ul from sample %s that has beads and has not been mixed for %.0f sec. " % (
                    volume, self.name, clock.elapsed() - self.lastMixed)
            else:
                print "WARNING: Aspirate %.1f ul from unmixed sample %s. " % (
                    volume, self.name)
        if not self.wellMixed:
            print "WARNING: Aspirate %.1f ul from poorly mixed sample %s (shake speed was too low). " % (
                volume, self.name)

        if self.well is None:
            well = []
            for i in range(4):
                if (tipMask & (1 << i)) != 0:
                    well.append(i)
        else:
            well = [self.well]

        lc = self.chooseLC(volume)
        if self.hasBeads and self.plate.curloc == "Magnet":
            # With beads don't do any manual conditioning and don't remove extra (since we usually want to control exact amounts left behind, if any)
            worklist.aspirateNC(tipMask, well, lc, volume, self.plate)
            remove = lc.volRemoved(volume, multi=False)
            if self.volume == volume:
                # Removing all, ignore excess remove
                remove = self.volume
                self.ingredients = {}
        else:
            worklist.aspirate(tipMask, well, lc, volume, self.plate)
            # Manual conditioning handled in worklist
            remove = lc.volRemoved(volume, multi=True)

        if self.volume < remove and self.volume > 0:
            print "WARNING: Removing all contents (%.1f from %.1ful) from %s" % (
                remove, self.volume, self.name)
            remove = self.volume
            self.ingredients = {}
        for k in self.ingredients:
            if self.plate.curloc == "Magnet" and k == 'BIND':
                pass
            else:
                self.ingredients[k] *= (self.volume - remove) / self.volume

        self.volume = self.volume - remove
        if self.volume + .001 < self.plate.unusableVolume and self.volume + remove > 0 and not (
                self.hasBeads and self.plate.curloc == 'Magnet'):
            print "WARNING: Aspiration of %.1ful from %s brings volume down to %.1ful which is less than its unusable volume of %.1f ul" % (
                remove, self.name, self.volume, self.plate.unusableVolume)

        self.addhistory("", -remove, tipMask)
Exemplo n.º 6
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()