* sync with trunk
[bioperl-live.git] / Bio / Factory / SeqAnalysisParserFactoryI.pm
blob80f966b0c32ee206252d55c7d02b1f448d1449ff
1 # $Id$
3 # BioPerl module for Bio::Factory::SeqAnalysisParserFactoryI
5 # Cared for by Jason Stajich <jason@bioperl.org>,
6 # and Hilmar Lapp <hlapp@gmx.net>
8 # Copyright Jason Stajich, Hilmar Lapp
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
14 =head1 NAME
16 Bio::Factory::SeqAnalysisParserFactoryI - interface describing objects capable
17 of creating SeqAnalysisParserI compliant parsers
19 =head1 SYNOPSIS
21 # initialize an object implementing this interface, e.g.
22 $factory = Bio::Factory::SeqAnalysisParserFactory->new();
23 # obtain a parser object
24 $parser = $factory->get_parser(-input=>$inputobj,
25 -params=>[@params],
26 -method => $method);
27 # $parser is an object implementing Bio::SeqAnalysisParserI
28 # annotate sequence with features produced by parser
29 while(my $feat = $parser->next_feature()) {
30 $seq->add_SeqFeature($feat);
33 =head1 DESCRIPTION
35 This is an interface for factory classes capable of instantiating
36 SeqAnalysisParserI implementing parsers.
38 The concept behind the interface is a generic analysis result parsing
39 in high-throughput automated sequence annotation pipelines. See
40 L<Bio::SeqAnalysisParserI> for more documentation of this concept.
42 =head1 FEEDBACK
44 =head2 Mailing Lists
46 User feedback is an integral part of the evolution of this
47 and other Bioperl modules. Send your comments and suggestions preferably
48 to one of the Bioperl mailing lists.
49 Your participation is much appreciated.
51 bioperl-l@bioperl.org - General discussion
52 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
54 =head2 Reporting Bugs
56 Report bugs to the Bioperl bug tracking system to help us keep track
57 the bugs and their resolution. Bug reports can be submitted via the
58 web:
60 http://bugzilla.open-bio.org/
62 =head1 AUTHOR - Hilmar Lapp, Jason Stajich
64 Email Hilmar Lapp E<lt>hlapp@gmx.netE<gt>, Jason Stajich E<lt>jason@bioperl.orgE<gt>
66 =head1 APPENDIX
68 The rest of the documentation details each of the object
69 methods. Internal methods are usually preceded with a _
71 =cut
73 package Bio::Factory::SeqAnalysisParserFactoryI;
74 use strict;
76 use Carp;
78 use base qw(Bio::Root::RootI);
80 =head2 get_parser
82 Title : get_parser
83 Usage : $factory->get_parser(-input=>$inputobj,
84 [ -params=>[@params] ],
85 -method => $method)
86 Function: Creates and returns a parser object for the given input and method.
87 The type of input which is suitable depends on the implementation,
88 but a good-style implementation should allow both file names and
89 streams (filehandles).
91 A particular implementation may not be able to create a parser for
92 the requested method. In this case it shall return undef.
94 Parameters (-params argument) are passed on to the parser object
95 and therefore are specific to the parser to be created. An
96 implementation of this interface should make this argument optional.
97 Example :
98 Returns : A Bio::SeqAnalysisParserI implementing object.
99 Args : B<input> - object/file where analysis results are coming from,
100 B<params> - parameter to use when parsing/running analysis
101 B<method> - method of analysis
103 =cut
105 sub get_parser {
106 my ( $self, @args) = @_;
107 $self->throw_not_implemented();