PEATDB/PEATApp.py
def addRecordAction(self, name, action=None):
        """Additional actions when adding a new rec"""
        if action == None:
            return
        if action == 'DNA':
            tkMessageBox.showinfo("Add DNA sequence",
                                  'I will now start DNAtool. '
                                  'Load your DNA sequence, select the open '
                                  'reading frame and press "Return to DataBase" to continue')
            done = False
            while not done:
                self.startDNAtool()
                DNAdata=self.DNAtool_state
                if DNAdata.has_key('ORF_selected'):
                    done=1
                else:
                    if not tkMessageBox.askokcancel("ORF not selected",
                                             "You did not select an ORF.\nReturn to DNAtool?"):
                        return

        elif action == 'Prot':
            DBActions.addProteinSeq(self.DB, name)

        elif action == 'PDB':
            DBActions.addPDBFile(self.DB, name)

        return
Additional actions when adding a new rec
Additional actions when adding a new rec
Additional actions when adding a new rec
def addRecordAction(self, name, action=None):
        if action == None:
            return
        if action == 'DNA':
            tkMessageBox.showinfo("Add DNA sequence",
                                  'I will now start DNAtool. '
                                  'Load your DNA sequence, select the open '
                                  'reading frame and press "Return to DataBase" to continue')
            done = False
            while not done:
                self.startDNAtool()
                DNAdata=self.DNAtool_state
                if DNAdata.has_key('ORF_selected'):
                    done=1
                else:
                    if not tkMessageBox.askokcancel("ORF not selected",
                                             "You did not select an ORF.\nReturn to DNAtool?"):
                        return
        elif action == 'Prot':
            DBActions.addProteinSeq(self.DB, name)
        elif action == 'PDB':
            DBActions.addPDBFile(self.DB, name)
        return
def addRecordAction ( self , name , action = None ) : if action == None : return if action == 'DNA' : tkMessageBox . showinfo ( "Add DNA sequence" , 'I will now start DNAtool. ' 'Load your DNA sequence, select the open ' 'reading frame and press "Return to DataBase" to continue' ) done = False while not done : self . startDNAtool ( ) DNAdata = self . DNAtool_state if DNAdata . has_key ( 'ORF_selected' ) : done = 1 else : if not tkMessageBox . askokcancel ( "ORF not selected" , "You did not select an ORF.\nReturn to DNAtool?" ) : return elif action == 'Prot' : DBActions . addProteinSeq ( self . DB , name ) elif action == 'PDB' : DBActions . addPDBFile ( self . DB , name ) return
Additional actions when adding a new rec
Additional actions when adding a new rec
"""Additional actions when adding a new rec"""
self
name
action