[Bioperl-l] Bio::Tools::Blast update
Chervitz, Steve
Steve_Chervitz@affymetrix.com
Fri, 20 Jul 2001 21:47:42 -0700
It recently dawned on me that what I was getting at here was exactly what
Aaron's Bio::Search::* modules were intended for. What I've since done is to
re-tool Bio::Search::Processor to employ a SeqIO-like pattern. The only
difference is that the processor is parameterized on both format and
algorithm, instead of just format as in SeqIO.
I discovered that there's a fair amount of overlap between
Bio::Search::Result::ResultI and Bio::Tools::AnalysisResult, which should be
unified (perhaps AnalysisResult could inherit from ResultI?).
Also, there's some clunkiness in the fact that AnalysisResult inherits from
SeqAnalysisParserI. I have a need to separate the parsing functionality from
the result-encapsulating functionality, so it's awkward for me to use
AnalysisResult. Perhaps all of the non-parsing, result-encapsulating
behavior that AnalysisResult depends on can be migrated to ResultI, which
would become a superclass of AnalysisResult. Just a thought.
Before I go checking in large modifications within Bio::Search::*, is there
anyone else who has been working on these modules lately that has any input
here? Aaron?
Cheers,
Steve
P.S. Sorry I missed out on BOSC-2001. Was it as fun as last year?
> -----Original Message-----
> From: Steve Chervitz [mailto:Steve_Chervitz@affymetrix.com]
> Sent: Wednesday, June 20, 2001 1:13 AM
> To: bioperl-l@bioperl.org
> Subject: [Bioperl-l] Bio::Tools::Blast update
>
>
> Just wanted to give people an update about the status of my
> overhaul of
> Bio::Tools::Blast. I've made some good progress on it lately and
> probably will be ready to check the new code into the main trunk soon
> for beta testing.
>
> A design decision came up that I'd like people's opinion on. Here's a
> snippet of what you can do with my new code to generate a
> table of Blast
> results:
>
> # Analogous to SeqIO but operating on Blast reports/objects.
> # This does not handle running new analyses, just parsing
> existing ones.
>
> use Bio::Tools::BlastIO;
> use Bio::Tools::BlastIO::SbjctTableWriter;
>
> my $in = Bio::Tools::BlastIO->new();
> my $writer = Bio::Tools::BlastIO::SbjctTableWriter->new();
> my $out = Bio::Tools::BlastIO->new( -writer => $writer,
> -file =>
> ">blast-table.txt" );
>
> while ( my $blast = $in->next_blast() ) {
> $out->write_blast($blast);
> }
>
> This works well enough for crunching through Blast results,
> but as for
> integrating with SeqAnalysisParserI, it might be better to
> have a more
> generic SeqAnalysisIO system that could be adapted for other types of
> results besides Blast:
>
> # Analogous to SeqIO but operating on AnalysisResult objects.
>
> use Bio::SeqAnalysisIO;
>
> my $in = Bio::SeqAnalysisIO->new('-method' => 'blast');
>
> while( my $analysis = $in->next_analysis() ) {
> while( my $feature = $analysis->next_feature() ) {
> print "Feature from ", $feature->start," to ",
> $feature->end, "\n";
> }
> }
>
> A nice thing about this is that it extends the Bioperl IO pattern to
> analysis results. However, this would be an alternative to the
> SeqAnalysisParserFactory system that's in place now. If we have
> something that works, why create yet another system? Perhaps
> a full IO
> system is only appropriate for some analysis results, such as Blast.
>
> Opinions welcome.
>
> Steve
>
> Steve_Chervitz@affymetrix.com
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>