Table of Contents

Class: ErrorParser Bio/GenBank/__init__.py

Parse GenBank files and attempt to catch errors.

This is just a small wrapper class around a passed parser which catches errors that occur in the parser.

When errors occur, we'll raise a ParserFailureError, which returns (hopefully helpful) information about where the error occured

Methods   
__init__
parse
  __init__ 
__init__ (
        self,
        parser,
        bad_file_handle=None,
        )

Initialize an ErrorFeatureParser.

Arguments: o parser - The actual parser to use in parsing the records. o bad_file_handle - A handle to write problem GenBank files to If None, the files will not be saved.

  parse 
parse ( self,  handle )

Parse the specified handle.

Exceptions   
ParserFailureError( "Could not parse record %s" % self._parser._consumer.data.id )
ParserFailureError("Could not parse location %s in record %s" %( msg, self._parser._consumer.data.id ) )

Table of Contents

This document was automatically generated on Mon Jul 1 12:02:49 2002 by HappyDoc version 2.0.1