Class MASTParser
source code
ParserSupport.AbstractParser --+
|
MASTParser
Parser for MAST text output (OBSOLETE).
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
This class is OBSOLETE; its functionality is now available through
Bio.Motif.Parsers.MAST.