[BioPython] blast parser ideas
Jeffrey Chang
jchang@SMI.Stanford.EDU
Thu, 11 Nov 1999 17:19:25 -0800 (PST)
[Arne]
> 1. There's a specialized Parser like StandardPSIblastParser which
> inherits from Parser. The specialized class (defined by a user
> application) defines the PSI-Blast specific sections.
[example code cut]
> 2. Parser require a Consumer object that keeps a list of sections and
> datatypes to be recognized be the parser.
If I understand these correctly, in Solution 2, the Consumer carries
around the specification for the format that can be used to build a
parser.
Solution 2 seems to be a special case of solution 1. We can define the
interface between Parser's and Consumer's, based on the type of BLAST
that's being parsed, and then allow various implementations of the pieces,
one of which may be Solution 2.
Thus, I favor something more similar to Solution 1. Since the
implementation is left open, the developer can, for example, use a
flexible generated parser similar to #2, or even choose a highly optimized
faster one. Either parser strategy can be used without worrying about
compatibility with the Consumer.
> When the parser is written and people start writing applications with
> the parser we can add the more general Consumer classes to the parser
> package (sort of database for the different blast programs).
Yep.
> I'm looking forward to write my first StandardPsiBlastConsumer ;-)
As am I!
Jeff