Package Bio :: Package config :: Module FormatRegistry :: Class FormatObject
[hide private]
[frames] | no frames]

Class FormatObject

source code

Registry.RegisterableObject --+
                              |
                             FormatObject

This object stores Biopython file formats and provides methods to work on them.

Methods: identify Identify the format at a URL. identifyFile Identify the format of a file. identifyString Identify the format of a string.

make_parser Make a parser that can parse the format. make_iterator Make an iterator over files of this format.

Instance Methods [hide private]
 
__init__(self, name, expression, abbrev=None, doc=None, filter=None, multirecord=1)
FormatObject(name, expression[, abbrev][, doc] [, filter][, multirecord])
source code
FormatObject or None
identifyFile(S, infile, debug_level=...) source code
FormatObject or None
identifyString(S, s, debug_level=...) source code
FormatObject or None
identify(S, source, debug_level=...) source code
 
make_parser(self, select_names=None, debug_level=0)
S.make_parser([select_names][, debug_level]) -> parser
source code
 
make_iterator(self, tag='record', select_names=None, debug_level=0)
S.make_iterator([tag][, select_names][, debug_level]) -> iterator
source code
Method Details [hide private]

__init__(self, name, expression, abbrev=None, doc=None, filter=None, multirecord=1)
(Constructor)

source code 

FormatObject(name, expression[, abbrev][, doc] [, filter][, multirecord])

name is the name of the object, abbrev is an abbreviation for the name, and doc is some documentation describing the object.

expression is a Martel.Expression that can parse this format. filter is an optional Martel.Expression that can be used to quickly determine whether some input is parseable by this format.

multirecord is either 0/1 indicating whether this format can be used to parse multiple records. By default, it is 1.

Overrides: Registry.RegisterableObject.__init__