comment out FeatureIO, let Annotated tests fail until they are fixed
[bioperl-live.git] / Bio / Search / Processor.pm
blobcad0e6e356f5b1f327af29a88cab93b2873be44a
3 # BioPerl module for Bio::Search::Processor
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Aaron Mackey <amackey@virginia.edu>
9 # Copyright Aaron Mackey
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
15 =head1 NAME
17 Bio::Search::Processor - DESCRIPTION of Object
19 =head1 SYNOPSIS
21 Give standard usage here
23 =head1 DESCRIPTION
25 Describe the object here
27 =head1 FEEDBACK
29 =head2 Mailing Lists
31 User feedback is an integral part of the evolution of this and other
32 Bioperl modules. Send your comments and suggestions preferably to one
33 of the Bioperl mailing lists. Your participation is much appreciated.
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
38 =head2 Support
40 Please direct usage questions or support issues to the mailing list:
42 I<bioperl-l@bioperl.org>
44 rather than to the module maintainer directly. Many experienced and
45 reponsive experts will be able look at the problem and quickly
46 address it. Please include a thorough description of the problem
47 with code and data examples if at all possible.
49 =head2 Reporting Bugs
51 Report bugs to the Bioperl bug tracking system to help us keep track
52 the bugs and their resolution. Bug reports can be submitted via the
53 web:
55 https://redmine.open-bio.org/projects/bioperl/
57 =head1 AUTHOR - Aaron Mackey
59 Email amackey@virginia.edu
61 Describe contact details here
63 =head1 APPENDIX
65 The rest of the documentation details each of the object
66 methods. Internal methods are usually preceded with a _
68 =cut
70 # Let the code begin...
72 package Bio::Search::Processor;
74 use strict;
76 use Bio::Root::Version;
78 =head2 new
80 Title : new
81 Usage : $proc = Bio::Search::Processor->new -file => $filename,
82 -algorithm => 'Algorithm' ;
83 Function: Used to specify and initialize a data processor of search
84 algorithm results.
85 Returns : A processor specific to the algorithm type, if it exists.
86 Args : -file => filename
87 -algorithm => algorithm specifier
88 -fh => filehandle to attach to (file or fh required)
90 =cut
92 sub new {
94 my $type = shift;
95 my $proc;
96 my ($module, $load, $algorithm);
98 my %args = @_;
100 exists $args{'-algorithm'} or do {
101 print STDERR "Must supply an algorithm!";
102 return;
105 $algorithm = $args{'-algorithm'} || $args{'-ALGORITHM'};
107 $module = "_<Bio/Search/Processor/$algorithm.pm";
108 $load = "Bio/Search/Processor/$algorithm.pm";
110 unless ( $main::{$module} ) {
111 eval { require $load; };
112 if ( $@ ) {
113 print STDERR <<"EOF";
114 $load: $algorithm cannot be found
115 Exception $@
116 For more information about the Search/Processor system please see the
117 Processor docs. This includes ways of checking for processors at
118 compile time, not run time
120 return;
124 $proc = "Bio::Search::Processor::$algorithm"->new(@_);
125 return $proc;