DBEntry.pm 15.6 KB
Newer Older
1
=head1 LICENSE
2

3
  Copyright (c) 1999-2013 The European Bioinformatics Institute and
4
  Genome Research Limited.  All rights reserved.
5

6
7
  This software is distributed under a modified Apache license.
  For license details, please see
8

9
    http://www.ensembl.org/info/about/code_licence.html
Patrick Meidl's avatar
Patrick Meidl committed
10

11
=head1 CONTACT
12

13
  Please email comments or questions to the public Ensembl
14
  developers list at <dev@ensembl.org>.
Graham McVicker's avatar
PODs    
Graham McVicker committed
15

16
17
  Questions may also be sent to the Ensembl help desk at
  <helpdesk@ensembl.org>.
18

19
=cut
20

21
=head1 NAME
22

23
24
Bio::EnsEMBL::DBEntry -
Object representing an external reference (xref)
25

26
=head1 DESCRIPTION
27

28
29
This object holds information about external references (xrefs) to
Ensembl objects.
David Barnwell's avatar
David Barnwell committed
30

31
=head1 METHODS
32

Patrick Meidl's avatar
Patrick Meidl committed
33
=cut
34

35
36
package Bio::EnsEMBL::DBEntry;

37
use strict;
Patrick Meidl's avatar
Patrick Meidl committed
38
use warnings;
Patrick Meidl's avatar
Patrick Meidl committed
39
no warnings qw(uninitialized);
40

Patrick Meidl's avatar
Patrick Meidl committed
41
42
43
44
45
use Bio::EnsEMBL::Storable;
use Bio::Annotation::DBLink;

use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(deprecate);
Monika Komorowska's avatar
Monika Komorowska committed
46
use Scalar::Util qw(weaken isweak);
47

Patrick Meidl's avatar
Patrick Meidl committed
48
our @ISA = qw(Bio::EnsEMBL::Storable Bio::Annotation::DBLink);
49

50

Graham McVicker's avatar
PODs    
Graham McVicker committed
51
52
=head2 new_fast

Patrick Meidl's avatar
Patrick Meidl committed
53
  Arg [1]    : Hashref $hashref - hash reference to bless as new DBEntry object
Graham McVicker's avatar
PODs    
Graham McVicker committed
54
55
56
57
58
  Description: A very quick constructor that requires internal knowledge of
               the class. This is used in speed critical sections of the code
               where many objects need to be created quickly.
  Returntype : Bio::EnsEMBL::DBEntry
  Exceptions : none
Patrick Meidl's avatar
Patrick Meidl committed
59
  Caller     : general
60
  Status     : Stable
Graham McVicker's avatar
PODs    
Graham McVicker committed
61
62
63

=cut

Graham McVicker's avatar
Graham McVicker committed
64
65
66
sub new_fast {
  my $class = shift;
  my $hashref = shift;
Monika Komorowska's avatar
Monika Komorowska committed
67
68
69
  my $self = bless $hashref, $class;
  weaken($self->{adaptor})  if ( ! isweak($self->{adaptor}) );
  return $self;
Graham McVicker's avatar
Graham McVicker committed
70
71
}

Graham McVicker's avatar
PODs    
Graham McVicker committed
72
73
74
75

=head2 new

  Args [...] : list of named parameters 
Patrick Meidl's avatar
Patrick Meidl committed
76
77
78
79
80
81
82
83
84
85
86
  Example    : my $dbentry = new Bio::EnsEMBL::DBEntry(
                    -adaptor => $adaptor,
                    -primary_id => $pid,
                    -version => $version,
                    -dbname  => $dbname,
                    -release => $release,
                    -display_id => $did,
                    -description => $description,
                    -priority => $priority,
                    -db_display_name => $db_display_name,
                    -info_type => $info_type,
Glenn Proctor's avatar
Glenn Proctor committed
87
                    -info_text => $info_text,
88
89
                    -type => $type,
                    -secondary_db_name => $secondary_db_name,
90
                    -secondary_db_table => $secondary_db_table
91
		    -linkage_annotation => $object_xref_text);
Graham McVicker's avatar
PODs    
Graham McVicker committed
92
93
94
95
  Description: Creates a new DBEntry object
  Returntype : Bio::EnsEMBL::DBEntry
  Exceptions : none
  Caller     : Bio::EnsEMBL::DBEntryAdaptor
96
  Status     : At Risk
97
               Due to 'PRIORITY',
98
99
              'INFO_TYPE', 'INFO_TEXT', ''DB_DISPLAY_NAME', 'TYPE',
              'SECONDARY_DB_NAME', 'SECONDARY_DB_TABLE'
Patrick Meidl's avatar
Patrick Meidl committed
100
101
               being under development - if you don't use any of these the
               method can be considered Stable
Graham McVicker's avatar
PODs    
Graham McVicker committed
102
103
104

=cut

105
106
sub new {
  my ($class, @args) = @_;
107
  
108
109
  my $self = bless {},$class;

Arne Stabenau's avatar
Arne Stabenau committed
110
  my ( $adaptor, $dbID, $primary_id, $version,
111
       $dbname, $release, $display_id, $description,
112
       $priority,
113
       $db_display_name, $info_type, $info_text, $type,
114
       $secondary_db_name, $secondary_db_table, $link_annotation, $analysis) =
115
    rearrange ( ['ADAPTOR','DBID','PRIMARY_ID','VERSION',
116
                 'DBNAME','RELEASE','DISPLAY_ID','DESCRIPTION',
117
		 'PRIORITY',
118
		 'DB_DISPLAY_NAME', 'INFO_TYPE', 'INFO_TEXT', 'TYPE',
119
                 'SECONDARY_DB_NAME', 'SECONDARY_DB_TABLE', 'LINKAGE_ANNOTATION', 'ANALYSIS'], @args );
120

Monika Komorowska's avatar
Monika Komorowska committed
121
  $self->adaptor($adaptor);
122
123
  $self->{'dbID'}    = $dbID;

124
  if( defined $primary_id ) { $self->primary_id( $primary_id ) }
Arne Stabenau's avatar
Arne Stabenau committed
125
  if( defined $version ) { $self->version( $version ) } else
126
    { $self->version( 0 ); }
127
128
  if( defined $dbname ) { $self->dbname( $dbname ) }
  if( defined $release) { $self->release( $release ) }
129
  if( defined $display_id) { $self->display_id( $display_id ) }
130
  if( defined $description) { $self->description($description) }
131
  if( defined $priority) { $self->priority($priority) }
Glenn Proctor's avatar
Glenn Proctor committed
132
  if( defined $db_display_name) { $self->db_display_name($db_display_name) }
133
134
  if( defined $info_type) { $self->info_type($info_type) }
  if( defined $info_text) { $self->info_text($info_text) }
Glenn Proctor's avatar
Glenn Proctor committed
135
  if( defined $type) { $self->type($type) }
136
137
  if( defined $secondary_db_name) { $self->secondary_db_name($secondary_db_name) }
  if( defined $secondary_db_table) { $self->secondary_db_table($secondary_db_table) }
138

139
  $self->linkage_annotation($link_annotation) if defined $link_annotation;
140
  $self->analysis($analysis) if defined $analysis;
141

142
143
144
145
146

  return $self;
}


Arne Stabenau's avatar
Arne Stabenau committed
147
148
=head2 primary_id

Patrick Meidl's avatar
Patrick Meidl committed
149
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
150
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
151
152
153
  Description: Getter/setter for attribute 'primary_id'.
               This is the object's primary id in the external database.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
154
155
  Exceptions : none
  Caller     : general
156
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
157
158
159

=cut

160
161
162
sub primary_id {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
163
    $self->{primary_id} = $arg;
164
  } 
165
  return $self->{primary_id};
166
167
}

168

Arne Stabenau's avatar
Arne Stabenau committed
169
=head2 display_id
170

Patrick Meidl's avatar
Patrick Meidl committed
171
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
172
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
173
174
175
176
  Description: Getter/setter for attribute 'display_id'.
               The object's preferred display name. This can be the same
               as primary_id or ensembl-specific.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
177
178
  Exceptions : none
  Caller     : general
179
  Status     : Stable
180
181
182
183
184
185

=cut

sub display_id{
   my ( $self, $arg ) = @_;
   if( defined $arg ) {
186
       $self->{display_id} = $arg;
187
   } 
188
   return $self->{display_id};
189
190
191
}


Patrick Meidl's avatar
Patrick Meidl committed
192
=head2 optional_id
Graham McVicker's avatar
PODs    
Graham McVicker committed
193

Patrick Meidl's avatar
Patrick Meidl committed
194
  Args       : none
Arne Stabenau's avatar
Arne Stabenau committed
195
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
196
197
198
199
200
  Description: Additional getter for attribute 'display_id'.
               The object's preferred display name.
               Only include for BioPerl interface compliance, please use
               $self->display_id().
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
201
202
  Exceptions : none
  Caller     : general
203
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
204
205
206

=cut

Patrick Meidl's avatar
Patrick Meidl committed
207
208
209
sub optional_id {
  my $self = shift;
  return $self->display_id;
210
211
212
}


Patrick Meidl's avatar
Patrick Meidl committed
213
=head2 dbname
Graham McVicker's avatar
PODs    
Graham McVicker committed
214

Patrick Meidl's avatar
Patrick Meidl committed
215
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
216
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
217
218
219
  Description: Getter/setter for attribute 'dbname'.
               The name of the external database.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
220
221
  Exceptions : none
  Caller     : general
222
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
223
224
225

=cut

Patrick Meidl's avatar
Patrick Meidl committed
226
227
228
229
230
231
sub dbname {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{dbname} = $arg;
  } 
  return $self->{dbname};
232
233
}

Arne Stabenau's avatar
Arne Stabenau committed
234

Patrick Meidl's avatar
Patrick Meidl committed
235
=head2 database
Arne Stabenau's avatar
Arne Stabenau committed
236
237
238

  Args       : none
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
239
240
241
242
243
  Description: Additional getter for attribute 'dbname'.
               The name of the external database.
               Only include for BioPerl interface compliance, please use
               $self->dbname().
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
244
245
  Exceptions : none
  Caller     : general
246
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
247
248
249

=cut

Patrick Meidl's avatar
Patrick Meidl committed
250
sub database {
251
  my $self = shift;
Patrick Meidl's avatar
Patrick Meidl committed
252
  return $self->dbname();
253
254
255
}


Arne Stabenau's avatar
Arne Stabenau committed
256
257
=head2 release

Patrick Meidl's avatar
Patrick Meidl committed
258
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
259
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
260
261
262
  Description: Getter/setter for attribute 'release'.
               The external database release name.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
263
264
  Exceptions : none
  Caller     : general
265
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
266
267
268

=cut

269
270
271
sub release {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
272
    $self->{release} = $arg;
273
  } 
274
  return $self->{release};
275
276
277
}


Arne Stabenau's avatar
Arne Stabenau committed
278
279
=head2 version

Patrick Meidl's avatar
Patrick Meidl committed
280
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
281
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
282
283
284
  Description: Getter/setter for attribute 'version'.
               The object's version in the external database.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
285
286
  Exceptions : none
  Caller     : general
287
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
288
289
290

=cut

291
292
293
sub version {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
294
    $self->{version} = $arg;
295
  } 
296
  return $self->{version};
297
298
299
}


Arne Stabenau's avatar
Arne Stabenau committed
300
301
=head2 description

Patrick Meidl's avatar
Patrick Meidl committed
302
  Arg [1]    : (optional) String $arg - value to set
Arne Stabenau's avatar
Arne Stabenau committed
303
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
304
  Description: Getter/setter for attribute 'description'.
305
               The object's description, from the xref table
Patrick Meidl's avatar
Patrick Meidl committed
306
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
307
308
  Exceptions : none
  Caller     : general
309
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
310
311
312

=cut

313
314
sub description {
  my ( $self, $arg ) = @_;
315
316
317

  if ( defined($arg) ) { $self->{'description'} = $arg }

318
  return $self->{description};
319
320
}

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
=head2 analysis

  Arg [1]    : Bio::EnsEMBL::Analysis $analysis
  Example    : none
  Description: get/set for attribute analysis
  Returntype : Bio::EnsEMBL::Analysis
  Exceptions : none
  Caller     : general
  Status     : Stable

=cut

sub analysis {
   my $self = shift;
  $self->{analysis} = shift if( @_ );
  return $self->{analysis};
}
338

Patrick Meidl's avatar
Patrick Meidl committed
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
=head2 comment

  Args       : none
  Example    : none
  Description: Additional getter for attribute 'description'.
               The object's description.
               Only include for BioPerl interface compliance, please use
               $self->description().
  Returntype : String
  Exceptions : none
  Caller     : general
  Status     : Stable

=cut

sub comment {
  my $self = shift;
  return $self->description();
}


360
361
362
363
=head2 priority

  Arg [1]    : int $priority
  Example    : none
364
  Priority   : Getter/setter for attribute 'priority'. Note this
Glenn Proctor's avatar
Glenn Proctor committed
365
               is the priority from the external_db table.
Patrick Meidl's avatar
Patrick Meidl committed
366
  Returntype : String
367
368
  Exceptions : none
  Caller     : general
369
370
  Status     : At Risk
             : due to it being under development
371
372
373
374
375
376
377
378
379
380
381

=cut

sub priority {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{priority} = $arg;
  } 
  return $self->{priority};
}

Glenn Proctor's avatar
Glenn Proctor committed
382
383
384
385
386

=head2 db_display_name

  Arg [1]    : String $db_display_name
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
387
388
389
390
  Description: Getter/setter for attribute 'db_display_name'.
               The preferred display name for the external database. Has
               "Projected " prepended if info_type='PROJECTION'.
  Returntype : String
Glenn Proctor's avatar
Glenn Proctor committed
391
392
393
394
395
396
397
398
399
  Exceptions : none
  Caller     : general

=cut

sub db_display_name {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{db_display_name} = $arg;
400
401
402
  }

  my $name;
403
  if ($self->{info_type} && $self->{info_type} eq "PROJECTION") {
404
405
406
407
408
409
410
411
412
413
414
415
416
    $name = "Projected " . $self->{db_display_name};
  } else {
    $name =  $self->{db_display_name};
  }

  return $name;
}


=head2 info_type

  Arg [1]    : String $info_type
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
417
418
  Description: Getter/setter for attribute 'info_type'.
  Returntype : String
419
420
421
422
423
424
425
426
427
  Exceptions : none
  Caller     : general

=cut

sub info_type {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{info_type} = $arg;
428
  }
429
  return $self->{info_type};
Glenn Proctor's avatar
Glenn Proctor committed
430
 }
431
432
433
434
435
436


=head2 info_text

  Arg [1]    : String $info_text
  Example    : none
Patrick Meidl's avatar
Patrick Meidl committed
437
438
  Description: Getter/setter for attribute 'info_text'.
  Returntype : String
439
440
441
442
443
444
445
446
447
  Exceptions : none
  Caller     : general

=cut

sub info_text {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{info_text} = $arg;
Glenn Proctor's avatar
Glenn Proctor committed
448
  } 
449
  return $self->{info_text};
Glenn Proctor's avatar
Glenn Proctor committed
450
451
}

452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
=head2 linkage_annotation

  Arg [1]    : String $object_xref_text
  Example    : none
  Description: Getter/setter for attribute 'linkage_annotation'.
  Returntype : String
  Exceptions : none
  Caller     : general

=cut

sub linkage_annotation {
  my ( $self, $arg ) = @_;

  $self->{linkage_annotation} = $arg if defined $arg;
  
  return $self->{linkage_annotation};
}


Glenn Proctor's avatar
Glenn Proctor committed
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
=head2 type

  Arg [1]    : String $type
  Example    : none
  Description: Getter/setter for attribute 'type'.
  Returntype : String
  Exceptions : none
  Caller     : general

=cut

sub type {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{type} = $arg;
  }
  return $self->{type};
}

491
492
493
494
=head2 secondary_db_name

  Arg [1]    : String $secondary_db_name
  Description: Getter/setter for attribute 'secondary_db_name'.
Kieron Taylor's avatar
Kieron Taylor committed
495
  Returntype : String
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
  Exceptions : none
  Caller     : general

=cut

sub secondary_db_name {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{secondary_db_name} = $arg;
  }
  return $self->{secondary_db_name};
}


=head2 secondary_db_table

  Arg [1]    : String $secondary_db_table
  Description: Getter/setter for attribute 'secondary_db_table'.
Kieron Taylor's avatar
Kieron Taylor committed
514
  Returns    : String
515
516
517
518
519
520
521
522
523
524
525
526
527
  Exceptions : none
  Caller     : general

=cut

sub secondary_db_table {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{secondary_db_table} = $arg;
  }
  return $self->{secondary_db_table};
}

528

Arne Stabenau's avatar
Arne Stabenau committed
529
530
=head2 add_synonym

Patrick Meidl's avatar
Patrick Meidl committed
531
532
  Arg [1]    : String $arg - synonym to add
  Description: Add a synonym for the external object.
Arne Stabenau's avatar
Arne Stabenau committed
533
534
535
  Returntype : none
  Exceptions : none
  Caller     : general
536
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
537
538
539
540

=cut


541
542
543
sub add_synonym {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
544
    push( @{$self->{synonyms}}, $arg );
545
546
547
  }
}

Arne Stabenau's avatar
Arne Stabenau committed
548

Graham McVicker's avatar
Graham McVicker committed
549
=head2 get_all_synonyms
Arne Stabenau's avatar
Arne Stabenau committed
550

551
  Args      : none
Patrick Meidl's avatar
Patrick Meidl committed
552
553
  Example    : my @synonyms = @{ $db_entry->get_all_synonyms };
  Description: Get a list of synonyms known for this object.
554
555
               Synonyms are lazy-loaded if required.
  Returntype : listref of strings. May be empty.
Arne Stabenau's avatar
Arne Stabenau committed
556
557
  Exceptions : none
  Caller     : general
558
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
559
560
561

=cut

Graham McVicker's avatar
Graham McVicker committed
562
sub get_all_synonyms {
563

564
  my $self = shift;
565
566

  # lazy-load synonyms if required
Monika Komorowska's avatar
Monika Komorowska committed
567
568
  if (!$self->{synonyms} && $self->adaptor()) {
    $self->{synonyms} = $self->adaptor()->fetch_all_synonyms($self->dbID());
569
570
  }

571
  return $self->{synonyms};
572
573
}

Arne Stabenau's avatar
Arne Stabenau committed
574

575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
=head2 get_all_dependents

  Args[1]    : (optional) Bio::EnsEMBL::Gene, Transcript or Translation object
  Example    : my @dependents = @{ $db_entry->get_all_dependents };
  Description: Get a list of DBEntrys that are depenednet on the DBEntry.
               if an ensembl gene transcript or translation is given then only
               the ones on that object will be given
  Returntype : listref of DBEntrys. May be empty.
  Exceptions : none
  Caller     : general
  Status     : UnStable

=cut

sub get_all_dependents {
  my $self = shift;
  my $ensembl_object = shift;

Monika Komorowska's avatar
Monika Komorowska committed
593
  return  $self->adaptor()->get_all_dependents($self->dbID(), $ensembl_object);
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
}

=head2 get_all_masters

  Args[1]    : (optional) Bio::EnsEMBL::Gene, Transcript or Translation object
  Example    : my @masters = @{ $db_entry->get_all_masters };
  Description: Get a list of DBEntrys that are the masters of the DBEntry.
               if an ensembl gene transcript or translation is given then only
               the ones on that object will be given.
  Returntype : listref of DBEntrys. May be empty.
  Exceptions : none
  Caller     : general
  Status     : UnStable

=cut

sub get_all_masters {
  my $self = shift;
  my $ensembl_object = shift;

Monika Komorowska's avatar
Monika Komorowska committed
614
  return  $self->adaptor()->get_all_masters($self->dbID(), $ensembl_object);
615
616
617
}


Arne Stabenau's avatar
Arne Stabenau committed
618
619
620
=head2 flush_synonyms

  Args       : none
Patrick Meidl's avatar
Patrick Meidl committed
621
  Description: Remove all synonyms from this object.
Arne Stabenau's avatar
Arne Stabenau committed
622
623
624
  Returntype : none
  Exceptions : none
  Caller     : general
625
  Status     : Stable
Arne Stabenau's avatar
Arne Stabenau committed
626
627
628

=cut

629
630
sub flush_synonyms {
  my $self = shift;
631
  $self->{synonyms} = [];
632
633
}

Arne Stabenau's avatar
Arne Stabenau committed
634

635
636
=head2 status

Patrick Meidl's avatar
Patrick Meidl committed
637
638
639
  Arg [1]    : (optional) String $arg - value to set
  Description: Getter/setter for attribute 'status'.
  Returntype : String
Arne Stabenau's avatar
Arne Stabenau committed
640
641
  Exceptions : none
  Caller     : general
642
  Status     : Stable
643
644
645

=cut

Arne Stabenau's avatar
Arne Stabenau committed
646

647
sub status{
Patrick Meidl's avatar
Patrick Meidl committed
648
649
650
651
652
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
     $self->{status} = $arg;
  } 
  return $self->{status};
653
654
}

655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
=head2 ensembl_object_type

  Arg [1]    : (optional) String $arg - value to set
  Description: Getter/setter for attribute ensembl_object_type.
  Returntype : String
  Exceptions : none
  Caller     : general
  Status     : Stable

=cut


sub ensembl_object_type{
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
     $self->{ensembl_object_type} = $arg;
  } 
  return $self->{ensembl_object_type};
}

=head2 ensembl_id

  Arg [1]    : (optional) String $arg - value to set
  Description: Getter/setter for attribute ensembl_id.
  Returntype : String
  Exceptions : none
  Caller     : general
  Status     : Stable

=cut


sub ensembl_id{
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
     $self->{ensembl_id} = $arg;
  } 
  return $self->{ensembl_id};
}



Graham McVicker's avatar
Graham McVicker committed
697
698
699
=head1 DEPRECATED METHODS

=cut
Graham McVicker's avatar
Graham McVicker committed
700
701
702

=head2 get_synonyms

Kieron Taylor's avatar
Kieron Taylor committed
703
  DEPRECATED use get_all_synonyms instead
Graham McVicker's avatar
Graham McVicker committed
704
705
706
707
708
709

=cut

sub get_synonyms {
  my $self = shift;

710
  deprecate("get_synonyms has been renamed get_all_synonyms.");
Graham McVicker's avatar
Graham McVicker committed
711
712
713
  return $self->get_all_synonyms;
}

714
1;
Patrick Meidl's avatar
Patrick Meidl committed
715