maint: restructure to use Dist::Zilla
[bioperl-live.git] / lib / Bio / Tools / Prediction / Exon.pm
blob2f2719b5fc003dac2181daf020784cf40289ba4c
2 # BioPerl module for Bio::Tools::Prediction::Exon
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Hilmar Lapp <hlapp@gmx.net>
8 # Copyright Hilmar Lapp
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
14 =head1 NAME
16 Bio::Tools::Prediction::Exon - A predicted exon feature
18 =head1 SYNOPSIS
20 # See documentation of methods.
22 =head1 DESCRIPTION
24 A feature representing a predicted exon. This class actually inherits
25 off Bio::SeqFeature::Gene::Exon and therefore has all that
26 functionality (also implements Bio::SeqFeatureI), plus a few methods
27 supporting predicted features, like various scores and a
28 significance. Even though these were inspired by GenScan results, at
29 least a subset should be generally useable for exon prediction
30 results.
32 =head1 FEEDBACK
34 =head2 Mailing Lists
36 User feedback is an integral part of the evolution of this
37 and other Bioperl modules. Send your comments and suggestions preferably
38 to one of the Bioperl mailing lists.
39 Your participation is much appreciated.
41 bioperl-l@bioperl.org - General discussion
42 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
44 =head2 Support
46 Please direct usage questions or support issues to the mailing list:
48 I<bioperl-l@bioperl.org>
50 rather than to the module maintainer directly. Many experienced and
51 reponsive experts will be able look at the problem and quickly
52 address it. Please include a thorough description of the problem
53 with code and data examples if at all possible.
55 =head2 Reporting Bugs
57 Report bugs to the Bioperl bug tracking system to help us keep track
58 the bugs and their resolution. Bug reports can be submitted via the
59 web:
61 https://github.com/bioperl/bioperl-live/issues
63 =head1 AUTHOR - Hilmar Lapp
65 Email hlapp-at-gmx.net
67 =head1 APPENDIX
69 The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
71 =cut
74 # Let the code begin...
77 package Bio::Tools::Prediction::Exon;
78 use strict;
81 use base qw(Bio::SeqFeature::Gene::Exon);
83 sub new {
84 my($class,@args) = @_;
86 my $self = $class->SUPER::new(@args);
88 return $self;
92 =head2 predicted_cds
94 Title : predicted_cds
95 Usage : $predicted_cds_dna = $exon->predicted_cds();
96 $exon->predicted_cds($predicted_cds_dna);
97 Function: Get/Set the CDS (coding sequence) as predicted by a program.
99 This method is independent of an attached_seq. There is no
100 guarantee whatsoever that the returned CDS has anything to do
101 (e.g., matches) with the sequence covered by the exons as annotated
102 through this object.
104 Example :
105 Returns : A Bio::PrimarySeqI implementing object holding the DNA sequence
106 defined as coding by a prediction of a program.
107 Args : On set, a Bio::PrimarySeqI implementing object holding the DNA
108 sequence defined as coding by a prediction of a program.
110 =cut
112 sub predicted_cds {
113 my ($self, $cds) = @_;
115 if(defined($cds)) {
116 $self->{'_predicted_cds'} = $cds;
118 return $self->{'_predicted_cds'};
121 =head2 predicted_protein
123 Title : predicted_protein
124 Usage : $predicted_protein_seq = $exon->predicted_protein();
125 $exon->predicted_protein($predicted_protein_seq);
126 Function: Get/Set the protein translation as predicted by a program.
128 This method is independent of an attached_seq. There is no
129 guarantee whatsoever that the returned translation has anything to
130 do with the sequence covered by the exons as annotated
131 through this object, or the sequence returned by predicted_cds(),
132 although it should usually be just the standard translation.
134 Example :
135 Returns : A Bio::PrimarySeqI implementing object holding the protein
136 translation as predicted by a program.
137 Args : On set, a Bio::PrimarySeqI implementing object holding the protein
138 translation as predicted by a program.
140 =cut
142 sub predicted_protein {
143 my ($self, $aa) = @_;
145 if(defined($aa)) {
146 $self->{'_predicted_aa'} = $aa;
148 return $self->{'_predicted_aa'};
151 =head2 significance
153 Title : significance
154 Usage : $evalue = $obj->significance();
155 $obj->significance($evalue);
156 Function:
157 Returns :
158 Args :
161 =cut
163 sub significance {
164 return shift->_tag_value('signif', @_);
167 =head2 start_signal_score
169 Title : start_signal_score
170 Usage : $sc = $obj->start_signal_score();
171 $obj->start_signal_score($evalue);
172 Function: Get/Set a score for the exon start signal (acceptor splice site
173 or initiation signal).
174 Returns :
175 Args :
178 =cut
180 sub start_signal_score {
181 return shift->_tag_value('AccScore', @_);
184 =head2 end_signal_score
186 Title : end_signal_score
187 Usage : $sc = $obj->end_signal_score();
188 $obj->end_signal_score($evalue);
189 Function: Get/Set a score for the exon end signal (donor splice site
190 or termination signal).
191 Returns :
192 Args :
195 =cut
197 sub end_signal_score {
198 return shift->_tag_value('DonScore', @_);
201 =head2 coding_signal_score
203 Title : coding_signal_score
204 Usage : $sc = $obj->coding_signal_score();
205 $obj->coding_signal_score($evalue);
206 Function: Get/Set a score for the exon coding signal (e.g., coding potential).
207 Returns :
208 Args :
211 =cut
213 sub coding_signal_score {
214 return shift->_tag_value('CodScore', @_);
218 # Everything else is just inherited from SeqFeature::Generic.