3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
23 Please email comments or questions to the
public Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
34 initio prediction method
48 # seq() returns a Bio::Seq
49 my $seq = $exon->seq->seq();
51 # peptide() only makes sense within transcript context
52 my $pep = $exon->peptide($transcript)->seq();
54 # Normal feature operations can be performed:
55 $exon = $exon->transform(
'clone');
56 $exon->move( $new_start, $new_end, $new_strand );
57 print $exon->slice->seq_region_name();
61 This is a
class which represents an prediction
exon which is part of a
86 Description: create an
Exon object
97 $class = ref $class || $class;
99 my $self = $class->SUPER::new( @_ );
101 my ( $p_value, $score ) =
102 rearrange( [
"P_VALUE",
"SCORE" ], @_ );
104 $self->{
'p_value'} = $p_value;
105 $self->{
'score'} = $score;
113 Arg [1] :
string $newval (optional)
114 The
new value to set the score attribute to
115 Example : $score = $obj->score()
116 Description: Getter/Setter
for the score attribute
126 $self->{
'score'} = shift
if(@_);
127 return $self->{
'score'};
134 Arg [1] :
string $newval (optional)
135 The
new value to set the p_value attribute to
136 Example : $p_value = $obj->p_value()
137 Description: Getter/Setter
for the p_value attribute
147 $self->{
'p_value'} = shift
if(@_);
148 return $self->{
'p_value'};
154 Arg [1] : (optional)
int $end_phase
155 Example : $end_phase = $feat->end_phase;
156 Description: Gets/Sets the end phase of the
exon.
157 end_phase = number of bases from the last incomplete codon of
159 Usually, end_phase = (phase + exon_length)%3
160 but end_phase could be -1
if the
exon is half-coding and its 3
163 Exceptions : warning
if end_phase is called without an argument and the
175 throw(
"End_phase setting not supported" );
177 return ($self->phase() + $self->length()) % 3;
183 Arg 1 : String $coordinate_system_name
184 Arg [2] : String $coordinate_system_version
185 Description: moves
this exon to the given coordinate system. If
this exon has
186 attached supporting evidence, they move as well.
188 Exceptions : wrong parameters
198 # catch for old style transform calls
199 if( !@_ || ( ref $_[0] && ($_[0]->isa(
"Bio::EnsEMBL::Slice" ) or $_[0]->isa(
"Bio::EnsEMBL::LRGSlice" )))) {
200 throw(
"transform needs coordinate systems details now," .
201 "please use transfer" );
205 return undef unless $new_exon;
207 #dont want to share the same sequence cache
208 delete $new_exon->{
'_seq_cache'};
219 Description: Moves
this Exon to given target slice coordinates. If Features
220 are attached they are moved as well. Returns a
new exon.
232 return undef unless $new_exon;
234 #dont want to share the same sequence cache
235 delete $new_exon->{
'_seq_cache'};
240 =head2 summary_as_hash
242 Example : $exon_summary = $exon->summary_as_hash();
243 Description : Extends Feature::summary_as_hash
244 Retrieves a summary of
this prediction
exon.
245 Returns : hashref of descriptive strings
246 Status : Intended
for internal use
249 sub summary_as_hash {
251 my $summary_ref = $self->SUPER::summary_as_hash;
252 delete $summary_ref->{
'constitutive'};
253 delete $summary_ref->{
'ensembl_phase'};
254 delete $summary_ref->{
'ensembl_end_phase'};
255 $summary_ref->{
'Parent'} = $self->transcript->dbID()
if $self->transcript();
256 $summary_ref->{
'source'} = $self->prediction_transcript->analysis->gff_source() ||
'ensembl';
261 Example : $prediction_transcript = $exon->transcript;
262 Description : Locates the parent prediction
transcript using an
exon dbID
263 Same as prediction_transcript, duplicated
for compatibility
271 return $self->prediction_transcript;
274 =head2 prediction_transcript
276 Example : $prediction_transcript = $exon->prediction_transcript;
277 Description : Locates the parent prediction
transcript using an
exon dbID
282 sub prediction_transcript{
284 my $prediction_transcript_adaptor = $self->
adaptor->
db->get_PredictionTranscriptAdaptor();
285 my $parent_prediction_transcript = $prediction_transcript_adaptor->fetch_by_prediction_exon_id($self->dbID);
286 return $parent_prediction_transcript;
290 =head2 add_supporting_features
299 sub add_supporting_features { }
302 =head2 get_all_supporting_features
305 Does nothing and returns empty list
306 Returntype : empty list.
311 sub get_all_supporting_features {
return []; }
314 =head2 find_supporting_evidence
318 Returntype : empty list.
323 sub find_supporting_evidence {
return []; }