DNATool2/SeqIO.py
def insertAlignmentText(self, alignments, text):
        """Show formatted alignment info in text widget"""
        text.tag_config('a', foreground="blue")
        text.tag_config('r', foreground="red")
        text.tag_config('b', background="lightyellow")
        text.tag_config('c', background="lightgreen")
        n=100
        for align in alignments:
           for hsp in align.hsps:
                if hsp.expect < 0.01:
                    text.insert(END,'**Alignment** '+ 'score: ' +str(hsp.score)+ '\n',
                                ('a'))
                    text.insert(END, 'sequence: %s\n' %align.title,('r'))
                    for i in range(0, len(hsp.query), n):
                        text.insert(END, hsp.query[i:i+n],('b'))
                        text.insert(END,'\n')
                        text.insert(END, hsp.match[i:i+n])
                        text.insert(END,'\n')
                        text.insert(END, hsp.sbjct[i:i+n] ,('c'))
                        text.insert(END,'\n')
        return
Show formatted alignment info in text widget
Show formatted alignment info in text widget
Show formatted alignment info in text widget
def insertAlignmentText(self, alignments, text):
        text.tag_config('a', foreground="blue")
        text.tag_config('r', foreground="red")
        text.tag_config('b', background="lightyellow")
        text.tag_config('c', background="lightgreen")
        n=100
        for align in alignments:
           for hsp in align.hsps:
                if hsp.expect < 0.01:
                    text.insert(END,'**Alignment** '+ 'score: ' +str(hsp.score)+ '\n',
                                ('a'))
                    text.insert(END, 'sequence: %s\n' %align.title,('r'))
                    for i in range(0, len(hsp.query), n):
                        text.insert(END, hsp.query[i:i+n],('b'))
                        text.insert(END,'\n')
                        text.insert(END, hsp.match[i:i+n])
                        text.insert(END,'\n')
                        text.insert(END, hsp.sbjct[i:i+n] ,('c'))
                        text.insert(END,'\n')
        return
def insertAlignmentText ( self , alignments , text ) : text . tag_config ( 'a' , foreground = "blue" ) text . tag_config ( 'r' , foreground = "red" ) text . tag_config ( 'b' , background = "lightyellow" ) text . tag_config ( 'c' , background = "lightgreen" ) n = 100 for align in alignments : for hsp in align . hsps : if hsp . expect < 0.01 : text . insert ( END , '**Alignment** ' + 'score: ' + str ( hsp . score ) + '\n' , ( 'a' ) ) text . insert ( END , 'sequence: %s\n' % align . title , ( 'r' ) ) for i in range ( 0 , len ( hsp . query ) , n ) : text . insert ( END , hsp . query [ i : i + n ] , ( 'b' ) ) text . insert ( END , '\n' ) text . insert ( END , hsp . match [ i : i + n ] ) text . insert ( END , '\n' ) text . insert ( END , hsp . sbjct [ i : i + n ] , ( 'c' ) ) text . insert ( END , '\n' ) return
Show formatted alignment info in text widget
Show formatted alignment info in text widget
"""Show formatted alignment info in text widget"""
self
alignments
text