Bio/Tools/Prediction/Exon.pm

filter: Statementstmt 65.2% 15 / 23 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 77.7% 7 / 9 Podpod 100% 7 / 7 totaltotal 67.4% 29 / 43 CC 3 SCAR 10.4
CC
3
Cov
56%
predicted_cds
6.0
predicted_protein
6.0
BEGIN
1.0
CRAP 2.8
« Bio/Annotation/Comment.pm ↑ Summary Bio/SeqFeature/Gene/TranscriptI.pm »
1 #
2 # BioPerl module for Bio::Tools::Prediction::Exon
3 #
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
5 #
6 # Cared for by Hilmar Lapp <hlapp@gmx.net>
7 #
8 # Copyright Hilmar Lapp
9 #
10 # You may distribute this module under the same terms as perl itself
11  
12 # POD documentation - main docs before the code
13  
14 =head1 NAME
15  
16 Bio::Tools::Prediction::Exon - A predicted exon feature
17  
18 =head1 SYNOPSIS
19  
20 # See documentation of methods.
21  
22 =head1 DESCRIPTION
23  
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.
31  
32 =head1 FEEDBACK
33  
34 =head2 Mailing Lists
35  
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.
40  
41 bioperl-l@bioperl.org - General discussion
42 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
43  
44 =head2 Support
45  
46 Please direct usage questions or support issues to the mailing list:
47  
48 I<bioperl-l@bioperl.org>
49  
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.
54  
55 =head2 Reporting Bugs
56  
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:
60  
61 https://github.com/bioperl/bioperl-live/issues
62  
63 =head1 AUTHOR - Hilmar Lapp
64  
65 Email hlapp-at-gmx.net
66  
67 =head1 APPENDIX
68  
69 The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
70  
71 =cut
72  
73  
74 # Let the code begin...
75  
76  
77 package Bio::Tools::Prediction::Exon;
78 11 $Bio::Tools::Prediction::Exon::VERSION = '1.7.8';
79 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
80  
81  
82 11 ▶use base qw(Bio::SeqFeature::Gene::Exon);
Subroutine BEGIN: called CC=1 SCAR=0.0
83  
84 422 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
85 422 my($class,@args) = @_;
86
87 422 my $self = $class->SUPER::new(@args);
88  
89 422 return $self;
90 }
91  
92  
93 =head2 predicted_cds
94  
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.
99  
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.
104  
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.
110  
111 =cut
112  
113 0 ▶sub predicted_cds {
Subroutine predicted_cds: not called CC=2 SCAR=17.9
Pod documented
114 0 my ($self, $cds) = @_;
115  
116 0 ▶ if(defined($cds)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $cds) 0 0 0
117 0 $self->{'_predicted_cds'} = $cds;
118 }
119 0 return $self->{'_predicted_cds'};
120 }
121  
122 =head2 predicted_protein
123  
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.
128  
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.
134  
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.
140  
141 =cut
142  
143 0 ▶sub predicted_protein {
Subroutine predicted_protein: not called CC=2 SCAR=17.9
Pod documented
144 0 my ($self, $aa) = @_;
145  
146 0 ▶ if(defined($aa)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $aa) 0 0 0
147 0 $self->{'_predicted_aa'} = $aa;
148 }
149 0 return $self->{'_predicted_aa'};
150 }
151  
152 =head2 significance
153  
154 Title : significance
155 Usage : $evalue = $obj->significance();
156 $obj->significance($evalue);
157 Function:
158 Returns :
159 Args :
160  
161  
162 =cut
163  
164 120 ▶sub significance {
Subroutine significance: called CC=1 SCAR=0.0
Pod documented
165 120 return shift->_tag_value('signif', @_);
166 }
167  
168 =head2 start_signal_score
169  
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 :
177  
178  
179 =cut
180  
181 120 ▶sub start_signal_score {
Subroutine start_signal_score: called CC=1 SCAR=0.0
Pod documented
182 120 return shift->_tag_value('AccScore', @_);
183 }
184  
185 =head2 end_signal_score
186  
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 :
194  
195  
196 =cut
197  
198 120 ▶sub end_signal_score {
Subroutine end_signal_score: called CC=1 SCAR=0.0
Pod documented
199 120 return shift->_tag_value('DonScore', @_);
200 }
201  
202 =head2 coding_signal_score
203  
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 :
210  
211  
212 =cut
213  
214 120 ▶sub coding_signal_score {
Subroutine coding_signal_score: called CC=1 SCAR=0.0
Pod documented
215 120 return shift->_tag_value('CodScore', @_);
216 }
217  
218 #
219 # Everything else is just inherited from SeqFeature::Generic.
220 #
221  
222 11 1;
« Bio/Annotation/Comment.pm ↑ Summary Bio/SeqFeature/Gene/TranscriptI.pm »