Package Bio :: Package GenBank :: Module Scanner :: Class GenBankScanner
[hide private]
[frames] | no frames]

Class GenBankScanner

source code

  object --+    
           |    
InsdcScanner --+
               |
              GenBankScanner

For extracting chunks of information in GenBank files

Instance Methods [hide private]
 
parse_footer(self)
returns a tuple containing a list of any misc strings, and the sequence
source code
 
_feed_first_line(self, consumer, line)
Scan over and parse GenBank LOCUS line (PRIVATE).
source code
 
_feed_header_lines(self, consumer, lines)
Handle the header lines (list of strings), passing data to the comsumer
source code
 
_feed_misc_lines(self, consumer, lines)
Handle any lines between features and sequence (list of strings), passing data to the consumer
source code

Inherited from InsdcScanner: __init__, feed, find_start, parse, parse_cds_features, parse_feature, parse_features, parse_header, parse_records, set_handle

Inherited from InsdcScanner (private): _feed_feature_table

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  RECORD_START = 'LOCUS '
  HEADER_WIDTH = 12
  FEATURE_START_MARKERS = ['FEATURES Location/Qualif...
  FEATURE_END_MARKERS = []
  FEATURE_QUALIFIER_INDENT = 21
  FEATURE_QUALIFIER_SPACER = ' '
  SEQUENCE_HEADERS = ['CONTIG', 'ORIGIN', 'BASE COUNT', 'WGS']
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

parse_footer(self)

source code 
returns a tuple containing a list of any misc strings, and the sequence

Overrides: InsdcScanner.parse_footer

_feed_first_line(self, consumer, line)

source code 
Scan over and parse GenBank LOCUS line (PRIVATE).

This must cope with several variants, primarily the old and new column
based standards from GenBank. Additionally EnsEMBL produces GenBank
files where the LOCUS line is space separated rather that following
the column based layout.

We also try to cope with GenBank like files with partial LOCUS lines.

Overrides: InsdcScanner._feed_first_line

_feed_header_lines(self, consumer, lines)

source code 
Handle the header lines (list of strings), passing data to the comsumer

This should be implemented by the EMBL / GenBank specific subclass

Used by the parse_records() and parse() methods.

Overrides: InsdcScanner._feed_header_lines
(inherited documentation)

_feed_misc_lines(self, consumer, lines)

source code 
Handle any lines between features and sequence (list of strings), passing data to the consumer

This should be implemented by the EMBL / GenBank specific subclass

Used by the parse_records() and parse() methods.

Overrides: InsdcScanner._feed_misc_lines
(inherited documentation)

Class Variable Details [hide private]

FEATURE_START_MARKERS

Value:
['FEATURES             Location/Qualifiers', 'FEATURES']