def parse_file(self, myfile):
        for line in myfile:
            self.nline += 1
            if self.is_valid_hit() and \
               (is_line_start('>', line) or is_line_start(' Score =', line) \
                or is_line_start('  Database:', line) \
                or is_line_start('Query=', line)):
                for t in self.generate_intervals(): # REPORT THIS ALIGNMENT
                    yield t # GENERATE ALL ITS INTERVAL MATCHES
                self.reset() # RESET TO START A NEW ALIGNMENT
            if is_line_start('Query=', line):
                self.save_query(line)
            elif is_line_start('>', line):
                self.save_subject(line)
            elif is_line_start(' Score =', line):
                self.save_score(line)
            elif 'Identities =' in line:
                self.save_identity(line)
            elif is_line_start('Query:', line):
                self.save_query_line(line)
            elif is_line_start('Sbjct:', line):
                self.save_subject_line(line)
        if self.nline == 0: # no blast output??
            raise IOError('No BLAST output. Check that blastall is \
                          in your PATH')
generate interval tuples by parsing BLAST output from myfile
dataset/ETHPy150Open cjlee112/pygr/pygr/parse_blast.py/BlastHitParser.parse_file