3 # bioperl module for Bio::LiveSeq::Exon
5 # Cared for by Joseph Insana <insana@ebi.ac.uk> <jinsana@gmx.net>
7 # Copyright Joseph Insana
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::LiveSeq::Exon - Range abstract class for LiveSeq
19 # documentation needed
23 Class for EXON objects. They consist of a beginlabel, an endlabel (both
24 referring to a LiveSeq DNA object) and a strand.
25 The strand could be 1 (forward strand, default), -1 (reverse strand).
27 =head1 AUTHOR - Joseph A.L. Insana
29 Email: Insana@ebi.ac.uk, jinsana@gmx.net
33 The rest of the documentation details each of the object
34 methods. Internal methods are usually preceded with a _
38 # Let the code begin...
40 package Bio
::LiveSeq
::Exon
;
43 use base
qw(Bio::LiveSeq::Range);
48 Usage : $exon1 = Bio::LiveSeq::Exon-> new(-seq => $objref,
49 -start => $startlabel,
50 -end => $endlabel, -strand => 1);
52 Function: generates a new Bio::LiveSeq::Exon
53 Returns : reference to a new object of class Exon
55 Args : two labels and an integer
61 Title : get_Transcript
62 Usage : $transcript = $obj->get_Transcript()
63 Function: retrieves the reference to the object of class Transcript (if any)
64 attached to a LiveSeq object
65 Returns : object reference
67 Note : only Exons that compose a Transcript (i.e. those created out of
68 a CDS Entry-Feature) will have an attached Transcript
74 return ($self->{'transcript'}); # this is set on all Exons a Transcript is made of when Transcript->new is called
77 # this checks if the attached Transcript has a Gene object attached
79 my ($self,$value) = @_;
81 $self->{'gene'} = $value;
83 unless (exists $self->{'gene'}) {
84 unless (exists $self->get_Transcript->{'gene'}) {
87 return ($self->get_Transcript->{'gene'});
90 return $self->{'gene'};