Mercurial > repos > willmclaren > ensembl_vep
comparison variant_effect_predictor/Bio/Tools/Prediction/Exon.pm @ 0:21066c0abaf5 draft
Uploaded
author | willmclaren |
---|---|
date | Fri, 03 Aug 2012 10:04:48 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:21066c0abaf5 |
---|---|
1 # $Id: Exon.pm,v 1.10 2002/10/22 07:38:48 lapp Exp $ | |
2 # | |
3 # BioPerl module for Bio::Tools::Prediction::Exon | |
4 # | |
5 # Cared for by Hilmar Lapp <hlapp@gmx.net> | |
6 # | |
7 # Copyright Hilmar Lapp | |
8 # | |
9 # You may distribute this module under the same terms as perl itself | |
10 | |
11 # POD documentation - main docs before the code | |
12 | |
13 =head1 NAME | |
14 | |
15 Bio::Tools::Prediction::Exon - A predicted exon feature | |
16 | |
17 =head1 SYNOPSIS | |
18 | |
19 See documentation of methods. | |
20 | |
21 =head1 DESCRIPTION | |
22 | |
23 A feature representing a predicted exon. This class actually inherits | |
24 off Bio::SeqFeature::Gene::Exon and therefore has all that | |
25 functionality (also implements Bio::SeqFeatureI), plus a few methods | |
26 supporting predicted features, like various scores and a | |
27 significance. Even though these were inspired by GenScan results, at | |
28 least a subset should be generally useable for exon prediction | |
29 results. | |
30 | |
31 =head1 FEEDBACK | |
32 | |
33 =head2 Mailing Lists | |
34 | |
35 User feedback is an integral part of the evolution of this | |
36 and other Bioperl modules. Send your comments and suggestions preferably | |
37 to one of the Bioperl mailing lists. | |
38 Your participation is much appreciated. | |
39 | |
40 bioperl-l@bioperl.org - General discussion | |
41 http://bio.perl.org/MailList.html - About the mailing lists | |
42 | |
43 =head2 Reporting Bugs | |
44 | |
45 Report bugs to the Bioperl bug tracking system to help us keep track | |
46 the bugs and their resolution. | |
47 Bug reports can be submitted via email or the web: | |
48 | |
49 bioperl-bugs@bio.perl.org | |
50 http://bugzilla.bioperl.org/ | |
51 | |
52 =head1 AUTHOR - Hilmar Lapp | |
53 | |
54 Email hlapp@gmx.net | |
55 | |
56 Describe contact details here | |
57 | |
58 =head1 APPENDIX | |
59 | |
60 The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ | |
61 | |
62 =cut | |
63 | |
64 | |
65 # Let the code begin... | |
66 | |
67 | |
68 package Bio::Tools::Prediction::Exon; | |
69 use vars qw(@ISA); | |
70 use strict; | |
71 | |
72 use Bio::SeqFeature::Gene::Exon; | |
73 | |
74 @ISA = qw(Bio::SeqFeature::Gene::Exon); | |
75 | |
76 sub new { | |
77 my($class,@args) = @_; | |
78 | |
79 my $self = $class->SUPER::new(@args); | |
80 | |
81 my ($primary) = $self->_rearrange([qw(PRIMARY)],@args); | |
82 | |
83 return $self; | |
84 } | |
85 | |
86 | |
87 =head2 predicted_cds | |
88 | |
89 Title : predicted_cds | |
90 Usage : $predicted_cds_dna = $exon->predicted_cds(); | |
91 $exon->predicted_cds($predicted_cds_dna); | |
92 Function: Get/Set the CDS (coding sequence) as predicted by a program. | |
93 | |
94 This method is independent of an attached_seq. There is no | |
95 guarantee whatsoever that the returned CDS has anything to do | |
96 (e.g., matches) with the sequence covered by the exons as annotated | |
97 through this object. | |
98 | |
99 Example : | |
100 Returns : A Bio::PrimarySeqI implementing object holding the DNA sequence | |
101 defined as coding by a prediction of a program. | |
102 Args : On set, a Bio::PrimarySeqI implementing object holding the DNA | |
103 sequence defined as coding by a prediction of a program. | |
104 | |
105 =cut | |
106 | |
107 sub predicted_cds { | |
108 my ($self, $cds) = @_; | |
109 | |
110 if(defined($cds)) { | |
111 $self->{'_predicted_cds'} = $cds; | |
112 } | |
113 return $self->{'_predicted_cds'}; | |
114 } | |
115 | |
116 =head2 predicted_protein | |
117 | |
118 Title : predicted_protein | |
119 Usage : $predicted_protein_seq = $exon->predicted_protein(); | |
120 $exon->predicted_protein($predicted_protein_seq); | |
121 Function: Get/Set the protein translation as predicted by a program. | |
122 | |
123 This method is independent of an attached_seq. There is no | |
124 guarantee whatsoever that the returned translation has anything to | |
125 do with the sequence covered by the exons as annotated | |
126 through this object, or the sequence returned by predicted_cds(), | |
127 although it should usually be just the standard translation. | |
128 | |
129 Example : | |
130 Returns : A Bio::PrimarySeqI implementing object holding the protein | |
131 translation as predicted by a program. | |
132 Args : On set, a Bio::PrimarySeqI implementing object holding the protein | |
133 translation as predicted by a program. | |
134 | |
135 =cut | |
136 | |
137 sub predicted_protein { | |
138 my ($self, $aa) = @_; | |
139 | |
140 if(defined($aa)) { | |
141 $self->{'_predicted_aa'} = $aa; | |
142 } | |
143 return $self->{'_predicted_aa'}; | |
144 } | |
145 | |
146 =head2 significance | |
147 | |
148 Title : significance | |
149 Usage : $evalue = $obj->significance(); | |
150 $obj->significance($evalue); | |
151 Function: | |
152 Returns : | |
153 Args : | |
154 | |
155 | |
156 =cut | |
157 | |
158 sub significance { | |
159 my ($self, $value) = @_; | |
160 | |
161 return $self->_tag_value('signif', $value); | |
162 } | |
163 | |
164 =head2 start_signal_score | |
165 | |
166 Title : start_signal_score | |
167 Usage : $sc = $obj->start_signal_score(); | |
168 $obj->start_signal_score($evalue); | |
169 Function: Get/Set a score for the exon start signal (acceptor splice site | |
170 or initiation signal). | |
171 Returns : | |
172 Args : | |
173 | |
174 | |
175 =cut | |
176 | |
177 sub start_signal_score { | |
178 my ($self, $value) = @_; | |
179 | |
180 return $self->_tag_value('AccScore', $value); | |
181 } | |
182 | |
183 =head2 end_signal_score | |
184 | |
185 Title : end_signal_score | |
186 Usage : $sc = $obj->end_signal_score(); | |
187 $obj->end_signal_score($evalue); | |
188 Function: Get/Set a score for the exon end signal (donor splice site | |
189 or termination signal). | |
190 Returns : | |
191 Args : | |
192 | |
193 | |
194 =cut | |
195 | |
196 sub end_signal_score { | |
197 my ($self, $value) = @_; | |
198 | |
199 return $self->_tag_value('DonScore', $value); | |
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 sub coding_signal_score { | |
215 my ($self, $value) = @_; | |
216 | |
217 return $self->_tag_value('CodScore', $value); | |
218 } | |
219 | |
220 # | |
221 # Everything else is just inherited from SeqFeature::Generic. | |
222 # | |
223 | |
224 1; |