Package Bio :: Package MEME :: Module Parser :: Class MASTParser
[show private | hide private]
[frames | no frames]

Class MASTParser

AbstractParser --+
                 |
                MASTParser


Parser for MAST text output. HTML output cannot be parsed, yet. Returns a MASTRecord

A MASTParser takes a file handle for a MAST text output file and 
returns a MASTRecord, containing the hits between motifs and 
sequences. The parser does some unusual line buffering to parse out 
match diagrams. Really complex diagrams often lead to an error message 
and p-values not being parsed for a given line.

Methods:
parse (handle): parses the data from the file handle passed to it.

Example:

f = open("mast_file.txt")
parser = MASTParser()
mast_record = parser.parse(f)
for motif in mast_record.motifs:
    for instance in motif.instances:
        print instance.motif_name, instance.sequence_name, instance.strand, instance.pvalue

Method Summary
  __init__(self)
  parse(self, handle)
    Inherited from AbstractParser
  parse_file(self, filename)
  parse_str(self, string)

Generated by Epydoc 2.1 on Wed Jan 31 09:57:59 2007 http://epydoc.sf.net