PEATDB/DNAtool/Restriction_Digest_driver.py
def show_item(self, event):
		"""Raise items(s) to top if selected with right click
                   and show recognition seq if it's a site label, called from DNAtool main"""
		c=self.seqframe
		box = c.bbox(CURRENT)
		x1=box[0]
		y1=box[1]
		x2=box[2]
		y2=box[3]
		items=[]
		#make selection rectangle one pixel larger to include rect and text
		items=c.find_enclosed(x1-1,y1-1,x2+1,y2+1)
		#get this for recog sequence
		enzymes=self.RS.enzymes_regexs
		
		sfont = tkFont.Font (family='Arial', size=12,weight='bold')
		for obj in items:
			c.tag_raise(obj)
			#if item is text, get recog sequence and display
			if 'textlabel' in c.gettags(obj):
				name=c.itemcget(obj, 'text')
				name=name.rstrip('(+-)')
				seq=self.get_sequence(enzymes[name]['realseq'])
				obj=c.create_text(x2+2,y1-2,text=seq,tags='recogseqlabel',
							font=sfont,width=120,anchor='nw')
				box = c.bbox(obj)
				rect = c.create_rectangle(box,tag='recogseqlabel',fill='yellow')
				c.lift(obj)
Raise items(s) to top if selected with right click
                   and show recognition seq if it's a site label, called from DNAtool main
Raise items(s) to top if selected with right click
and show recognition seq if it's a site label, called from DNAtool main
Raise items ( s ) to top if selected with right click and show recognition seq if it ' s a site label called from DNAtool main
def show_item(self, event):
		c=self.seqframe
		box = c.bbox(CURRENT)
		x1=box[0]
		y1=box[1]
		x2=box[2]
		y2=box[3]
		items=[]
		items=c.find_enclosed(x1-1,y1-1,x2+1,y2+1)
		enzymes=self.RS.enzymes_regexs
		sfont = tkFont.Font (family='Arial', size=12,weight='bold')
		for obj in items:
			c.tag_raise(obj)
			if 'textlabel' in c.gettags(obj):
				name=c.itemcget(obj, 'text')
				name=name.rstrip('(+-)')
				seq=self.get_sequence(enzymes[name]['realseq'])
				obj=c.create_text(x2+2,y1-2,text=seq,tags='recogseqlabel',
							font=sfont,width=120,anchor='nw')
				box = c.bbox(obj)
				rect = c.create_rectangle(box,tag='recogseqlabel',fill='yellow')
				c.lift(obj)
def show_item ( self , event ) : c = self . seqframe box = c . bbox ( CURRENT ) x1 = box [ 0 ] y1 = box [ 1 ] x2 = box [ 2 ] y2 = box [ 3 ] items = [ ] items = c . find_enclosed ( x1 - 1 , y1 - 1 , x2 + 1 , y2 + 1 ) enzymes = self . RS . enzymes_regexs sfont = tkFont . Font ( family = 'Arial' , size = 12 , weight = 'bold' ) for obj in items : c . tag_raise ( obj ) if 'textlabel' in c . gettags ( obj ) : name = c . itemcget ( obj , 'text' ) name = name . rstrip ( '(+-)' ) seq = self . get_sequence ( enzymes [ name ] [ 'realseq' ] ) obj = c . create_text ( x2 + 2 , y1 - 2 , text = seq , tags = 'recogseqlabel' , font = sfont , width = 120 , anchor = 'nw' ) box = c . bbox ( obj ) rect = c . create_rectangle ( box , tag = 'recogseqlabel' , fill = 'yellow' ) c . lift ( obj )
Raise items(s) to top if selected with right click
and show recognition seq if it's a site label, called from DNAtool main
Raise items ( s ) to top if selected with right click and show recognition seq if it ' s a site label called from DNAtool main
"""Raise items(s) to top if selected with right click
                   and show recognition seq if it's a site label, called from DNAtool main""" #make selection rectangle one pixel larger to include rect and text #get this for recog sequence #if item is text, get recog sequence and display
self
event