Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
Bio.Blast.ParseBlastTable.BlastTableReader Class Reference

List of all members.

Public Member Functions

def __init__
def next

Public Attributes

 handle
 table_record

Private Member Functions

def _consume_entry
def _consume_header
def _parse_version
def _parse_iteration
def _parse_query
def _parse_database
def _parse_fields
def _Parse

Private Attributes

 _lookahead
 _n
 _in_header

Detailed Description

Definition at line 42 of file ParseBlastTable.py.


Constructor & Destructor Documentation

Definition at line 43 of file ParseBlastTable.py.

00043 
00044    def __init__(self, handle):
00045       self.handle = handle
00046       inline = self.handle.readline()
00047       # zip forward to start of record
00048       while inline and inline.find('BLASTP') == -1:
00049          inline = self.handle.readline()
00050       self._lookahead = inline
00051       self._n = 0
      self._in_header = 1

Here is the caller graph for this function:


Member Function Documentation

def Bio.Blast.ParseBlastTable.BlastTableReader._consume_entry (   self,
  inline 
) [private]

Definition at line 73 of file ParseBlastTable.py.

00073 
00074    def _consume_entry(self, inline):
00075       current_entry = BlastTableEntry(inline)
      self.table_record.add_entry(current_entry)
def Bio.Blast.ParseBlastTable.BlastTableReader._consume_header (   self,
  inline 
) [private]

Definition at line 76 of file ParseBlastTable.py.

00076 
00077    def _consume_header(self, inline):
00078       for keyword in reader_keywords:
00079          if inline.find(keyword) > -1:
00080             in_header = self._Parse('_parse_%s' % reader_keywords[keyword],inline)
00081             break
      return in_header

Here is the call graph for this function:

def Bio.Blast.ParseBlastTable.BlastTableReader._Parse (   self,
  method_name,
  inline 
) [private]

Definition at line 99 of file ParseBlastTable.py.

00099 
00100    def _Parse(self, method_name, inline):
00101       return getattr(self,method_name)(inline)
00102       
00103 
00104 

Here is the caller graph for this function:

def Bio.Blast.ParseBlastTable.BlastTableReader._parse_database (   self,
  inline 
) [private]

Definition at line 94 of file ParseBlastTable.py.

00094 
00095    def _parse_database(self, inline):
00096       self.table_record.database = inline.split()[2]
      return 1
def Bio.Blast.ParseBlastTable.BlastTableReader._parse_fields (   self,
  inline 
) [private]

Definition at line 97 of file ParseBlastTable.py.

00097 
00098    def _parse_fields(self, inline):
      return 0
def Bio.Blast.ParseBlastTable.BlastTableReader._parse_iteration (   self,
  inline 
) [private]

Definition at line 88 of file ParseBlastTable.py.

00088 
00089    def _parse_iteration(self, inline):
00090       self.table_record.iteration = int(inline.split()[2])
      return 1
def Bio.Blast.ParseBlastTable.BlastTableReader._parse_query (   self,
  inline 
) [private]

Definition at line 91 of file ParseBlastTable.py.

00091 
00092    def _parse_query(self, inline):
00093       self.table_record.query = inline.split()[2:]
      return 1
def Bio.Blast.ParseBlastTable.BlastTableReader._parse_version (   self,
  inline 
) [private]

Definition at line 82 of file ParseBlastTable.py.

00082 
00083    def _parse_version(self, inline):
00084       program, version, date = inline.split()[1:]
00085       self.table_record.program = program
00086       self.table_record.version = version
00087       self.table_record.date = date
      return 1

Definition at line 52 of file ParseBlastTable.py.

00052 
00053    def next(self):
00054       self.table_record = BlastTableRec()
00055       self._n += 1
00056       inline = self._lookahead
00057       if not inline:
00058          return None
00059       while inline:
00060          if inline[0] == '#':
00061             if self._in_header:
00062                self._in_header = self._consume_header(inline)
00063             else:
00064                break
00065          else:
00066             self._consume_entry(inline)
00067             self._in_header = 0
00068 
00069          inline = self.handle.readline()
00070       self._lookahead = inline
00071       self._in_header = 1
00072       return self.table_record
         

Here is the caller graph for this function:


Member Data Documentation

Definition at line 51 of file ParseBlastTable.py.

Definition at line 49 of file ParseBlastTable.py.

Definition at line 50 of file ParseBlastTable.py.

Definition at line 44 of file ParseBlastTable.py.

Definition at line 53 of file ParseBlastTable.py.


The documentation for this class was generated from the following file: