PEATDB/DNAtool/primer_database.py
def edit_primer(self):

        """Edit a primer, using the current selection to locate the primer name"""
        try:
            selection=int(str(self.primers.curselection()[0]))
        except:
           tkMessageBox.showwarning('No primer selected',
                                     'Please select a primer in the listbox',
                                     parent=self.pDB_win)
           return

        selection=int(str(self.primers.curselection()[0]))
        name_selected=self.primer_order[selection]

        # Undisplay the original primer since do_evaluate_primer will show the primer while editing
        if not getattr(self,'primer_objs',None):
            self.primer_objs={}
        for obj in self.primer_objs.keys():
            self.parent.seqframe.delete(obj)
            del self.primer_objs[obj]

        # Call do_evaluate primer
        this_primer=self.parent.data['primer_dict'][name_selected]
        win=self.parent.do_evaluate_primer(self.pDB_win,self,
                                           edit_primer_seq=this_primer['sequence'],
                                           edit_primer_descr=this_primer['description'],
                                           edit_primer_name=name_selected)
        self.pDB_win.wait_window(win)

        # Update view
        self.show_pDB_contents()
        print 'PRIMER_NAME=',self.new_name
        self.highlight_primer(self.new_name)
        self.display_details()
        return
Edit a primer, using the current selection to locate the primer name
Edit a primer, using the current selection to locate the primer name
Edit a primer using the current selection to locate the primer name
def edit_primer(self):
        try:
            selection=int(str(self.primers.curselection()[0]))
        except:
           tkMessageBox.showwarning('No primer selected',
                                     'Please select a primer in the listbox',
                                     parent=self.pDB_win)
           return
        selection=int(str(self.primers.curselection()[0]))
        name_selected=self.primer_order[selection]
        if not getattr(self,'primer_objs',None):
            self.primer_objs={}
        for obj in self.primer_objs.keys():
            self.parent.seqframe.delete(obj)
            del self.primer_objs[obj]
        this_primer=self.parent.data['primer_dict'][name_selected]
        win=self.parent.do_evaluate_primer(self.pDB_win,self,
                                           edit_primer_seq=this_primer['sequence'],
                                           edit_primer_descr=this_primer['description'],
                                           edit_primer_name=name_selected)
        self.pDB_win.wait_window(win)
        self.show_pDB_contents()
        print 'PRIMER_NAME=',self.new_name
        self.highlight_primer(self.new_name)
        self.display_details()
        return
def edit_primer ( self ) : try : selection = int ( str ( self . primers . curselection ( ) [ 0 ] ) ) except : tkMessageBox . showwarning ( 'No primer selected' , 'Please select a primer in the listbox' , parent = self . pDB_win ) return selection = int ( str ( self . primers . curselection ( ) [ 0 ] ) ) name_selected = self . primer_order [ selection ] if not getattr ( self , 'primer_objs' , None ) : self . primer_objs = { } for obj in self . primer_objs . keys ( ) : self . parent . seqframe . delete ( obj ) del self . primer_objs [ obj ] this_primer = self . parent . data [ 'primer_dict' ] [ name_selected ] win = self . parent . do_evaluate_primer ( self . pDB_win , self , edit_primer_seq = this_primer [ 'sequence' ] , edit_primer_descr = this_primer [ 'description' ] , edit_primer_name = name_selected ) self . pDB_win . wait_window ( win ) self . show_pDB_contents ( ) print 'PRIMER_NAME=' , self . new_name self . highlight_primer ( self . new_name ) self . display_details ( ) return
Edit a primer, using the current selection to locate the primer name
Edit a primer using the current selection to locate the primer name
"""Edit a primer, using the current selection to locate the primer name""" # Undisplay the original primer since do_evaluate_primer will show the primer while editing # Call do_evaluate primer # Update view
self