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
46 It represents an Ensembl
transcript that has a matching RefSeq equivalent
54 package Bio::EnsEMBL::MANE;
60 use Scalar::Util qw(weaken isweak);
64 use constant SEQUENCE_ONTOLOGY => {
71 Arg [...] : Named arguments passed to superclass
77 Caller : general, subclass constructors
85 #allow this to be called as class or object method
86 my $class = ref($caller) || $caller;
87 my $self = $class->SUPER::new(@_);
89 my ($transcript, $stable_id, $seq_region_start, $seq_region_end) = rearrange([
'TRANSCRIPT',
'STABLE_ID',
'SEQ_REGION_START',
'SEQ_REGION_END'],@_);
91 $self->{
'transcript'} = $transcript;
92 $self->{
'stable_id'} = $stable_id;
93 $self->{
'seq_region_start'} = $seq_region_start;
94 $self->{
'seq_region_end'} = $seq_region_end;
100 Example : $transcript = $mane->transcript();
101 Description: Getter/Setter
for the
transcript object
111 $self->{
'transcript'} = shift
if(@_);
112 return $self->{
'transcript'};
116 Arg [1] : (optional)
string $stable_id
117 Example : $stable_id = $mane->stable_id();
118 Description: Getter/Setter
for the stable_id
for
129 $self->{
'stable_id'} = shift
if(@_);
130 return $self->{
'stable_id'};
136 Arg [1] : Fetch the RefSeq
accession associated with
138 Example : $refseq = $mane->refseq();
139 Description: Getter/Setter
for the RefSeq associated with
this
150 my $transcript = $self->transcript;
151 my @attributes = @{ $transcript->get_all_Attributes() };
152 foreach my $attribute (@attributes) {
153 if ($attribute->code =~ /MANE/) {
154 return $attribute->value;
161 Arg [1] : (optional)
string mane
class
162 Example : $mane = $mane->type();
163 Description: Getter/Setter
for the
class of MANE
174 my $transcript = $self->transcript;
175 my @attributes = @{ $transcript->get_all_Attributes() };
176 foreach my $attribute (@attributes) {
177 if ($attribute->code =~ /MANE/) {
178 return $attribute->code;
185 my $id = $self->stable_id;
190 =head2 summary_as_hash
192 Example : my $hash = $mane->summary_as_hash();
193 Description: Generates a HashRef compatible with GFFSerializer. Adds
194 Gene, RefSeq
accession and MANE
class to the basic feature hash
202 sub summary_as_hash {
204 my $summary_ref = $self->SUPER::summary_as_hash;
205 $summary_ref->{
'refseq_match'} = $self->refseq();
206 $summary_ref->{
'type'} = $self->type();
207 $summary_ref->{
'id'} = $self->stable_id();
208 my $parent = $self->transcript->get_Gene();
209 $summary_ref->{
'Parent'} = $parent->display_id
if defined $parent;
210 $summary_ref->{
'strand'} = $self->transcript->strand();
211 $summary_ref->{
'version'} = $self->transcript->version()
if $self->transcript->version();