2 # BioPerl module for Bio::Tools::Spidey::Exon
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Ryan Golhar <golharam@umdnj.edu>
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::Tools::Spidey::Exon - A single exon determined by an alignment
19 # See Bio::Tools::Spidey::Results for a description of the context.
21 # an instance of this class is-a Bio::SeqFeature::SimilarityPair
23 # coordinates of the exon (recommended way):
24 print "exon from ", $exon->start(),
25 " to ", $exon->end(), "\n";
27 # the same (feature1() inherited from Bio::SeqFeature::FeaturePair)
28 print "exon from ", $exon->feature1()->start(),
29 " to ", $exon->feature1()->end(), "\n";
30 # also the same (query() inherited from Bio::SeqFeature::SimilarityPair):
31 print "exon from ", $exon->query()->start(),
32 " to ", $exon->query()->end(), "\n";
34 # coordinates on the matching EST (recommended way):
35 print "matches on EST from ", $exon->est_hit()->start(),
36 " to ", $exon->est_hit()->end(), "\n";
38 # the same (feature2() inherited from Bio::SeqFeature::FeaturePair)
39 print "matches on EST from ", $exon->feature2()->start(),
40 " to ", $exon->feature2()->end(), "\n";
41 # also the same (subject() inherited from Bio::SeqFeature::SimilarityPair):
42 print "exon from ", $exon->subject()->start(),
43 " to ", $exon->subject()->end(), "\n";
47 This class inherits from Bio::SeqFeature::SimilarityPair and represents an
48 exon on a genomic sequence determined by similarity, that is, by aligning an
49 EST sequence (using Spidey in this case). Consequently, the notion of query and
50 subject is always from the perspective of the genomic sequence: query refers
51 to the genomic seq, subject to the aligned EST hit. Because of this,
52 $exon-E<gt>start(), $exon-E<gt>end() etc will always return what you expect.
54 To get the coordinates on the matching EST, refer to the properties of the
55 feature returned by L<est_hit>().
61 User feedback is an integral part of the evolution of this
62 and other Bioperl modules. Send your comments and suggestions preferably
63 to one of the Bioperl mailing lists.
64 Your participation is much appreciated.
66 bioperl-l@bioperl.org - General discussion
67 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
71 Please direct usage questions or support issues to the mailing list:
73 I<bioperl-l@bioperl.org>
75 rather than to the module maintainer directly. Many experienced and
76 reponsive experts will be able look at the problem and quickly
77 address it. Please include a thorough description of the problem
78 with code and data examples if at all possible.
82 Report bugs to the Bioperl bug tracking system to help us keep track
83 the bugs and their resolution. Bug reports can be submitted via the
86 https://github.com/bioperl/bioperl-live/issues
88 =head1 AUTHOR - Ryan Golhar
90 Email golharam@umdnj.edu
94 The rest of the documentation details each of the object methods.
95 Internal methods are usually preceded with a _
100 # Let the code begin...
103 package Bio
::Tools
::Spidey
::Exon
;
107 use base
qw(Bio::SeqFeature::SimilarityPair);
110 my ($class,@args) = @_;
112 my $self = $class->SUPER::new
(@args);
114 my ($prim, $prim_tag, $source, $source_tag) =
115 $self->_rearrange([qw(PRIMARY
121 $self->primary_tag('exon') unless $prim || $prim_tag;
122 $self->source_tag('Spidey') unless $source || $source_tag;
123 $self->strand(0) unless defined($self->strand());
130 Title : percentage_id
131 Usage : $obj->percentage_id
132 Function: This is the percent id as reported by Spidey
133 Returns : value of percentage_id
140 my ($self, @args) = @_;
145 $self->{'percentage_id'} = $val;
147 $val = $self->{'percentage_id'};
155 Usage : $est_feature = $obj->est_hit();
156 Function: Returns the EST hit pointing to (i.e., aligned to by Spidey) this
157 exon (i.e., genomic region). At present, merely a synonym for
159 Returns : An Bio::SeqFeatureI implementing object.
167 return $self->feature2(@_);
173 Usage : $obj->mismatches;
174 Function: Returns the mismatches of the cDNA to (i.e., aligned to by Spidey) this
175 exon (i.e., genomic region).
176 Returns : value of mismatches.
183 my ($self, @args) = @_;
188 $self->{'mismatches'} = $val;
190 $val = $self->{'mismatches'};
199 Function: Returns the gaps of the cDNA to (i.e., aligned to by Spidey) this
200 exon (i.e., genomic region).
201 Returns : value of gaps.
208 my ($self, @args) = @_;
213 $self->{'gaps'} = $val;
215 $val = $self->{'gaps'};
224 Function: Returns 0 if a splice donor site does not exist, or
225 1 if a splice donor site exists
226 Returns : value of existence of donor splice site (0 or 1)
233 my ($self, @args) = @_;
238 $self->{'donor'} = $val;
240 $val = $self->{'donor'};
248 Usage : $obj->acceptor;
249 Function: Returns 0 if a splice acceptor site does not exist, or
250 1 if a splice acceptor site exists
251 Returns : value of existence of acceptor splice site (0 or 1)
258 my ($self, @args) = @_;
263 $self->{'acceptor'} = $val;
265 $val = $self->{'acceptor'};