PEATDB/DNAtool/primer_database.py
def apply_primer(self):
        """Apply a primer to the DNA sequence"""
        selection=None

        # We only accept a single primer
        if len(self.primers.curselection())>1:            
            tkMessageBox.showinfo('Apply primer',
                                  'You can only apply a single primer at the time',
                                  parent=self.pDB_win)
            return

        # First a warning

        if not tkMessageBox.askyesno('Apply primer',
                                     'I will apply the primer to the main DNA sequence\n\nDo you want to continue?.',
                                     parent=self.pDB_win):
            print 'I am not applying the primer!'
            return

        # First find the best binding site

        selection=int(str(self.primers.curselection()[0]))
        name_selected=self.primer_order[selection]
        this_primer=self.parent.data['primer_dict'][name_selected]
        this_primer['startpos']=self.align_primer(this_primer)

        # Apply the primer
        new_DNA=self.apply_primer_to_DNA(this_primer,self.parent.data['DNAseq'],this_primer['startpos'])

        # Clear all PEAT specific records

        self.parent.data['DNAseq_status']='ALTERED'
        self.parent.data['DNAseq_mutations']=self.mutations[:]
        self.parent.data['DNAseq']=new_DNA

        # Update the view
        self.parent.update_sequence_window()
        self.display_details()
        return
Apply a primer to the DNA sequence
Apply a primer to the DNA sequence
Apply a primer to the DNA sequence
def apply_primer(self):
        selection=None
        if len(self.primers.curselection())>1:            
            tkMessageBox.showinfo('Apply primer',
                                  'You can only apply a single primer at the time',
                                  parent=self.pDB_win)
            return
        if not tkMessageBox.askyesno('Apply primer',
                                     'I will apply the primer to the main DNA sequence\n\nDo you want to continue?.',
                                     parent=self.pDB_win):
            print 'I am not applying the primer!'
            return
        selection=int(str(self.primers.curselection()[0]))
        name_selected=self.primer_order[selection]
        this_primer=self.parent.data['primer_dict'][name_selected]
        this_primer['startpos']=self.align_primer(this_primer)
        new_DNA=self.apply_primer_to_DNA(this_primer,self.parent.data['DNAseq'],this_primer['startpos'])
        self.parent.data['DNAseq_status']='ALTERED'
        self.parent.data['DNAseq_mutations']=self.mutations[:]
        self.parent.data['DNAseq']=new_DNA
        self.parent.update_sequence_window()
        self.display_details()
        return
def apply_primer ( self ) : selection = None if len ( self . primers . curselection ( ) ) > 1 : tkMessageBox . showinfo ( 'Apply primer' , 'You can only apply a single primer at the time' , parent = self . pDB_win ) return if not tkMessageBox . askyesno ( 'Apply primer' , 'I will apply the primer to the main DNA sequence\n\nDo you want to continue?.' , parent = self . pDB_win ) : print 'I am not applying the primer!' return selection = int ( str ( self . primers . curselection ( ) [ 0 ] ) ) name_selected = self . primer_order [ selection ] this_primer = self . parent . data [ 'primer_dict' ] [ name_selected ] this_primer [ 'startpos' ] = self . align_primer ( this_primer ) new_DNA = self . apply_primer_to_DNA ( this_primer , self . parent . data [ 'DNAseq' ] , this_primer [ 'startpos' ] ) self . parent . data [ 'DNAseq_status' ] = 'ALTERED' self . parent . data [ 'DNAseq_mutations' ] = self . mutations [ : ] self . parent . data [ 'DNAseq' ] = new_DNA self . parent . update_sequence_window ( ) self . display_details ( ) return
Apply a primer to the DNA sequence
Apply a primer to the DNA sequence
"""Apply a primer to the DNA sequence""" # We only accept a single primer # First a warning # First find the best binding site # Apply the primer # Clear all PEAT specific records # Update the view
self