1 #---------------------------------------------------------------
4 # BioPerl module Bio::AnalysisParserI
6 # Cared for by Steve Chervitz <sac@bioperl.org>
8 # Derived from Bio::SeqAnalysisParserI by Jason Stajich, Hilmar Lapp.
10 # You may distribute this module under the same terms as perl itself
11 #---------------------------------------------------------------
15 Bio::AnalysisParserI - Generic analysis output parser interface
19 # get a AnalysisParserI somehow.
20 # Eventually, there may be an Bio::Factory::AnalysisParserFactory.
21 # For now a SearchIO object, an implementation of AnalysisParserI, can be created
22 # directly, as in the following:
23 my $parser = Bio::SearchIO->new(
24 '-file' => 'inputfile',
25 '-format' => 'blast');
27 while( my $result = $parser->next_result() ) {
28 print "Result: ", $result->analysis_method,
29 ", Query: ", $result->query_name, "\n";
31 while( my $feature = $result->next_feature() ) {
32 print "Feature from ", $feature->start, " to ",
39 AnalysisParserI is a interface for describing generic analysis
40 result parsers. This module makes no assumption about the nature of
41 analysis being parsed, only that zero or more result sets can be
42 obtained from the input source.
44 This module was derived from Bio::SeqAnalysisParserI, the differences being
48 =item 1. next_feature() was replaced with next_result().
50 Instead of flattening a stream containing potentially multiple
51 analysis results into a single set of features, AnalysisParserI
52 segments the stream in terms of analysis result sets
53 (Bio::AnalysisResultI objects). Each AnalysisResultI can then be
54 queried for its features (if any) as well as other information
57 =item 2. AnalysisParserI is a pure interface.
59 It does not inherit from Bio::Root::RootI and does not provide a new()
60 method. Implementations are free to choose how to implement it.
64 =head2 Rationale (copied from Bio::SeqAnalysisParserI)
66 The concept behind this interface is to have a generic interface in sequence
67 annotation pipelines (as used e.g. in high-throughput automated
68 sequence annotation). This interface enables plug-and-play for new analysis
69 methods and their corresponding parsers without the necessity for modifying
70 the core of the annotation pipeline. In this concept the annotation pipeline
71 has to rely on only a list of methods for which to process the results, and a
72 factory from which it can obtain the corresponding parser implementing this
77 Create Bio::Factory::AnalysisParserFactoryI and
78 Bio::Factory::AnalysisParserFactory for interface and an implementation.
79 Note that this factory could return Bio::SearchIO-derived objects.
85 User feedback is an integral part of the evolution of this
86 and other Bioperl modules. Send your comments and suggestions preferably
87 to one of the Bioperl mailing lists.
88 Your participation is much appreciated.
90 bioperl-l@bioperl.org - General discussion
91 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
95 Report bugs to the Bioperl bug tracking system to help us keep track
96 the bugs and their resolution. Bug reports can be submitted via the
99 http://bugzilla.open-bio.org/
101 =head1 AUTHOR - Steve Chervitz, Jason Stajich, Hilmar Lapp
103 Email sac@bioperl.org
105 Authors of Bio::SeqAnalysisParserI on which this module is based:
106 Email jason@bioperl.org
111 Copyright (c) 2001 Steve Chervitz. All Rights Reserved.
115 This software is provided "as is" without warranty of any kind.
119 The rest of the documentation details each of the object methods.
120 Internal methods are usually preceded with a _
124 package Bio
::AnalysisParserI
;
128 use base
qw(Bio::Root::RootI);
133 Usage : $result = $obj->next_result();
134 Function: Returns the next result available from the input, or
135 undef if there are no more results.
137 Returns : A Bio::Search::Result::ResultI implementing object,
138 or undef if there are no more results.
145 $self->throw_not_implemented;
152 NOTE
(sac
): My ten
-month old son Russell added the following line
.
153 It doesn
't look like it will compile so I'm putting it here
: