comparison variant_effect_predictor/Bio/EnsEMBL/IdMapping/TinyTranslation.pm @ 0:1f6dce3d34e0

Uploaded
author mahtabm
date Thu, 11 Apr 2013 02:01:53 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1f6dce3d34e0
1 =head1 LICENSE
2
3 Copyright (c) 1999-2012 The European Bioinformatics Institute and
4 Genome Research Limited. All rights reserved.
5
6 This software is distributed under a modified Apache license.
7 For license details, please see
8
9 http://www.ensembl.org/info/about/code_licence.html
10
11 =head1 CONTACT
12
13 Please email comments or questions to the public Ensembl
14 developers list at <dev@ensembl.org>.
15
16 Questions may also be sent to the Ensembl help desk at
17 <helpdesk@ensembl.org>.
18
19 =cut
20
21 =head1 NAME
22
23 Bio::EnsEMBL::IdMapping::TinyTranslation - lightweight translation object
24
25 =head1 SYNOPSIS
26
27 if ( my $tl = $tr->translation ) {
28 my $lightweight_tl =
29 Bio::EnsEMBL::IdMapping::TinyTranslation->new_fast( [
30 $tl->dbID, $tl->stable_id,
31 $tl->version, $tl->created_date,
32 $tl->modified_date, $tr->dbID,
33 $tr->translate->seq, ( $tr->is_known ? 1 : 0 ),
34 ] );
35 }
36
37 =head1 DESCRIPTION
38
39 This is a lightweight translation object for the stable Id mapping. See
40 the documentation in TinyFeature for general considerations about its
41 design.
42
43 =head1 METHODS
44
45 transcript_id
46 seq
47 is_known
48
49 =cut
50
51 package Bio::EnsEMBL::IdMapping::TinyTranslation;
52
53 # internal data structure (array indices):
54 #
55 # 0-4 see TinyFeature
56 # 5 transcript_id
57 # 6 seq
58 # 7 is_known
59
60
61 use strict;
62 use warnings;
63 no warnings 'uninitialized';
64
65 use Bio::EnsEMBL::IdMapping::TinyFeature;
66 our @ISA = qw(Bio::EnsEMBL::IdMapping::TinyFeature);
67
68 use Bio::EnsEMBL::Utils::Exception qw(throw warning);
69
70
71 =head2 transcript_id
72
73 Arg[1] : (optional) Int - the transcript internal Id ("dbID")
74 Description : Getter/setter for the transcript internal Id this translation is
75 attached to.
76 Return type : Int
77 Exceptions : none
78 Caller : general
79 Status : At Risk
80 : under development
81
82 =cut
83
84 sub transcript_id {
85 my $self = shift;
86 $self->[5] = shift if (@_);
87 return $self->[5];
88 }
89
90
91 =head2 seq
92
93 Arg[1] : (optional) String - the translation's sequence
94 Description : Getter/setter for the translation's sequence.
95 Return type : String
96 Exceptions : none
97 Caller : general
98 Status : At Risk
99 : under development
100
101 =cut
102
103 sub seq {
104 my $self = shift;
105 $self->[6] = shift if (@_);
106 return $self->[6];
107 }
108
109
110 =head2 is_known
111
112 Arg[1] : (optional) Boolean - the translation's "known" status
113 Description : Getter/setter for the translation's "known" status.
114 Return type : Boolean
115 Exceptions : none
116 Caller : general
117 Status : At Risk
118 : under development
119
120 =cut
121
122 sub is_known {
123 my $self = shift;
124 $self->[7] = shift if (@_);
125 return $self->[7];
126 }
127
128
129 1;
130