1 #---------------------------------------------------------------
4 # BioPerl module Bio::AnalysisParserI
6 # Please direct questions and support issues to <bioperl-l@bioperl.org>
8 # Cared for by Steve Chervitz <sac@bioperl.org>
10 # Derived from Bio::SeqAnalysisParserI by Jason Stajich, Hilmar Lapp.
12 # You may distribute this module under the same terms as perl itself
13 #---------------------------------------------------------------
17 Bio::AnalysisParserI - Generic analysis output parser interface
21 # get a AnalysisParserI somehow.
22 # Eventually, there may be an Bio::Factory::AnalysisParserFactory.
23 # For now a SearchIO object, an implementation of AnalysisParserI, can be created
24 # directly, as in the following:
25 my $parser = Bio::SearchIO->new(
26 '-file' => 'inputfile',
27 '-format' => 'blast');
29 while( my $result = $parser->next_result() ) {
30 print "Result: ", $result->analysis_method,
31 ", Query: ", $result->query_name, "\n";
33 while( my $feature = $result->next_feature() ) {
34 print "Feature from ", $feature->start, " to ",
41 AnalysisParserI is a interface for describing generic analysis
42 result parsers. This module makes no assumption about the nature of
43 analysis being parsed, only that zero or more result sets can be
44 obtained from the input source.
46 This module was derived from Bio::SeqAnalysisParserI, the differences being
50 =item 1. next_feature() was replaced with next_result().
52 Instead of flattening a stream containing potentially multiple
53 analysis results into a single set of features, AnalysisParserI
54 segments the stream in terms of analysis result sets
55 (Bio::AnalysisResultI objects). Each AnalysisResultI can then be
56 queried for its features (if any) as well as other information
59 =item 2. AnalysisParserI is a pure interface.
61 It does not inherit from Bio::Root::RootI and does not provide a new()
62 method. Implementations are free to choose how to implement it.
66 =head2 Rationale (copied from Bio::SeqAnalysisParserI)
68 The concept behind this interface is to have a generic interface in sequence
69 annotation pipelines (as used e.g. in high-throughput automated
70 sequence annotation). This interface enables plug-and-play for new analysis
71 methods and their corresponding parsers without the necessity for modifying
72 the core of the annotation pipeline. In this concept the annotation pipeline
73 has to rely on only a list of methods for which to process the results, and a
74 factory from which it can obtain the corresponding parser implementing this
79 Create Bio::Factory::AnalysisParserFactoryI and
80 Bio::Factory::AnalysisParserFactory for interface and an implementation.
81 Note that this factory could return Bio::SearchIO-derived objects.
87 User feedback is an integral part of the evolution of this
88 and other Bioperl modules. Send your comments and suggestions preferably
89 to one of the Bioperl mailing lists.
90 Your participation is much appreciated.
92 bioperl-l@bioperl.org - General discussion
93 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
97 Please direct usage questions or support issues to the mailing list:
99 I<bioperl-l@bioperl.org>
101 rather than to the module maintainer directly. Many experienced and
102 reponsive experts will be able look at the problem and quickly
103 address it. Please include a thorough description of the problem
104 with code and data examples if at all possible.
106 =head2 Reporting Bugs
108 Report bugs to the Bioperl bug tracking system to help us keep track
109 the bugs and their resolution. Bug reports can be submitted via the
112 http://bugzilla.open-bio.org/
114 =head1 AUTHOR - Steve Chervitz, Jason Stajich, Hilmar Lapp
116 Email sac@bioperl.org
118 Authors of Bio::SeqAnalysisParserI on which this module is based:
119 Email jason@bioperl.org
124 Copyright (c) 2001 Steve Chervitz. All Rights Reserved.
128 This software is provided "as is" without warranty of any kind.
132 The rest of the documentation details each of the object methods.
133 Internal methods are usually preceded with a _
137 package Bio
::AnalysisParserI
;
141 use base
qw(Bio::Root::RootI);
146 Usage : $result = $obj->next_result();
147 Function: Returns the next result available from the input, or
148 undef if there are no more results.
150 Returns : A Bio::Search::Result::ResultI implementing object,
151 or undef if there are no more results.
158 $self->throw_not_implemented;
165 NOTE
(sac
): My ten
-month old son Russell added the following line
.
166 It doesn
't look like it will compile so I'm putting it here
: