~ubuntu-branches/ubuntu/raring/bioperl/raring

« back to all changes in this revision

Viewing changes to Bio/Tools/Analysis/SimpleAnalysisBase.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2008-03-18 14:44:57 UTC
  • mfrom: (4 hardy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080318144457-1jjoztrvqwf0gruk
* debian/control:
  - Removed MIA Matt Hope (dopey) from the Uploaders field.
    Thank you for your work, Matt. I hope you are doing well.
  - Downgraded some recommended package to the 'Suggests' priority,
    according to the following discussion on Upstream's mail list.
    http://bioperl.org/pipermail/bioperl-l/2008-March/027379.html
    (Closes: #448890)
* debian/copyright converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: SimpleAnalysisBase.pm,v 1.5 2003/09/23 13:50:37 radams Exp $
 
1
# $Id: SimpleAnalysisBase.pm,v 1.12.4.1 2006/10/02 23:10:32 sendu Exp $
2
2
#
3
3
# BioPerl module for Bio::Tools::Analysis::SimpleAnalysisBase
4
4
#
5
 
# Cared for by Heikki Lehvaslaiho <heikki@ebi.ac.uk>
 
5
# Cared for by Heikki Lehvaslaiho <heikki-at-bioperl-dot-org>
6
6
#
7
7
# Copyright Richard Adams
8
8
#
12
12
 
13
13
=head1 NAME
14
14
 
15
 
Bio::Tools::Analysis::SimpleAnalysisBase - abstact superclass for
 
15
Bio::Tools::Analysis::SimpleAnalysisBase - abstract superclass for
16
16
SimpleAnalysis implementations
17
17
 
18
18
=head1 SYNOPSIS
19
19
 
20
 
  # no to be run directly
 
20
# not to be run directly
21
21
 
22
22
=head1 DESCRIPTION
23
23
 
24
24
This class is a generic implementation of SimpleAnalysisI and should
25
25
be used as a base class for specific implementations.
26
26
 
27
 
SimpleAnalysis implementing modules just need to provide a specific _run()
28
 
result() and _init() methods, plus any get/set methods for parameter
29
 
to the analysis program.
 
27
Modules implementing SimpleAnalysisBase only need to provide specific 
 
28
_init(), _run() and result() methods, plus any get/set methods for 
 
29
parameters to the analysis program.
30
30
 
31
31
=head1 SEE ALSO
32
32
 
41
41
Bioperl modules. Send your comments and suggestions preferably to one
42
42
of the Bioperl mailing lists.  Your participation is much appreciated.
43
43
 
44
 
  bioperl-l@bioperl.org                       - General discussion
45
 
  http://bio.perl.org/MailList.html           - About the mailing lists
 
44
  bioperl-l@bioperl.org                  - General discussion
 
45
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
46
46
 
47
47
=head2 Reporting Bugs
48
48
 
49
49
Report bugs to the Bioperl bug tracking system to help us keep track
50
 
the bugs and their resolution.  Bug reports can be submitted via email
51
 
or the web:
 
50
the bugs and their resolution.  Bug reports can be submitted via the
 
51
web:
52
52
 
53
 
  bioperl-bugs@bio.perl.org
54
 
  http://bugzilla.bioperl.org/
 
53
  http://bugzilla.open-bio.org/
55
54
 
56
55
=head1 AUTHORS
57
56
 
58
57
Richard Adams, Richard.Adams@ed.ac.uk, 
59
 
Heikki Lehvaslaiho, heikki@ebi.ac.uk
 
58
Heikki Lehvaslaiho, heikki-at-bioperl-dot-org
60
59
 
61
60
=head1 APPENDIX
62
61
 
71
70
 
72
71
package Bio::Tools::Analysis::SimpleAnalysisBase;
73
72
 
74
 
use vars qw(@ISA);
75
73
use strict;
76
74
use Data::Dumper;
77
 
use Bio::SimpleAnalysisI;
78
 
use Bio::WebAgent;
79
75
 
80
76
my $FLOAT = '[+-]?\d*\.\d*';
81
77
 
82
78
my %STATUS =  map { $_ => 1 } qw(CREATED COMPLETED TERMINATED_BY_ERROR);
83
79
 
84
 
@ISA = qw(Bio::WebAgent Bio::SimpleAnalysisI );
 
80
use base qw(Bio::WebAgent Bio::SimpleAnalysisI);
85
81
 
86
82
=head2 new
87
83
 
98
94
sub new {
99
95
    my $class = shift;
100
96
 
101
 
    my $self = $class->SUPER::new(); #WebAGent new
102
 
    $self->_init;      #this line has to be before the attributes are filled in
 
97
    my $self = $class->SUPER::new(); #WebAgent new
 
98
    $self->_init; #this line has to be before the attributes are filled in
103
99
    while ( @_ ) {
104
100
        my $key = lc shift;
105
101
        $key =~ s/^-//;
135
131
 
136
132
=head2  analysis_name
137
133
 
138
 
    Useage   :  $analysis->analysis_name();
139
 
    Returns  :  The analysis name
140
 
    Arguments:  none
 
134
    Usage     : $analysis->analysis_name();
 
135
    Returns   : The analysis name
 
136
    Arguments : none
141
137
 
142
138
=cut
143
139
 
148
144
 
149
145
=head2  analysis_spec
150
146
 
151
 
    Useage   :  $analysis->analysis_spec();
 
147
    Usage    :  $analysis->analysis_spec();
152
148
    Returns  :  a hash reference to  a hash of analysis parameters. See
153
149
                Bio::SimpleAnalysisI for a list of recommended key values.
154
150
    Arguments:  none
162
158
 
163
159
=head2 clear
164
160
 
165
 
    Usage     :$analysis->clear();
166
 
    Returns   :true value on success
167
 
    Arguments :none
168
 
    Purpose   :to remove raw results from a previous analysis so that
169
 
               an analysis can be repeated with different parameters.
 
161
    Usage     : $analysis->clear();
 
162
    Returns   : true value on success
 
163
    Arguments : none
 
164
    Purpose   : to remove raw results from a previous analysis so that
 
165
                an analysis can be repeated with different parameters.
170
166
 
171
167
=cut
172
168
 
185
181
 
186
182
=head2  input_spec
187
183
 
188
 
    Useage   :  $analysis->input_spec();
189
 
    Returns  :  a  reference to  an array of  hashes of analysis parameters. See
 
184
    Usage     : $analysis->input_spec();
 
185
    Returns   : a  reference to  an array of  hashes of analysis parameters. See
190
186
                Bio::SimpleAnalysisI for a list of recommended key values.
191
 
    Arguments:  none
 
187
    Arguments : none
192
188
 
193
189
=cut
194
190
 
199
195
 
200
196
=head2  result_spec
201
197
 
202
 
    Useage   :  $analysis->result_spec();
203
 
    Returns  :  a  reference to  a   hashes of resultformats. See
204
 
                Bio::SimpleAnalysisI for a list of recommended key values. The key
205
 
                values can be used as parameters to the result() method, the values
206
 
                provide descriptions.
207
 
    Arguments:  none
 
198
    Usage     : $analysis->result_spec();
 
199
    Returns   : a  reference to  a   hashes of resultformats. See
 
200
                Bio::SimpleAnalysisI for a list of recommended key values. 
 
201
                The key values can be used as parameters to the result() 
 
202
                method, the values provide descriptions.
 
203
    Arguments : none
208
204
 
209
205
=cut
210
206
 
270
266
 
271
267
sub _run { shift->throw_not_implemented();}
272
268
        
273
 
 
274
 
 
 
269
1;