3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
23 Please email comments or questions to the
public Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
37 # fetch a transcript from the db and create a lightweight
38 # transcript object from it
39 my $tr = $transcript_adaptor->fetch_by_stable_id(
'ENST000345437');
42 $tr->dbID, $tr->stable_id,
43 $tr->version, $tr->created_date,
44 $tr->modified_date, $tr->start,
45 $tr->end, $tr->strand,
46 $tr->length, md5_hex( $tr->spliced_seq ),
51 This is a lightweight
transcript object for the stable Id mapping. See
69 package Bio::EnsEMBL::IdMapping::TinyTranscript;
71 # internal data structure (array indices):
87 no warnings
'uninitialized';
97 Arg[1] : (optional) Int - the
transcript's start coordinate
98 Description : Getter/setter for the transcript's start coordinate.
109 $self->[5] = shift if (@_);
116 Arg[1] : (optional) Int - the
transcript's end coordinate
117 Description : Getter/setter for the transcript's end coordinate.
128 $self->[6] = shift if (@_);
135 Arg[1] : (optional) Int - the
transcript's strand
136 Description : Getter/setter for the transcript's strand.
147 $self->[7] = shift if (@_);
154 Arg[1] : (optional) Int - the
transcript's length
155 Description : Getter/setter for the transcript's length. Note that
this is
156 *not* the distance between start and end, but rather the sum of
157 the lengths of all exons.
168 $self->[8] = shift if (@_);
175 Arg[1] : (optional) String - the md5 digest of the
transcript's sequence
176 Description : Getter/setter for the md5 digest of the transcript's sequence.
177 Note that when used as a setter, you are expected to pass a
178 digest, not the raw sequence (i.e. the digest is not created
for
190 $self->[9] = shift
if (@_);
196 =head2 add_Translation
200 Example : $tiny_transcript->add_Translation($tiny_translation);
201 Description : Adds a translation to
this transcript.
203 Exceptions : thrown on wrong or missing argument
210 sub add_Translation {
214 unless ($tl && $tl->isa(
'Bio::EnsEMBL::IdMapping::TinyTranslation')) {
215 throw(
'Need a Bio::EnsEMBL::IdMapping::TinyTranslation.');
224 Description : Getter
for the
transcript's translation.
225 Return type : Bio::EnsEMBL::IdMapping::TinyTranslation
240 Arg[1] : Bio::EnsEMBL::IdMapping::TinyExon $exon - the exon to add
241 Example : $tiny_transcript->add_Exon($tiny_exon);
242 Description : Adds an exon to this transcript.
244 Exceptions : thrown on wrong or missing argument
259 push @{ $self->[11] }, $exon;
265 Example : foreach my $exon (@{ $tiny_transcript->get_all_Exons }) {
266 # do something with exon
268 Description : Returns all exons attached to that transcript.
269 Return type : Arrayref of Bio::EnsEMBL::IdMapping::TinyExon objects
278 return $_[0]->[11] || [];
283 Arg[1] : (optional) String - the gene's biotype
284 Description : Getter/setter
for the gene
's biotype.
295 $self->[12] = shift if (@_);
299 =head2 seq_region_name
301 Arg[1] : (optional) String - seq_region name
302 Description : Getter/setter for the seq_region name of the slice the gene is
312 sub seq_region_name {
314 $self->[13] = shift if (@_);