FAST/Bio/SeqFeature/Gene/TranscriptI.pm untested

filter: Statementstmt 0.0% 0 / 32 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 9 totaltotal 0.0% 0 / 60 SCAR 24.8
CC
3
Cov
0%
parent
12.0
promoters
2.0
exons
2.0
CRAP 12.0
1 #
2 # BioPerl module for FAST::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 FAST::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://redmine.open-bio.org/projects/bioperl/
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 FAST::Bio::SeqFeature::Gene::TranscriptI;
74 use strict;
75  
76 use Carp;
77  
78 use base qw(FAST::Bio::SeqFeatureI);
79  
80 =head2 promoters
81  
82 Title : promoters()
83 Usage : @proms = $transcript->promoters();
84 Function: Get the promoter features of this transcript.
85  
86 Note that OO-modeling of regulatory elements is not stable yet.
87 This means that this method might change or even disappear in a
88 future release. Be aware of this if you use it.
89  
90 Returns : An array of FAST::Bio::SeqFeatureI implementing objects representing the
91 promoter regions or sites.
92 Args :
93  
94 =cut
95  
96 sub promoters {
97 my ($self) = @_;
98 $self->throw_not_implemented();
99 }
100  
101 =head2 exons
102  
103 Title : exons()
104 Usage : @exons = $transcript->exons();
105 @inital = $transcript->exons('Initial');
106 Function: Get the individual exons this transcript comprises of, or all exons
107 of a specified type.
108  
109 Refer to the documentation of the class that produced this
110 transcript object for information about the possible types.
111  
112 See FAST::Bio::SeqFeature::Gene::ExonI for properties of the
113 returned objects.
114  
115 Returns : An array of FAST::Bio::SeqFeature::Gene::ExonI implementing objects
116 Args : An optional string specifying the type of the exon.
117  
118 =cut
119  
120 sub exons {
121 my ($self, $type) = @_;
122 $self->throw_not_implemented();
123 }
124  
125 =head2 introns
126  
127 Title : introns()
128 Usage : @introns = $transcript->introns();
129 Function: Get all introns this transcript comprises of.
130 Returns : An array of FAST::Bio::SeqFeatureI implementing objects representing the
131 introns.
132 Args :
133  
134  
135 =cut
136  
137 sub introns {
138 my ($self) = @_;
139 $self->throw_not_implemented();
140 }
141  
142 =head2 poly_A_site
143  
144 Title : poly_A_site()
145 Usage : $polyAsite = $transcript->poly_A_site();
146 Function: Get the poly-adenylation site of this transcript.
147 Returns : A FAST::Bio::SeqFeatureI implementing object.
148 Args :
149  
150  
151 =cut
152  
153 sub poly_A_site {
154 my ($self) = @_;
155 $self->throw_not_implemented();
156 }
157  
158 =head2 utrs
159  
160 Title : utrs()
161 Usage : @utr_sites = $transcript->utrs();
162 Function: Get the UTR regions this transcript comprises of.
163  
164 See FAST::Bio::SeqFeature::Gene::ExonI for properties of the
165 returned objects.
166  
167 Returns : An array of FAST::Bio::SeqFeature::Gene::ExonI implementing objects
168 Args :
169  
170  
171 =cut
172  
173 sub utrs {
174 my ($self) = @_;
175 $self->throw_not_implemented();
176 }
177  
178 =head2 mrna
179  
180 Title : mrna()
181 Usage : $mrna = $transcript->mrna();
182 Function: Get the mRNA of the transcript as a sequence object.
183  
184 Returns : A FAST::Bio::PrimarySeqI implementing object.
185 Args :
186  
187  
188 =cut
189  
190 sub mrna {
191 my ($self) = @_;
192 $self->throw_not_implemented();
193 }
194  
195 =head2 cds
196  
197 Title : cds()
198 Usage : $cds = $transcript->cds();
199 Function: Get the CDS (coding sequence) of the transcript as a sequence
200 object.
201  
202 Returns : A FAST::Bio::PrimarySeqI implementing object.
203 Args :
204  
205  
206 =cut
207  
208 sub cds {
209 my ($self) = @_;
210 $self->throw_not_implemented();
211 }
212  
213 =head2 protein
214  
215 Title : protein()
216 Usage : $protein = $transcript->protein();
217 Function: Get the protein encoded by the transcript as a sequence object.
218  
219 Returns : A FAST::Bio::PrimarySeqI implementing object.
220 Args :
221  
222  
223 =cut
224  
225 sub protein {
226 my ($self) = @_;
227 $self->throw_not_implemented();
228 }
229  
230 =head2 parent
231  
232 Title : parent
233 Usage : $obj->parent($newval)
234 Function: get the parent gene of the transcript
235 Returns : value of parent - a FAST::Bio::SeqFeature::Gene::GeneStructureI-compliant object
236 Args : a FAST::Bio::SeqFeature::Gene::GeneStructureI-compliant object (optional)
237  
238  
239 =cut
240  
241 sub parent{
242 my $self = shift;
243 if( @_ ) {
244 my $value = shift;
245 # I really mean ! defined $value -
246 # we will allow re-setting the parent to undef
247 if (! defined $value ||
248 $value->isa("FAST::Bio::SeqFeature::Gene::GeneStructureI")) {
249 $self->{'_parent'} = $value;
250 } else {
251 $self->throw("$value must be a FAST::Bio::SeqFeature::Gene::GeneStructureI")
252 }
253 }
254 return $self->{'_parent'};
255 }
256  
257  
258 1;
259  
260  
261  
262  
263  
264