Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Private Attributes
Bio.GenBank.FeatureParser Class Reference

List of all members.

Public Member Functions

def __init__
def parse

Public Attributes

 use_fuzziness

Private Attributes

 _scanner
 _cleaner
 _consumer

Detailed Description

Parse GenBank files into Seq + Feature objects (OBSOLETE).

Direct use of this class is discouraged, and may be deprecated in
a future release of Biopython.

Please use Bio.SeqIO.parse(...) or Bio.SeqIO.read(...) instead.

Definition at line 397 of file __init__.py.


Constructor & Destructor Documentation

def Bio.GenBank.FeatureParser.__init__ (   self,
  debug_level = 0,
  use_fuzziness = 1,
  feature_cleaner = FeatureValueCleaner() 
)
Initialize a GenBank parser and Feature consumer.

Arguments:
o debug_level - An optional argument that species the amount of
debugging information the parser should spit out. By default we have
no debugging info (the fastest way to do things), but if you want
you can set this as high as two and see exactly where a parse fails.
o use_fuzziness - Specify whether or not to use fuzzy representations.
The default is 1 (use fuzziness).
o feature_cleaner - A class which will be used to clean out the
values of features. This class must implement the function 
clean_value. GenBank.utils has a "standard" cleaner class, which
is used by default.

Definition at line 406 of file __init__.py.

00406 
00407                  feature_cleaner = FeatureValueCleaner()):
00408         """Initialize a GenBank parser and Feature consumer.
00409 
00410         Arguments:
00411         o debug_level - An optional argument that species the amount of
00412         debugging information the parser should spit out. By default we have
00413         no debugging info (the fastest way to do things), but if you want
00414         you can set this as high as two and see exactly where a parse fails.
00415         o use_fuzziness - Specify whether or not to use fuzzy representations.
00416         The default is 1 (use fuzziness).
00417         o feature_cleaner - A class which will be used to clean out the
00418         values of features. This class must implement the function 
00419         clean_value. GenBank.utils has a "standard" cleaner class, which
00420         is used by default.
00421         """
00422         self._scanner = GenBankScanner(debug_level)
00423         self.use_fuzziness = use_fuzziness
00424         self._cleaner = feature_cleaner

Here is the caller graph for this function:


Member Function Documentation

def Bio.GenBank.FeatureParser.parse (   self,
  handle 
)
Parse the specified handle.

Definition at line 425 of file __init__.py.

00425 
00426     def parse(self, handle):
00427         """Parse the specified handle.
00428         """
00429         self._consumer = _FeatureConsumer(self.use_fuzziness, 
00430                                           self._cleaner)
00431         self._scanner.feed(handle, self._consumer)
00432         return self._consumer.data

Here is the caller graph for this function:


Member Data Documentation

Definition at line 423 of file __init__.py.

Definition at line 428 of file __init__.py.

Definition at line 421 of file __init__.py.

Definition at line 422 of file __init__.py.


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