Bio::Tools::CodonTable::is_start_codon: check in case of ambiguous codons (#266)
[bioperl-live.git] / lib / Bio / AnalysisResultI.pm
blobcab6f3b6fe383937342d4b18f46d187eeba3c9d6
1 #-----------------------------------------------------------------
3 # BioPerl module Bio::AnalysisResultI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Steve Chervitz <sac@bioperl.org>
9 # Derived from Bio::Tools::AnalysisResult by Hilmar Lapp <hlapp@gmx.net>
11 # You may distribute this module under the same terms as perl itself
12 #-----------------------------------------------------------------
14 # POD documentation - main docs before the code
16 =head1 NAME
18 Bio::AnalysisResultI - Interface for analysis result objects
20 =head1 SYNOPSIS
22 Bio::AnalysisResultI defines an interface that must be implemented by
23 a subclass. So you cannot create Bio::AnalysisResultI objects,
24 only objects that inherit from Bio::AnalysisResultI.
26 =head1 DESCRIPTION
28 The AnalysisResultI module provides an interface for modules
29 encapsulating the result of an analysis that was carried out with a
30 query sequence and an optional subject dataset.
32 The notion of an analysis represented by this base class is that of a unary or
33 binary operator, taking either one query or a query and a subject and producing
34 a result. The query is e.g. a sequence, and a subject is either a sequence,
35 too, or a database of sequences.
37 This interface defines methods to access analysis result data and does
38 not impose any constraints on how the analysis result data is acquired.
40 Note that this module does not provide support for B<running> an analysis.
41 Rather, it is positioned in the subsequent parsing step (concerned with
42 turning raw results into BioPerl objects).
44 =head1 FEEDBACK
46 =head2 Mailing Lists
48 User feedback is an integral part of the evolution of this and other
49 Bioperl modules. Send your comments and suggestions preferably to one
50 of the Bioperl mailing lists. Your participation is much appreciated.
52 bioperl-l@bioperl.org - General discussion
53 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
55 =head2 Support
57 Please direct usage questions or support issues to the mailing list:
59 I<bioperl-l@bioperl.org>
61 rather than to the module maintainer directly. Many experienced and
62 reponsive experts will be able look at the problem and quickly
63 address it. Please include a thorough description of the problem
64 with code and data examples if at all possible.
66 =head2 Reporting Bugs
68 Report bugs to the Bioperl bug tracking system to help us keep track
69 the bugs and their resolution. Bug reports can be submitted via the web:
71 https://github.com/bioperl/bioperl-live/issues
73 =head1 AUTHOR - Steve Chervitz, Hilmar Lapp
75 Email sac@bioperl.org
76 Email hlapp@gmx.net (author of Bio::Tools::AnalysisResult on which this module is based)
78 =head1 COPYRIGHT
80 Copyright (c) 2001 Steve Chervitz. All Rights Reserved.
82 =head1 DISCLAIMER
84 This software is provided "as is" without warranty of any kind.
86 =head1 APPENDIX
88 The rest of the documentation details each of the object
89 methods. Internal methods are usually preceded with a _
91 =cut
94 # Let the code begin...
97 package Bio::AnalysisResultI;
99 use strict;
102 use base qw(Bio::Root::RootI);
105 =head2 analysis_query
107 Usage : $query_obj = $result->analysis_query();
108 Purpose : Get a Bio::PrimarySeqI-compatible object representing the entity
109 on which the analysis was performed. Lacks sequence information.
110 Argument : n/a
111 Returns : A Bio::PrimarySeqI-compatible object without sequence information.
112 The sequence will have display_id, description, moltype, and length data.
114 =cut
116 #---------------------
117 sub analysis_query {
118 #---------------------
119 my ($self) = @_;
120 $self->throw_not_implemented;
124 =head2 analysis_subject
126 Usage : $obj = $result->analyis_subject();
127 Purpose : Get the subject of the analysis against which it was
128 performed. For similarity searches it will probably be a database,
129 and for sequence feature predictions (exons, promoters, etc) it
130 may be a collection of models or homologous sequences that were
131 used, or undefined.
132 Returns : An object of a type the depends on the implementation
133 May also return undef for analyses that don\'t involve subjects.
134 Argument : n/a
135 Comments : Implementation of this method is optional.
136 AnalysisResultI provides a default behavior of returning undef.
138 =cut
140 #---------------
141 sub analysis_subject {
142 #---------------
143 my ($self) = @_;
144 return;
147 =head2 analysis_subject_version
149 Usage : $vers = $result->analyis_subject_version();
150 Purpose : Get the version string of the subject of the analysis.
151 Returns : String or undef for analyses that don\'t involve subjects.
152 Argument : n/a
153 Comments : Implementation of this method is optional.
154 AnalysisResultI provides a default behavior of returning undef.
156 =cut
158 #---------------
159 sub analysis_subject_version {
160 #---------------
161 my ($self) = @_;
162 return;
166 =head2 analysis_date
168 Usage : $date = $result->analysis_date();
169 Purpose : Get the date on which the analysis was performed.
170 Returns : String
171 Argument : n/a
173 =cut
175 #---------------------
176 sub analysis_date {
177 #---------------------
178 my ($self) = @_;
179 $self->throw_not_implemented;
182 =head2 analysis_method
184 Usage : $meth = $result->analysis_method();
185 Purpose : Get the name of the sequence analysis method that was used
186 to produce this result (BLASTP, FASTA, etc.). May also be the
187 actual name of a program.
188 Returns : String
189 Argument : n/a
191 =cut
193 #-------------
194 sub analysis_method {
195 #-------------
196 my ($self) = @_;
197 $self->throw_not_implemented;
200 =head2 analysis_method_version
202 Usage : $vers = $result->analysis_method_version();
203 Purpose : Get the version string of the analysis program.
204 : (e.g., 1.4.9MP, 2.0a19MP-WashU).
205 Returns : String
206 Argument : n/a
208 =cut
210 #---------------------
211 sub analysis_method_version {
212 #---------------------
213 my ($self) = @_;
214 $self->throw_not_implemented;
217 =head2 next_feature
219 Title : next_feature
220 Usage : $seqfeature = $obj->next_feature();
221 Function: Returns the next feature available in the analysis result, or
222 undef if there are no more features.
223 Example :
224 Returns : A Bio::SeqFeatureI implementing object, or undef if there are no
225 more features.
226 Args : none
228 =cut
230 #---------------------
231 sub next_feature {
232 #---------------------
233 my ($self);
234 $self->throw_not_implemented;