PEATDB/PEATApp.py
def display_sequence(self,protein,field_name):
        """Display the sequence of the current protein regardless of which column is chosen"""
        D = self.DB.data
        if D.has_key(protein):
            sequence=self.get_protein_sequence(protein)
            sequence=self.format_protein_sequence(sequence)
            """"Get font"""
            import tkFont
            font=tkFont.Font(family='Courier',size=14,weight='bold')
            seqwin=Toplevel()
            seqwin.geometry('600x400+100+100')
            seqwin.title('Amino acid sequence')
            ST=Text(seqwin,font=font)
            ST.grid(row=0,column=0)
            text='Protein sequence\n\n'
            text=text+'             10         20         30         40\n'
            text=text+'              |          |          |          |'
            count=0
            for s in sequence:
                if count%40==0:
                    text=text+'\n'
                    text=text+'%4d ' %count
                text=text+s
                count=count+1
                if count%10==0:
                    text=text+' '
            text=text+'\n'
            text=text+'\nLength: %d \n' %len(sequence)
            ST.insert(END,text)
        return
Display the sequence of the current protein regardless of which column is chosen
Display the sequence of the current protein regardless of which column is chosen
Display the sequence of the current protein regardless of which column is chosen
def display_sequence(self,protein,field_name):
        D = self.DB.data
        if D.has_key(protein):
            sequence=self.get_protein_sequence(protein)
            sequence=self.format_protein_sequence(sequence)
            import tkFont
            font=tkFont.Font(family='Courier',size=14,weight='bold')
            seqwin=Toplevel()
            seqwin.geometry('600x400+100+100')
            seqwin.title('Amino acid sequence')
            ST=Text(seqwin,font=font)
            ST.grid(row=0,column=0)
            text='Protein sequence\n\n'
            text=text+'             10         20         30         40\n'
            text=text+'              |          |          |          |'
            count=0
            for s in sequence:
                if count%40==0:
                    text=text+'\n'
                    text=text+'%4d ' %count
                text=text+s
                count=count+1
                if count%10==0:
                    text=text+' '
            text=text+'\n'
            text=text+'\nLength: %d \n' %len(sequence)
            ST.insert(END,text)
        return
def display_sequence ( self , protein , field_name ) : D = self . DB . data if D . has_key ( protein ) : sequence = self . get_protein_sequence ( protein ) sequence = self . format_protein_sequence ( sequence ) """"Get font""" import tkFont font = tkFont . Font ( family = 'Courier' , size = 14 , weight = 'bold' ) seqwin = Toplevel ( ) seqwin . geometry ( '600x400+100+100' ) seqwin . title ( 'Amino acid sequence' ) ST = Text ( seqwin , font = font ) ST . grid ( row = 0 , column = 0 ) text = 'Protein sequence\n\n' text = text + '             10         20         30         40\n' text = text + '              |          |          |          |' count = 0 for s in sequence : if count % 40 == 0 : text = text + '\n' text = text + '%4d ' % count text = text + s count = count + 1 if count % 10 == 0 : text = text + ' ' text = text + '\n' text = text + '\nLength: %d \n' % len ( sequence ) ST . insert ( END , text ) return
Display the sequence of the current protein regardless of which column is chosen
Display the sequence of the current protein regardless of which column is chosen
"""Display the sequence of the current protein regardless of which column is chosen""" """"Get font"""
self
protein
field_name