| 1 | # | ||||||||||||||||||||||||||||
| 2 | # BioPerl module for Bio::Tools::Spidey::Exon | ||||||||||||||||||||||||||||
| 3 | # | ||||||||||||||||||||||||||||
| 4 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||||||||||||||||||||||||||||
| 5 | # | ||||||||||||||||||||||||||||
| 6 | # Cared for by Ryan Golhar <golharam@umdnj.edu> | ||||||||||||||||||||||||||||
| 7 | # | ||||||||||||||||||||||||||||
| 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::Spidey::Exon - A single exon determined by an alignment | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | # See Bio::Tools::Spidey::Results for a description of the context. | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | # an instance of this class is-a Bio::SeqFeature::SimilarityPair | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | # coordinates of the exon (recommended way): | ||||||||||||||||||||||||||||
| 24 | print "exon from ", $exon->start(), | ||||||||||||||||||||||||||||
| 25 | " to ", $exon->end(), "\n"; | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 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"; | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 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"; | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 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"; | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | To get the coordinates on the matching EST, refer to the properties of the | ||||||||||||||||||||||||||||
| 55 | feature returned by L<est_hit>(). | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | =head1 FEEDBACK | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | =head2 Mailing Lists | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | bioperl-l@bioperl.org - General discussion | ||||||||||||||||||||||||||||
| 67 | http://bioperl.org/wiki/Mailing_lists - About the mailing lists | ||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | =head2 Support | ||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | Please direct usage questions or support issues to the mailing list: | ||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||
| 73 | I<bioperl-l@bioperl.org> | ||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||
| 80 | =head2 Reporting Bugs | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 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 | ||||||||||||||||||||||||||||
| 84 | web: | ||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||
| 86 | https://github.com/bioperl/bioperl-live/issues | ||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||
| 88 | =head1 AUTHOR - Ryan Golhar | ||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | Email golharam@umdnj.edu | ||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||
| 92 | =head1 APPENDIX | ||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | The rest of the documentation details each of the object methods. | ||||||||||||||||||||||||||||
| 95 | Internal methods are usually preceded with a _ | ||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | =cut | ||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||
| 100 | # Let the code begin... | ||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||
| 103 | package Bio::Tools::Spidey::Exon; | ||||||||||||||||||||||||||||
| 104 | 3 | $Bio::Tools::Spidey::Exon::VERSION = '1.7.8'; | |||||||||||||||||||||||||||
| 105 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||
| 108 | 3 | ▶ | use base qw(Bio::SeqFeature::SimilarityPair); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | 6 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=6 SCAR=19.9
Pod
documented
| |||||||||||||||||||||||||||||
| 111 | 6 | my ($class,@args) = @_; | |||||||||||||||||||||||||||
| 112 | 6 | my %param = @args; | |||||||||||||||||||||||||||
| 113 | 6 | my $self = $class->SUPER::new(@args); | |||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||
| 115 | 6 | my ($prim, $prim_tag, $source, $source_tag) = | |||||||||||||||||||||||||||
| 116 | $self->_rearrange([qw(PRIMARY | ||||||||||||||||||||||||||||
| 117 | PRIMARY_TAG | ||||||||||||||||||||||||||||
| 118 | SOURCE | ||||||||||||||||||||||||||||
| 119 | SOURCE_TAG)], | ||||||||||||||||||||||||||||
| 120 | @args); | ||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||
| 122 | 6 | ▶ | $self->primary_tag('exon') unless $prim || $prim_tag; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$prim or $prim_tag
MC/DC0%0/2
$prim or $prim_tag
$prim
$prim_tag
Truth table33%1/3
A or B
A= $primB= $prim_tag
| |||||||||||||||||||||||||||||
| 123 | 6 | ▶ | $self->source_tag('Spidey') unless $source || $source_tag; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$source or $source_tag
MC/DC0%0/2
$source or $source_tag
$source
$source_tag
Truth table33%1/3
A or B
A= $sourceB= $source_tag
| |||||||||||||||||||||||||||||
| 124 | 6 | ▶ | $self->strand(0) unless defined($self->strand()); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 125 | 6 | $self->query(); | |||||||||||||||||||||||||||
| 126 | 6 | return $self; | |||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||
| 129 | =head2 percentage_id | ||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||
| 131 | Title : percentage_id | ||||||||||||||||||||||||||||
| 132 | Usage : $obj->percentage_id | ||||||||||||||||||||||||||||
| 133 | Function: This is the percent id as reported by Spidey | ||||||||||||||||||||||||||||
| 134 | Returns : value of percentage_id | ||||||||||||||||||||||||||||
| 135 | Args : | ||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||
| 138 | =cut | ||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||
| 140 | 6 | ▶ | sub percentage_id { | ||||||||||||||||||||||||||
|
Subroutine
percentage_id: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 141 | 6 | my ($self, @args) = @_; | |||||||||||||||||||||||||||
| 142 | 6 | my $val; | |||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||
| 144 | 6 | ▶ | if(@args) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 145 | 6 | $val = shift(@args); | |||||||||||||||||||||||||||
| 146 | 6 | $self->{'percentage_id'} = $val; | |||||||||||||||||||||||||||
| 147 | } else { | ||||||||||||||||||||||||||||
| 148 | 0 | $val = $self->{'percentage_id'}; | |||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||
| 150 | 6 | return $val; | |||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||
| 153 | =head2 est_hit | ||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||
| 155 | Title : est_hit | ||||||||||||||||||||||||||||
| 156 | Usage : $est_feature = $obj->est_hit(); | ||||||||||||||||||||||||||||
| 157 | Function: Returns the EST hit pointing to (i.e., aligned to by Spidey) this | ||||||||||||||||||||||||||||
| 158 | exon (i.e., genomic region). At present, merely a synonym for | ||||||||||||||||||||||||||||
| 159 | $obj->feature2(). | ||||||||||||||||||||||||||||
| 160 | Returns : An Bio::SeqFeatureI implementing object. | ||||||||||||||||||||||||||||
| 161 | Args : | ||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||
| 164 | =cut | ||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||
| 166 | 11 | ▶ | sub est_hit { | ||||||||||||||||||||||||||
|
Subroutine
est_hit: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 167 | 11 | my $self = shift; | |||||||||||||||||||||||||||
| 168 | 11 | return $self->feature2(@_); | |||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||
| 171 | =head2 mismatches | ||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||
| 173 | Title : mismatches | ||||||||||||||||||||||||||||
| 174 | Usage : $obj->mismatches; | ||||||||||||||||||||||||||||
| 175 | Function: Returns the mismatches of the cDNA to (i.e., aligned to by Spidey) this | ||||||||||||||||||||||||||||
| 176 | exon (i.e., genomic region). | ||||||||||||||||||||||||||||
| 177 | Returns : value of mismatches. | ||||||||||||||||||||||||||||
| 178 | Args : | ||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||
| 181 | =cut | ||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||
| 183 | 6 | ▶ | sub mismatches { | ||||||||||||||||||||||||||
|
Subroutine
mismatches: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 184 | 6 | my ($self, @args) = @_; | |||||||||||||||||||||||||||
| 185 | 6 | my $val; | |||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||
| 187 | 6 | ▶ | if(@args) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 188 | 6 | $val = shift(@args); | |||||||||||||||||||||||||||
| 189 | 6 | $self->{'mismatches'} = $val; | |||||||||||||||||||||||||||
| 190 | } else { | ||||||||||||||||||||||||||||
| 191 | 0 | $val = $self->{'mismatches'}; | |||||||||||||||||||||||||||
| 192 | } | ||||||||||||||||||||||||||||
| 193 | 6 | return $val; | |||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||
| 196 | =head2 gaps | ||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||
| 198 | Title : gaps | ||||||||||||||||||||||||||||
| 199 | Usage : $obj->gaps; | ||||||||||||||||||||||||||||
| 200 | Function: Returns the gaps of the cDNA to (i.e., aligned to by Spidey) this | ||||||||||||||||||||||||||||
| 201 | exon (i.e., genomic region). | ||||||||||||||||||||||||||||
| 202 | Returns : value of gaps. | ||||||||||||||||||||||||||||
| 203 | Args : | ||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||
| 206 | =cut | ||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||
| 208 | 6 | ▶ | sub gaps { | ||||||||||||||||||||||||||
|
Subroutine
gaps: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 209 | 6 | my ($self, @args) = @_; | |||||||||||||||||||||||||||
| 210 | 6 | my $val; | |||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||
| 212 | 6 | ▶ | if(@args) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 213 | 6 | $val = shift(@args); | |||||||||||||||||||||||||||
| 214 | 6 | $self->{'gaps'} = $val; | |||||||||||||||||||||||||||
| 215 | } else { | ||||||||||||||||||||||||||||
| 216 | 0 | $val = $self->{'gaps'}; | |||||||||||||||||||||||||||
| 217 | } | ||||||||||||||||||||||||||||
| 218 | 6 | return $val; | |||||||||||||||||||||||||||
| 219 | } | ||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||
| 221 | =head2 donor | ||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||
| 223 | Title : donor | ||||||||||||||||||||||||||||
| 224 | Usage : $obj->donor; | ||||||||||||||||||||||||||||
| 225 | Function: Returns 0 if a splice donor site does not exist, or | ||||||||||||||||||||||||||||
| 226 | 1 if a splice donor site exists | ||||||||||||||||||||||||||||
| 227 | Returns : value of existence of donor splice site (0 or 1) | ||||||||||||||||||||||||||||
| 228 | Args : | ||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||
| 231 | =cut | ||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||
| 233 | 8 | ▶ | sub donor { | ||||||||||||||||||||||||||
|
Subroutine
donor: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 234 | 8 | my ($self, @args) = @_; | |||||||||||||||||||||||||||
| 235 | 8 | my $val; | |||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||
| 237 | 8 | ▶ | if (@args) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 238 | 6 | $val = shift @args; | |||||||||||||||||||||||||||
| 239 | 6 | $self->{'donor'} = $val; | |||||||||||||||||||||||||||
| 240 | } else { | ||||||||||||||||||||||||||||
| 241 | 2 | $val = $self->{'donor'}; | |||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||
| 243 | 8 | return $val; | |||||||||||||||||||||||||||
| 244 | } | ||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||
| 246 | =head2 acceptor | ||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||
| 248 | Title : acceptor | ||||||||||||||||||||||||||||
| 249 | Usage : $obj->acceptor; | ||||||||||||||||||||||||||||
| 250 | Function: Returns 0 if a splice acceptor site does not exist, or | ||||||||||||||||||||||||||||
| 251 | 1 if a splice acceptor site exists | ||||||||||||||||||||||||||||
| 252 | Returns : value of existence of acceptor splice site (0 or 1) | ||||||||||||||||||||||||||||
| 253 | Args : | ||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||
| 256 | =cut | ||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||
| 258 | 8 | ▶ | sub acceptor { | ||||||||||||||||||||||||||
|
Subroutine
acceptor: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 259 | 8 | my ($self, @args) = @_; | |||||||||||||||||||||||||||
| 260 | 8 | my $val; | |||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | 8 | ▶ | if (@args) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 263 | 6 | $val = shift @args; | |||||||||||||||||||||||||||
| 264 | 6 | $self->{'acceptor'} = $val; | |||||||||||||||||||||||||||
| 265 | } else { | ||||||||||||||||||||||||||||
| 266 | 2 | $val = $self->{'acceptor'}; | |||||||||||||||||||||||||||
| 267 | } | ||||||||||||||||||||||||||||
| 268 | 8 | return $val; | |||||||||||||||||||||||||||
| 269 | } | ||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||
| 271 | |||||||||||||||||||||||||||||
| 272 | 3 | 1; | |||||||||||||||||||||||||||