tag fourth (and hopefully last) alpha
[bioperl-live.git] / branch-1-6 / Bio / Tools / Prediction / Exon.pm
blob19cb1a769fbeea0ed7322b6ace374e946b5339d2
1 # $Id$
3 # BioPerl module for Bio::Tools::Prediction::Exon
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Hilmar Lapp <hlapp@gmx.net>
9 # Copyright Hilmar Lapp
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::Tools::Prediction::Exon - A predicted exon feature
19 =head1 SYNOPSIS
21 # See documentation of methods.
23 =head1 DESCRIPTION
25 A feature representing a predicted exon. This class actually inherits
26 off Bio::SeqFeature::Gene::Exon and therefore has all that
27 functionality (also implements Bio::SeqFeatureI), plus a few methods
28 supporting predicted features, like various scores and a
29 significance. Even though these were inspired by GenScan results, at
30 least a subset should be generally useable for exon prediction
31 results.
33 =head1 FEEDBACK
35 =head2 Mailing Lists
37 User feedback is an integral part of the evolution of this
38 and other Bioperl modules. Send your comments and suggestions preferably
39 to one of the Bioperl mailing lists.
40 Your participation is much appreciated.
42 bioperl-l@bioperl.org - General discussion
43 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
45 =head2 Support
47 Please direct usage questions or support issues to the mailing list:
49 I<bioperl-l@bioperl.org>
51 rather than to the module maintainer directly. Many experienced and
52 reponsive experts will be able look at the problem and quickly
53 address it. Please include a thorough description of the problem
54 with code and data examples if at all possible.
56 =head2 Reporting Bugs
58 Report bugs to the Bioperl bug tracking system to help us keep track
59 the bugs and their resolution. Bug reports can be submitted via the
60 web:
62 http://bugzilla.open-bio.org/
64 =head1 AUTHOR - Hilmar Lapp
66 Email hlapp-at-gmx.net
68 =head1 APPENDIX
70 The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
72 =cut
75 # Let the code begin...
78 package Bio::Tools::Prediction::Exon;
79 use strict;
82 use base qw(Bio::SeqFeature::Gene::Exon);
84 sub new {
85 my($class,@args) = @_;
87 my $self = $class->SUPER::new(@args);
89 return $self;
93 =head2 predicted_cds
95 Title : predicted_cds
96 Usage : $predicted_cds_dna = $exon->predicted_cds();
97 $exon->predicted_cds($predicted_cds_dna);
98 Function: Get/Set the CDS (coding sequence) as predicted by a program.
100 This method is independent of an attached_seq. There is no
101 guarantee whatsoever that the returned CDS has anything to do
102 (e.g., matches) with the sequence covered by the exons as annotated
103 through this object.
105 Example :
106 Returns : A Bio::PrimarySeqI implementing object holding the DNA sequence
107 defined as coding by a prediction of a program.
108 Args : On set, a Bio::PrimarySeqI implementing object holding the DNA
109 sequence defined as coding by a prediction of a program.
111 =cut
113 sub predicted_cds {
114 my ($self, $cds) = @_;
116 if(defined($cds)) {
117 $self->{'_predicted_cds'} = $cds;
119 return $self->{'_predicted_cds'};
122 =head2 predicted_protein
124 Title : predicted_protein
125 Usage : $predicted_protein_seq = $exon->predicted_protein();
126 $exon->predicted_protein($predicted_protein_seq);
127 Function: Get/Set the protein translation as predicted by a program.
129 This method is independent of an attached_seq. There is no
130 guarantee whatsoever that the returned translation has anything to
131 do with the sequence covered by the exons as annotated
132 through this object, or the sequence returned by predicted_cds(),
133 although it should usually be just the standard translation.
135 Example :
136 Returns : A Bio::PrimarySeqI implementing object holding the protein
137 translation as predicted by a program.
138 Args : On set, a Bio::PrimarySeqI implementing object holding the protein
139 translation as predicted by a program.
141 =cut
143 sub predicted_protein {
144 my ($self, $aa) = @_;
146 if(defined($aa)) {
147 $self->{'_predicted_aa'} = $aa;
149 return $self->{'_predicted_aa'};
152 =head2 significance
154 Title : significance
155 Usage : $evalue = $obj->significance();
156 $obj->significance($evalue);
157 Function:
158 Returns :
159 Args :
162 =cut
164 sub significance {
165 return shift->_tag_value('signif', @_);
168 =head2 start_signal_score
170 Title : start_signal_score
171 Usage : $sc = $obj->start_signal_score();
172 $obj->start_signal_score($evalue);
173 Function: Get/Set a score for the exon start signal (acceptor splice site
174 or initiation signal).
175 Returns :
176 Args :
179 =cut
181 sub start_signal_score {
182 return shift->_tag_value('AccScore', @_);
185 =head2 end_signal_score
187 Title : end_signal_score
188 Usage : $sc = $obj->end_signal_score();
189 $obj->end_signal_score($evalue);
190 Function: Get/Set a score for the exon end signal (donor splice site
191 or termination signal).
192 Returns :
193 Args :
196 =cut
198 sub end_signal_score {
199 return shift->_tag_value('DonScore', @_);
202 =head2 coding_signal_score
204 Title : coding_signal_score
205 Usage : $sc = $obj->coding_signal_score();
206 $obj->coding_signal_score($evalue);
207 Function: Get/Set a score for the exon coding signal (e.g., coding potential).
208 Returns :
209 Args :
212 =cut
214 sub coding_signal_score {
215 return shift->_tag_value('CodScore', @_);
219 # Everything else is just inherited from SeqFeature::Generic.