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

Class _ImgtScanner

source code

  object --+        
           |        
InsdcScanner --+    
               |    
     EmblScanner --+
                   |
                  _ImgtScanner

For extracting chunks of information in IMGT (EMBL like) files (PRIVATE).

IMGT files are like EMBL files but in order to allow longer feature types the features should be indented by 25 characters not 21 characters. In practice the IMGT flat files tend to use either 21 or 25 characters, so we must cope with both.

This is private to encourage use of Bio.SeqIO rather than Bio.GenBank.

Instance Methods [hide private]
 
_feed_first_line(self, consumer, line)
Handle the LOCUS/ID line, passing data to the comsumer (PRIVATE).
source code
 
parse_features(self, skip=False)
Return list of tuples for the features (if present).
source code

Inherited from EmblScanner: parse_footer

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

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

Static Methods [hide private]

Inherited from EmblScanner (private): _feed_seq_length

Inherited from InsdcScanner (private): _feed_feature_table

Class Variables [hide private]
  FEATURE_START_MARKERS = ['FH Key Location/Qualif...

Inherited from EmblScanner: EMBL_INDENT, EMBL_SPACER, FEATURE_END_MARKERS, FEATURE_QUALIFIER_INDENT, FEATURE_QUALIFIER_SPACER, HEADER_WIDTH, RECORD_START, SEQUENCE_HEADERS

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_feed_first_line(self, consumer, line)

source code 

Handle the LOCUS/ID line, passing data to the comsumer (PRIVATE).

This should be implemented by the EMBL / GenBank specific subclass

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

Overrides: InsdcScanner._feed_first_line
(inherited documentation)

parse_features(self, skip=False)

source code 

Return list of tuples for the features (if present).

Each feature is returned as a tuple (key, location, qualifiers) where key and location are strings (e.g. "CDS" and "complement(join(490883..490885,1..879))") while qualifiers is a list of two string tuples (feature qualifier keys and values).

Assumes you have already read to the start of the features table.

Overrides: InsdcScanner.parse_features

Class Variable Details [hide private]

FEATURE_START_MARKERS

Value:
['FH   Key             Location/Qualifiers',
 'FH   Key             Location/Qualifiers (from EMBL)',
 'FH   Key                 Location/Qualifiers',
 'FH']