0
|
1 # $Id: SeqAnalysisParserFactoryI.pm,v 1.8 2002/12/01 00:05:20 jason Exp $
|
|
2 #
|
|
3 # BioPerl module for Bio::Factory::SeqAnalysisParserFactoryI
|
|
4 #
|
|
5 # Cared for by Jason Stajich <jason@bioperl.org>,
|
|
6 # and Hilmar Lapp <hlapp@gmx.net>
|
|
7 #
|
|
8 # Copyright Jason Stajich, Hilmar Lapp
|
|
9 #
|
|
10 # You may distribute this module under the same terms as perl itself
|
|
11
|
|
12 # POD documentation - main docs before the code
|
|
13
|
|
14 =head1 NAME
|
|
15
|
|
16 Bio::Factory::SeqAnalysisParserFactoryI - interface describing objects capable
|
|
17 of creating SeqAnalysisParserI compliant parsers
|
|
18
|
|
19 =head1 SYNOPSIS
|
|
20
|
|
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);
|
|
31 }
|
|
32
|
|
33 =head1 DESCRIPTION
|
|
34
|
|
35 This is an interface for factory classes capable of instantiating
|
|
36 SeqAnalysisParserI implementing parsers.
|
|
37
|
|
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.
|
|
41
|
|
42 =head1 FEEDBACK
|
|
43
|
|
44 =head2 Mailing Lists
|
|
45
|
|
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.
|
|
50
|
|
51 bioperl-l@bioperl.org - General discussion
|
|
52 http://bio.perl.org/MailList.html - About the mailing lists
|
|
53
|
|
54 =head2 Reporting Bugs
|
|
55
|
|
56 Report bugs to the Bioperl bug tracking system to help us keep track
|
|
57 the bugs and their resolution.
|
|
58 Bug reports can be submitted via email or the web:
|
|
59
|
|
60 bioperl-bugs@bio.perl.org
|
|
61 http://bugzilla.bioperl.org/
|
|
62
|
|
63 =head1 AUTHOR - Hilmar Lapp, Jason Stajich
|
|
64
|
|
65 Email Hilmar Lapp E<lt>hlapp@gmx.netE<gt>, Jason Stajich E<lt>jason@bioperl.orgE<gt>
|
|
66
|
|
67 =head1 APPENDIX
|
|
68
|
|
69 The rest of the documentation details each of the object
|
|
70 methods. Internal methods are usually preceded with a _
|
|
71
|
|
72 =cut
|
|
73
|
|
74 package Bio::Factory::SeqAnalysisParserFactoryI;
|
|
75 use strict;
|
|
76
|
|
77 use Bio::Root::RootI;
|
|
78 use Carp;
|
|
79
|
|
80 use vars qw(@ISA );
|
|
81 @ISA = qw(Bio::Root::RootI);
|
|
82
|
|
83 =head2 get_parser
|
|
84
|
|
85 Title : get_parser
|
|
86 Usage : $factory->get_parser(-input=>$inputobj,
|
|
87 [ -params=>[@params] ],
|
|
88 -method => $method)
|
|
89 Function: Creates and returns a parser object for the given input and method.
|
|
90 The type of input which is suitable depends on the implementation,
|
|
91 but a good-style implementation should allow both file names and
|
|
92 streams (filehandles).
|
|
93
|
|
94 A particular implementation may not be able to create a parser for
|
|
95 the requested method. In this case it shall return undef.
|
|
96
|
|
97 Parameters (-params argument) are passed on to the parser object
|
|
98 and therefore are specific to the parser to be created. An
|
|
99 implementation of this interface should make this argument optional.
|
|
100 Example :
|
|
101 Returns : A Bio::SeqAnalysisParserI implementing object.
|
|
102 Args : B<input> - object/file where analysis results are coming from,
|
|
103 B<params> - parameter to use when parsing/running analysis
|
|
104 B<method> - method of analysis
|
|
105
|
|
106 =cut
|
|
107
|
|
108 sub get_parser {
|
|
109 my ( $self, @args) = @_;
|
|
110 $self->throw_not_implemented();
|
|
111 }
|
|
112
|
|
113 1;
|