PEATDB/DNAtool/primer_database.py
def add_primers_from_text(self):
        """Add primers from a csv file"""
        pdict=self.load_from_text(overwrite=None)
        primers=pdict.keys()
        primers.sort()
        import copy
        for primer in primers:
            if self.parent.data['primer_dict'].has_key(primer):
                import tkMessageBox, copy
                if tkMessageBox.askyesno("Overwrite primer?",
                                         "The file contains a primer named '%s', but your primer database already\ncontains a primer with this name.\nDo you want to overwrite your existing primer with the new one?" %primer):
                    self.parent.data['primer_dict'][primer]=copy.deepcopy(pdict[primer])
            else:
                self.parent.data['primer_dict'][primer]=copy.deepcopy(pdict[primer])
        self.show_pDB_contents()
        return
Add primers from a csv file
Add primers from a csv file
Add primers from a csv file
def add_primers_from_text(self):
        pdict=self.load_from_text(overwrite=None)
        primers=pdict.keys()
        primers.sort()
        import copy
        for primer in primers:
            if self.parent.data['primer_dict'].has_key(primer):
                import tkMessageBox, copy
                if tkMessageBox.askyesno("Overwrite primer?",
                                         "The file contains a primer named '%s', but your primer database already\ncontains a primer with this name.\nDo you want to overwrite your existing primer with the new one?" %primer):
                    self.parent.data['primer_dict'][primer]=copy.deepcopy(pdict[primer])
            else:
                self.parent.data['primer_dict'][primer]=copy.deepcopy(pdict[primer])
        self.show_pDB_contents()
        return
def add_primers_from_text ( self ) : pdict = self . load_from_text ( overwrite = None ) primers = pdict . keys ( ) primers . sort ( ) import copy for primer in primers : if self . parent . data [ 'primer_dict' ] . has_key ( primer ) : import tkMessageBox , copy if tkMessageBox . askyesno ( "Overwrite primer?" , "The file contains a primer named '%s', but your primer database already\ncontains a primer with this name.\nDo you want to overwrite your existing primer with the new one?" % primer ) : self . parent . data [ 'primer_dict' ] [ primer ] = copy . deepcopy ( pdict [ primer ] ) else : self . parent . data [ 'primer_dict' ] [ primer ] = copy . deepcopy ( pdict [ primer ] ) self . show_pDB_contents ( ) return
Add primers from a csv file
Add primers from a csv file
"""Add primers from a csv file"""
self