[BioPython] blast parser ideas

Thomas.Sicheritz@molbio.uu.se Thomas.Sicheritz@molbio.uu.se
Wed, 10 Nov 1999 16:52:36 +0100 (MET)


Jeffrey Chang writes:
 > 
 > I have been giving some thought to writing BLAST parsers.  Some of the
 > problems that I think a BLAST parser should address are:
 > 1. Multiple flavors of BLAST (blastp, blastn, tblastn, etc.)
 > 2. Multiple versions of BLAST (blast1, blast2, psi-blast, phi-blast,
 > wu-blast)
 > 3. Frequent format changes
 > 4. BLAST reports can be large.
 > 5. Much of the output may not relevant.

I Agree 100%.

 > Instead, I have been thinking of using an event-oriented parser.  This
 > style of parser has been discussed in bionet.software and is used for
 > the *ML parsers in the standard Python distribution.  I believe Andrew
 > Dalke has played with this in various projects.
 > 
 > The way this works, is that the client feeds data into a Parser
 > object.  The parser recognizes information in the data stream and
 > calls a function in a Consumer to handle the information.  The
 > Consumer is supplied by the client, and can do application-specific
 > things with the data.  Typically, it would capture the information in
 > a data structure suitable for the application.
 > 
 > 
 > This event-oriented design decouples the parsing from the handler, so
 > you can use the same consumer for multiple versions and flavors of
 > BLAST.  Plus, you can ignore data that you're not interested in by not
 > implementing handler methods in your consumer.

Is it possible to have the idea of a lazy parser - even if the parser is
event-oriented - or is that already in the event-oriented design ? 

-thomas
-- 
Sicheritz Ponten Thomas E.  Linnaeus Centre for Bioinformatics
blippblopp@linux.nu         BMC, Uppsala University
BMC:  +46 18 4714214        BOX 590 S-751 24 UPPSALA Sweden
Fax   +46 18  557723        http://evolution.bmc.uu.se/~thomas
Molecular Python:  http://evolution.bmc.uu.se/~thomas/python
Molecular Linux: http://evolution.bmc.uu.se/~thomas/mol_linux

	De Chelonian Mobile ... The Turtle Moves ...