Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio::GenBank::Scanner::EmblScanner::parse_footer (   self  ) 

returns a tuple containing a list of any misc strings, and the sequence

Reimplemented from Bio::GenBank::Scanner::InsdcScanner.

Definition at line 517 of file Scanner.py.

00517                           :
        """returns a tuple containing a list of any misc strings, and the sequence"""
        assert self.line[:self.HEADER_WIDTH].rstrip() in self.SEQUENCE_HEADERS, \
            "Eh? '%s'" % self.line

        #Note that the SQ line can be split into several lines...
        misc_lines = []
        while self.line[:self.HEADER_WIDTH].rstrip() in self.SEQUENCE_HEADERS:
            self.line = self.handle.readline()
            if not self.line:
                raise ValueError("Premature end of file")
            self.line = self.line.rstrip()

        assert self.line[:self.HEADER_WIDTH] == " " * self.HEADER_WIDTH \
               or self.line.strip() == '//', repr(self.line)
        seq_lines = []
        line = self.line
        while True:
            if not line:
                raise ValueError("Premature end of file in sequence data")
            line = line.strip()
            if not line:
                raise ValueError("Blank line in sequence data")
            if line=='//':
            assert self.line[:self.HEADER_WIDTH] == " " * self.HEADER_WIDTH, \
            line = self.handle.readline()
        self.line = line
        return (misc_lines, "".join(seq_lines))

    def _feed_first_line(self, consumer, line):

Generated by  Doxygen 1.6.0   Back to index