PEATDB/DNAtool/DNAtool_IO.py
def dnaseq_read(self,newprotein=None,fileinput=None,variable='DNAseq',var2='dnaseqfile'):
        """Read in DNA Sequences and display them above the main sequence"""
        self.data['newprotein']=newprotein
        # If a file is provided use that, otherwise open the dialog
        if fileinput == None:
            dnaseqfile = self.open_file()
        else:
            dnaseqfile = fileinput
        self.data[var2]=dnaseqfile

        # Load the DNA sequence data
        #  - only simple file format supported at the moment

        if self.data[var2]:
            S=DNA_sequence.sequence()
            seqfile=self.data[var2]
            DNAseq=S.read_DNA_sequence(seqfile)

            # Check the DNA sequence
            ok,DNAseq=mutation.check_DNA(DNAseq)
            if not ok:
                # Give a warning
                import tkMessageBox
                tkMessageBox.showwarning("DNA sequence",
                                         'DNA sequence contains invalid characters: %s' %DNAseq
                                         ,parent=self.master)
                return
            self.data[variable]=DNAseq
            self.update_sequence_window()
            
            # Activate/Deactivate buttons
            self.projectChanged()
        return dnaseqfile
Read in DNA Sequences and display them above the main sequence
Read in DNA Sequences and display them above the main sequence
Read in DNA Sequences and display them above the main sequence
def dnaseq_read(self,newprotein=None,fileinput=None,variable='DNAseq',var2='dnaseqfile'):
        self.data['newprotein']=newprotein
        if fileinput == None:
            dnaseqfile = self.open_file()
        else:
            dnaseqfile = fileinput
        self.data[var2]=dnaseqfile
        if self.data[var2]:
            S=DNA_sequence.sequence()
            seqfile=self.data[var2]
            DNAseq=S.read_DNA_sequence(seqfile)
            ok,DNAseq=mutation.check_DNA(DNAseq)
            if not ok:
                import tkMessageBox
                tkMessageBox.showwarning("DNA sequence",
                                         'DNA sequence contains invalid characters: %s' %DNAseq
                                         ,parent=self.master)
                return
            self.data[variable]=DNAseq
            self.update_sequence_window()
            self.projectChanged()
        return dnaseqfile
def dnaseq_read ( self , newprotein = None , fileinput = None , variable = 'DNAseq' , var2 = 'dnaseqfile' ) : self . data [ 'newprotein' ] = newprotein if fileinput == None : dnaseqfile = self . open_file ( ) else : dnaseqfile = fileinput self . data [ var2 ] = dnaseqfile if self . data [ var2 ] : S = DNA_sequence . sequence ( ) seqfile = self . data [ var2 ] DNAseq = S . read_DNA_sequence ( seqfile ) ok , DNAseq = mutation . check_DNA ( DNAseq ) if not ok : import tkMessageBox tkMessageBox . showwarning ( "DNA sequence" , 'DNA sequence contains invalid characters: %s' % DNAseq , parent = self . master ) return self . data [ variable ] = DNAseq self . update_sequence_window ( ) self . projectChanged ( ) return dnaseqfile
Read in DNA Sequences and display them above the main sequence
Read in DNA Sequences and display them above the main sequence
"""Read in DNA Sequences and display them above the main sequence""" # If a file is provided use that, otherwise open the dialog # Load the DNA sequence data #  - only simple file format supported at the moment # Check the DNA sequence # Give a warning # Activate/Deactivate buttons
self
newprotein
fileinput
variable
var2