Package Bio :: Package Blast :: Module NCBIStandalone :: Class BlastErrorParser
[show private | hide private]
[frames | no frames]

Class BlastErrorParser

AbstractParser --+
                 |
                BlastErrorParser


Attempt to catch and diagnose BLAST errors while parsing.

This utilizes the BlastParser module but adds an additional layer of complexity on top of it by attempting to diagnose SyntaxError's that may actually indicate problems during BLAST parsing.

Current BLAST problems this detects are: o LowQualityBlastError - When BLASTing really low quality sequences (ie. some GenBank entries which are just short streches of a single nucleotide), BLAST will report an error with the sequence and be unable to search with this. This will lead to a badly formatted BLAST report that the parsers choke on. The parser will convert the SyntaxError to a LowQualityBlastError and attempt to provide useful information.
Method Summary
  __init__(self, bad_report_handle)
Initialize a parser that tries to catch BlastErrors.
  parse(self, handle)
Parse a handle, attempting to diagnose errors.
    Inherited from AbstractParser
  parse_file(self, filename)
  parse_str(self, string)

Method Details

__init__(self, bad_report_handle=None)
(Constructor)

Initialize a parser that tries to catch BlastErrors.

Arguments: o bad_report_handle - An optional argument specifying a handle where bad reports should be sent. This would allow you to save all of the bad reports to a file, for instance. If no handle is specified, the bad reports will not be saved.

parse(self, handle)

Parse a handle, attempting to diagnose errors.
Overrides:
Bio.ParserSupport.AbstractParser.parse

Generated by Epydoc 2.1 on Thu Aug 10 20:01:07 2006 http://epydoc.sf.net