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

Class FormatObject

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.
Method Summary
  __init__(self, name, expression, abbrev, doc, filter, multirecord)
FormatObject(name, expression[, abbrev][, doc] [, filter][, multirecord])
  identify(self, source, debug_level)
S.identify(source[, debug_level]) -> FormatObject or None
  identifyFile(self, infile, debug_level)
S.identifyFile(infile[, debug_level]) -> FormatObject or None
  identifyString(self, s, debug_level)
S.identifyString(s[, debug_level]) -> FormatObject or None
  make_iterator(self, tag, select_names, debug_level)
S.make_iterator([tag][, select_names][, debug_level]) -> iterator
  make_parser(self, select_names, debug_level)
S.make_parser([select_names][, debug_level]) -> parser

Method Details

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

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:
Bio.config.Registry.RegisterableObject.__init__

identify(self, source, debug_level=0)

S.identify(source[, debug_level]) -> FormatObject or None

identifyFile(self, infile, debug_level=0)

S.identifyFile(infile[, debug_level]) -> FormatObject or None

identifyString(self, s, debug_level=0)

S.identifyString(s[, debug_level]) -> FormatObject or None

make_iterator(self, tag='record', select_names=None, debug_level=0)

S.make_iterator([tag][, select_names][, debug_level]) -> iterator

make_parser(self, select_names=None, debug_level=0)

S.make_parser([select_names][, debug_level]) -> parser

Generated by Epydoc 2.1 on Thu Mar 31 20:15:49 2005 http://epydoc.sf.net