| 1 | # | ||||||||||||||||||||||||||||
| 2 | # BioPerl module for Bio::SeqFeature::Gene::TranscriptI | ||||||||||||||||||||||||||||
| 3 | # | ||||||||||||||||||||||||||||
| 4 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||||||||||||||||||||||||||||
| 5 | # | ||||||||||||||||||||||||||||
| 6 | # Cared for by Hilmar Lapp <hlapp@gmx.net> | ||||||||||||||||||||||||||||
| 7 | # | ||||||||||||||||||||||||||||
| 8 | # Copyright Hilmar Lapp | ||||||||||||||||||||||||||||
| 9 | # | ||||||||||||||||||||||||||||
| 10 | # You may distribute this module under the same terms as perl itself | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | # POD documentation - main docs before the code | ||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | =head1 NAME | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | Bio::SeqFeature::Gene::TranscriptI - Interface for a feature representing a | ||||||||||||||||||||||||||||
| 17 | transcript of exons, promoter(s), UTR, and a poly-adenylation site. | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | #documentation needed | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | A feature representing a transcript. | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | =head1 FEEDBACK | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | =head2 Mailing Lists | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | User feedback is an integral part of the evolution of this | ||||||||||||||||||||||||||||
| 32 | and other Bioperl modules. Send your comments and suggestions preferably | ||||||||||||||||||||||||||||
| 33 | to one of the Bioperl mailing lists. | ||||||||||||||||||||||||||||
| 34 | Your participation is much appreciated. | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | bioperl-l@bioperl.org - General discussion | ||||||||||||||||||||||||||||
| 37 | http://bioperl.org/wiki/Mailing_lists - About the mailing lists | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | =head2 Support | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | Please direct usage questions or support issues to the mailing list: | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | I<bioperl-l@bioperl.org> | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | rather than to the module maintainer directly. Many experienced and | ||||||||||||||||||||||||||||
| 46 | reponsive experts will be able look at the problem and quickly | ||||||||||||||||||||||||||||
| 47 | address it. Please include a thorough description of the problem | ||||||||||||||||||||||||||||
| 48 | with code and data examples if at all possible. | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | =head2 Reporting Bugs | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | Report bugs to the Bioperl bug tracking system to help us keep track | ||||||||||||||||||||||||||||
| 53 | the bugs and their resolution. Bug reports can be submitted via the | ||||||||||||||||||||||||||||
| 54 | web: | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | https://github.com/bioperl/bioperl-live/issues | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | =head1 AUTHOR - Hilmar Lapp | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | Email hlapp@gmx.net | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | =head1 APPENDIX | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | The rest of the documentation details each of the object methods. | ||||||||||||||||||||||||||||
| 65 | Internal methods are usually preceded with a _ | ||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | =cut | ||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | # Let the code begin... | ||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||
| 73 | package Bio::SeqFeature::Gene::TranscriptI; | ||||||||||||||||||||||||||||
| 74 | 25 | $Bio::SeqFeature::Gene::TranscriptI::VERSION = '1.7.8'; | |||||||||||||||||||||||||||
| 75 | 25 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | 25 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | 25 | ▶ | use base qw(Bio::SeqFeatureI); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | =head2 promoters | ||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||
| 83 | Title : promoters() | ||||||||||||||||||||||||||||
| 84 | Usage : @proms = $transcript->promoters(); | ||||||||||||||||||||||||||||
| 85 | Function: Get the promoter features of this transcript. | ||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | Note that OO-modeling of regulatory elements is not stable yet. | ||||||||||||||||||||||||||||
| 88 | This means that this method might change or even disappear in a | ||||||||||||||||||||||||||||
| 89 | future release. Be aware of this if you use it. | ||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | Returns : An array of Bio::SeqFeatureI implementing objects representing the | ||||||||||||||||||||||||||||
| 92 | promoter regions or sites. | ||||||||||||||||||||||||||||
| 93 | Args : | ||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||
| 95 | =cut | ||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | 0 | ▶ | sub promoters { | ||||||||||||||||||||||||||
|
Subroutine
promoters: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 98 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 99 | 0 | $self->throw_not_implemented(); | |||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | =head2 exons | ||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||
| 104 | Title : exons() | ||||||||||||||||||||||||||||
| 105 | Usage : @exons = $transcript->exons(); | ||||||||||||||||||||||||||||
| 106 | @inital = $transcript->exons('Initial'); | ||||||||||||||||||||||||||||
| 107 | Function: Get the individual exons this transcript comprises of, or all exons | ||||||||||||||||||||||||||||
| 108 | of a specified type. | ||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | Refer to the documentation of the class that produced this | ||||||||||||||||||||||||||||
| 111 | transcript object for information about the possible types. | ||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||
| 113 | See Bio::SeqFeature::Gene::ExonI for properties of the | ||||||||||||||||||||||||||||
| 114 | returned objects. | ||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||
| 116 | Returns : An array of Bio::SeqFeature::Gene::ExonI implementing objects | ||||||||||||||||||||||||||||
| 117 | Args : An optional string specifying the type of the exon. | ||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||
| 119 | =cut | ||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||
| 121 | 0 | ▶ | sub exons { | ||||||||||||||||||||||||||
|
Subroutine
exons: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 122 | 0 | my ($self, $type) = @_; | |||||||||||||||||||||||||||
| 123 | 0 | $self->throw_not_implemented(); | |||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||
| 126 | =head2 introns | ||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||
| 128 | Title : introns() | ||||||||||||||||||||||||||||
| 129 | Usage : @introns = $transcript->introns(); | ||||||||||||||||||||||||||||
| 130 | Function: Get all introns this transcript comprises of. | ||||||||||||||||||||||||||||
| 131 | Returns : An array of Bio::SeqFeatureI implementing objects representing the | ||||||||||||||||||||||||||||
| 132 | introns. | ||||||||||||||||||||||||||||
| 133 | Args : | ||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||
| 136 | =cut | ||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||
| 138 | 0 | ▶ | sub introns { | ||||||||||||||||||||||||||
|
Subroutine
introns: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 139 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 140 | 0 | $self->throw_not_implemented(); | |||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||
| 143 | =head2 poly_A_site | ||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||
| 145 | Title : poly_A_site() | ||||||||||||||||||||||||||||
| 146 | Usage : $polyAsite = $transcript->poly_A_site(); | ||||||||||||||||||||||||||||
| 147 | Function: Get the poly-adenylation site of this transcript. | ||||||||||||||||||||||||||||
| 148 | Returns : A Bio::SeqFeatureI implementing object. | ||||||||||||||||||||||||||||
| 149 | Args : | ||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||
| 152 | =cut | ||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||
| 154 | 0 | ▶ | sub poly_A_site { | ||||||||||||||||||||||||||
|
Subroutine
poly_A_site: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 155 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 156 | 0 | $self->throw_not_implemented(); | |||||||||||||||||||||||||||
| 157 | } | ||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||
| 159 | =head2 utrs | ||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||
| 161 | Title : utrs() | ||||||||||||||||||||||||||||
| 162 | Usage : @utr_sites = $transcript->utrs(); | ||||||||||||||||||||||||||||
| 163 | Function: Get the UTR regions this transcript comprises of. | ||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||
| 165 | See Bio::SeqFeature::Gene::ExonI for properties of the | ||||||||||||||||||||||||||||
| 166 | returned objects. | ||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||
| 168 | Returns : An array of Bio::SeqFeature::Gene::ExonI implementing objects | ||||||||||||||||||||||||||||
| 169 | Args : | ||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||
| 172 | =cut | ||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||
| 174 | 0 | ▶ | sub utrs { | ||||||||||||||||||||||||||
|
Subroutine
utrs: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 175 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 176 | 0 | $self->throw_not_implemented(); | |||||||||||||||||||||||||||
| 177 | } | ||||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||
| 179 | =head2 mrna | ||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||
| 181 | Title : mrna() | ||||||||||||||||||||||||||||
| 182 | Usage : $mrna = $transcript->mrna(); | ||||||||||||||||||||||||||||
| 183 | Function: Get the mRNA of the transcript as a sequence object. | ||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||
| 185 | Returns : A Bio::PrimarySeqI implementing object. | ||||||||||||||||||||||||||||
| 186 | Args : | ||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||
| 189 | =cut | ||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||
| 191 | 0 | ▶ | sub mrna { | ||||||||||||||||||||||||||
|
Subroutine
mrna: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 192 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 193 | 0 | $self->throw_not_implemented(); | |||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||
| 196 | =head2 cds | ||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||
| 198 | Title : cds() | ||||||||||||||||||||||||||||
| 199 | Usage : $cds = $transcript->cds(); | ||||||||||||||||||||||||||||
| 200 | Function: Get the CDS (coding sequence) of the transcript as a sequence | ||||||||||||||||||||||||||||
| 201 | object. | ||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||
| 203 | Returns : A Bio::PrimarySeqI implementing object. | ||||||||||||||||||||||||||||
| 204 | Args : | ||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||
| 207 | =cut | ||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||
| 209 | 0 | ▶ | sub cds { | ||||||||||||||||||||||||||
|
Subroutine
cds: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 210 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 211 | 0 | $self->throw_not_implemented(); | |||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||
| 214 | =head2 protein | ||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||
| 216 | Title : protein() | ||||||||||||||||||||||||||||
| 217 | Usage : $protein = $transcript->protein(); | ||||||||||||||||||||||||||||
| 218 | Function: Get the protein encoded by the transcript as a sequence object. | ||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||
| 220 | Returns : A Bio::PrimarySeqI implementing object. | ||||||||||||||||||||||||||||
| 221 | Args : | ||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||
| 224 | =cut | ||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||
| 226 | 0 | ▶ | sub protein { | ||||||||||||||||||||||||||
|
Subroutine
protein: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 227 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||
| 228 | 0 | $self->throw_not_implemented(); | |||||||||||||||||||||||||||
| 229 | } | ||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||
| 231 | =head2 parent | ||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||
| 233 | Title : parent | ||||||||||||||||||||||||||||
| 234 | Usage : $obj->parent($newval) | ||||||||||||||||||||||||||||
| 235 | Function: get the parent gene of the transcript | ||||||||||||||||||||||||||||
| 236 | Returns : value of parent - a Bio::SeqFeature::Gene::GeneStructureI-compliant object | ||||||||||||||||||||||||||||
| 237 | Args : a Bio::SeqFeature::Gene::GeneStructureI-compliant object (optional) | ||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||
| 240 | =cut | ||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||
| 242 | 655 | ▶ | sub parent{ | ||||||||||||||||||||||||||
|
Subroutine
parent: called CC=4 SCAR=14.8
Pod
documented
| |||||||||||||||||||||||||||||
| 243 | 655 | my $self = shift; | |||||||||||||||||||||||||||
| 244 | 655 | ▶ | if( @_ ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 245 | 110 | my $value = shift; | |||||||||||||||||||||||||||
| 246 | # I really mean ! defined $value - | ||||||||||||||||||||||||||||
| 247 | # we will allow re-setting the parent to undef | ||||||||||||||||||||||||||||
| 248 | 110 | ▶ | if (! defined $value || | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not defined $value or $value->isa("Bio::SeqFeature::Gene::GeneStructureI")
MC/DC0%0/2
not defined $value or $value->isa("Bio::SeqFeature::Gene::GeneStructureI")
not defined $value
$value->isa("Bio::SeqFeature::Gene::GeneStructureI")
Truth table33%1/3
not(A) or B
A= not defined $valueB= $value->isa("Bio::SeqFeature::Gene::GeneStructureI")
| |||||||||||||||||||||||||||||
| 249 | $value->isa("Bio::SeqFeature::Gene::GeneStructureI")) { | ||||||||||||||||||||||||||||
| 250 | 110 | $self->{'_parent'} = $value; | |||||||||||||||||||||||||||
| 251 | } else { | ||||||||||||||||||||||||||||
| 252 | 0 | $self->throw("$value must be a Bio::SeqFeature::Gene::GeneStructureI") | |||||||||||||||||||||||||||
| 253 | } | ||||||||||||||||||||||||||||
| 254 | } | ||||||||||||||||||||||||||||
| 255 | 655 | return $self->{'_parent'}; | |||||||||||||||||||||||||||
| 256 | } | ||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||
| 259 | 25 | 1; | |||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||