changes all issue tracking in preparation for switch to github issues
[bioperl-live.git] / Bio / SeqFeature / Gene / TranscriptI.pm
blob2fbfd1b8f71715372ba475b0cc59e27e45ae780b
2 # BioPerl module for Bio::SeqFeature::Gene::TranscriptI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Hilmar Lapp <hlapp@gmx.net>
8 # Copyright Hilmar Lapp
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
14 =head1 NAME
16 Bio::SeqFeature::Gene::TranscriptI - Interface for a feature representing a
17 transcript of exons, promoter(s), UTR, and a poly-adenylation site.
19 =head1 SYNOPSIS
21 #documentation needed
23 =head1 DESCRIPTION
25 A feature representing a transcript.
27 =head1 FEEDBACK
29 =head2 Mailing Lists
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.
36 bioperl-l@bioperl.org - General discussion
37 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
39 =head2 Support
41 Please direct usage questions or support issues to the mailing list:
43 I<bioperl-l@bioperl.org>
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.
50 =head2 Reporting Bugs
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:
56 https://github.com/bioperl/bioperl-live/issues
58 =head1 AUTHOR - Hilmar Lapp
60 Email hlapp@gmx.net
62 =head1 APPENDIX
64 The rest of the documentation details each of the object methods.
65 Internal methods are usually preceded with a _
67 =cut
70 # Let the code begin...
73 package Bio::SeqFeature::Gene::TranscriptI;
74 use strict;
76 use Carp;
78 use base qw(Bio::SeqFeatureI);
80 =head2 promoters
82 Title : promoters()
83 Usage : @proms = $transcript->promoters();
84 Function: Get the promoter features of this transcript.
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.
90 Returns : An array of Bio::SeqFeatureI implementing objects representing the
91 promoter regions or sites.
92 Args :
94 =cut
96 sub promoters {
97 my ($self) = @_;
98 $self->throw_not_implemented();
101 =head2 exons
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.
109 Refer to the documentation of the class that produced this
110 transcript object for information about the possible types.
112 See Bio::SeqFeature::Gene::ExonI for properties of the
113 returned objects.
115 Returns : An array of Bio::SeqFeature::Gene::ExonI implementing objects
116 Args : An optional string specifying the type of the exon.
118 =cut
120 sub exons {
121 my ($self, $type) = @_;
122 $self->throw_not_implemented();
125 =head2 introns
127 Title : introns()
128 Usage : @introns = $transcript->introns();
129 Function: Get all introns this transcript comprises of.
130 Returns : An array of Bio::SeqFeatureI implementing objects representing the
131 introns.
132 Args :
135 =cut
137 sub introns {
138 my ($self) = @_;
139 $self->throw_not_implemented();
142 =head2 poly_A_site
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 Bio::SeqFeatureI implementing object.
148 Args :
151 =cut
153 sub poly_A_site {
154 my ($self) = @_;
155 $self->throw_not_implemented();
158 =head2 utrs
160 Title : utrs()
161 Usage : @utr_sites = $transcript->utrs();
162 Function: Get the UTR regions this transcript comprises of.
164 See Bio::SeqFeature::Gene::ExonI for properties of the
165 returned objects.
167 Returns : An array of Bio::SeqFeature::Gene::ExonI implementing objects
168 Args :
171 =cut
173 sub utrs {
174 my ($self) = @_;
175 $self->throw_not_implemented();
178 =head2 mrna
180 Title : mrna()
181 Usage : $mrna = $transcript->mrna();
182 Function: Get the mRNA of the transcript as a sequence object.
184 Returns : A Bio::PrimarySeqI implementing object.
185 Args :
188 =cut
190 sub mrna {
191 my ($self) = @_;
192 $self->throw_not_implemented();
195 =head2 cds
197 Title : cds()
198 Usage : $cds = $transcript->cds();
199 Function: Get the CDS (coding sequence) of the transcript as a sequence
200 object.
202 Returns : A Bio::PrimarySeqI implementing object.
203 Args :
206 =cut
208 sub cds {
209 my ($self) = @_;
210 $self->throw_not_implemented();
213 =head2 protein
215 Title : protein()
216 Usage : $protein = $transcript->protein();
217 Function: Get the protein encoded by the transcript as a sequence object.
219 Returns : A Bio::PrimarySeqI implementing object.
220 Args :
223 =cut
225 sub protein {
226 my ($self) = @_;
227 $self->throw_not_implemented();
230 =head2 parent
232 Title : parent
233 Usage : $obj->parent($newval)
234 Function: get the parent gene of the transcript
235 Returns : value of parent - a Bio::SeqFeature::Gene::GeneStructureI-compliant object
236 Args : a Bio::SeqFeature::Gene::GeneStructureI-compliant object (optional)
239 =cut
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("Bio::SeqFeature::Gene::GeneStructureI")) {
249 $self->{'_parent'} = $value;
250 } else {
251 $self->throw("$value must be a Bio::SeqFeature::Gene::GeneStructureI")
254 return $self->{'_parent'};