Bio::EnsEMBL DBEntry
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::DBEntry -
Object representing an external reference (xref)
Package variables
No package variables defined.
Included modules
Bio::Annotation::DBLink
Bio::EnsEMBL::Storable
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( deprecate )
Inherit
Bio::Annotation::DBLink Bio::EnsEMBL::Storable
Synopsis
Description
This object holds information about external references (xrefs) to
Ensembl objects.
Methods
add_synonymDescriptionCode
analysisDescriptionCode
commentDescriptionCode
databaseDescriptionCode
db_display_nameDescriptionCode
dbnameDescriptionCode
descriptionDescriptionCode
display_idDescriptionCode
display_id_linkableDescriptionCode
flush_synonymsDescriptionCode
get_all_synonymsDescriptionCode
get_synonymsDescriptionCode
info_textDescriptionCode
info_typeDescriptionCode
linkage_annotationDescriptionCode
newDescriptionCode
new_fastDescriptionCode
optional_idDescriptionCode
primary_idDescriptionCode
primary_id_linkableDescriptionCode
priorityDescriptionCode
releaseDescriptionCode
secondary_db_nameDescriptionCode
secondary_db_tableDescriptionCode
statusDescriptionCode
typeDescriptionCode
versionDescriptionCode
Methods description
add_synonymcode    nextTop
  Arg [1]    : String $arg - synonym to add
Example : none
Description: Add a synonym for the external object.
Returntype : none
Exceptions : none
Caller : general
Status : Stable
analysiscodeprevnextTop
  Arg [1]    : Bio::EnsEMBL::Analysis $analysis
Example : none
Description: get/set for attribute analysis
Returntype : Bio::EnsEMBL::Analysis
Exceptions : none
Caller : general
Status : Stable
commentcodeprevnextTop
  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
databasecodeprevnextTop
  Args       : none
Example : none
Description: Additional getter for attribute 'dbname'.
The name of the external database.
Only include for BioPerl interface compliance, please use
$self->dbname().
Returntype : String
Exceptions : none
Caller : general
Status : Stable
db_display_namecodeprevnextTop
  Arg [1]    : String $db_display_name
Example : none
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
Exceptions : none
Caller : general
dbnamecodeprevnextTop
  Arg [1]    : (optional) String $arg - value to set
Example : none
Description: Getter/setter for attribute 'dbname'.
The name of the external database.
Returntype : String
Exceptions : none
Caller : general
Status : Stable
descriptioncodeprevnextTop
  Arg [1]    : (optional) String $arg - value to set
Example : none
Description: Getter/setter for attribute 'description'.
The object's description, from the external_db table
Returntype : String
Exceptions : none
Caller : general
Status : Stable
display_idcodeprevnextTop
  Arg [1]    : (optional) String $arg - value to set
Example : none
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
Exceptions : none
Caller : general
Status : Stable
display_id_linkablecodeprevnextTop
  Arg [1]    : (optional) Boolean $arg - value to set
Example : none
Description: Getter/setter for attribute 'display_id_linkable'.
Returntype : String
Exceptions : none
Caller : general
Status : At Risk
: due to it being under development
flush_synonymscodeprevnextTop
  Args       : none
Example : none
Description: Remove all synonyms from this object.
Returntype : none
Exceptions : none
Caller : general
Status : Stable
get_all_synonymscodeprevnextTop
  Args       : none
Example : my @synonyms = @{ $db_entry->get_all_synonyms };
Description: Get a list of synonyms known for this object.
Synonyms are lazy-loaded if required.
Returntype : listref of strings. May be empty.
Exceptions : none
Caller : general
Status : Stable
get_synonymscodeprevnextTop
  Description: DEPRECATED use get_all_synonyms instead
info_textcodeprevnextTop
  Arg [1]    : String $info_text
Example : none
Description: Getter/setter for attribute 'info_text'.
Returntype : String
Exceptions : none
Caller : general
info_typecodeprevnextTop
  Arg [1]    : String $info_type
Example : none
Description: Getter/setter for attribute 'info_type'.
Returntype : String
Exceptions : none
Caller : general
linkage_annotationcodeprevnextTop
  Arg [1]    : String $object_xref_text
Example : none
Description: Getter/setter for attribute 'linkage_annotation'.
Returntype : String
Exceptions : none
Caller : general
newcodeprevnextTop
  Args [...] : list of named parameters 
Example : my $dbentry = new Bio::EnsEMBL::DBEntry(
-adaptor => $adaptor,
-primary_id => $pid,
-version => $version,
-dbname => $dbname,
-release => $release,
-display_id => $did,
-description => $description,
-primary_id_linkable =>$primary_id_linkable,
-display_id_linkable =>$display_id_linkable,
-priority => $priority,
-db_display_name => $db_display_name,
-info_type => $info_type,
-info_text => $info_text,
-type => $type,
-secondary_db_name => $secondary_db_name,
-secondary_db_table => $secondary_db_table
-linkage_annotation => $object_xref_text);
Description: Creates a new DBEntry object
Returntype : Bio::EnsEMBL::DBEntry
Exceptions : none
Caller : Bio::EnsEMBL::DBEntryAdaptor
Status : At Risk
Due to 'PRIMARY_ID_LINKABLE','DISPLAY_ID_LINKABLE','PRIORITY',
'INFO_TYPE', 'INFO_TEXT', ''DB_DISPLAY_NAME', 'TYPE',
'SECONDARY_DB_NAME', 'SECONDARY_DB_TABLE'
being under development - if you don't use any of these the
method can be considered Stable
new_fastcodeprevnextTop
  Arg [1]    : Hashref $hashref - hash reference to bless as new DBEntry object
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
Caller : general
Status : Stable
optional_idcodeprevnextTop
  Args       : none
Example : none
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
Exceptions : none
Caller : general
Status : Stable
primary_idcodeprevnextTop
  Arg [1]    : (optional) String $arg - value to set
Example : none
Description: Getter/setter for attribute 'primary_id'.
This is the object's primary id in the external database.
Returntype : String
Exceptions : none
Caller : general
Status : Stable
primary_id_linkablecodeprevnextTop
  Arg [1]    : (optional) Boolean $arg - value to set
Example : none
Description: Getter/setter for attribute 'primary_id_linkable'.
Returntype : String
Exceptions : none
Caller : general
Status : At Risk
: due to it being under development
prioritycodeprevnextTop
  Arg [1]    : int $priority
Example : none
Priority : Getter/setter for attribute 'priority'. Note this
is the priority from the external_db table.
Returntype : String
Exceptions : none
Caller : general
Status : At Risk
: due to it being under development
releasecodeprevnextTop
  Arg [1]    : (optional) String $arg - value to set
Example : none
Description: Getter/setter for attribute 'release'.
The external database release name.
Returntype : String
Exceptions : none
Caller : general
Status : Stable
secondary_db_namecodeprevnextTop
  Arg [1]    : String $secondary_db_name
Example : none
Description: Getter/setter for attribute 'secondary_db_name'.
Returnsecondary_db_name : String
Exceptions : none
Caller : general
secondary_db_tablecodeprevnextTop
  Arg [1]    : String $secondary_db_table
Example : none
Description: Getter/setter for attribute 'secondary_db_table'.
Returnsecondary_db_table : String
Exceptions : none
Caller : general
statuscodeprevnextTop
  Arg [1]    : (optional) String $arg - value to set
Example : none
Description: Getter/setter for attribute 'status'.
Returntype : String
Exceptions : none
Caller : general
Status : Stable
typecodeprevnextTop
  Arg [1]    : String $type
Example : none
Description: Getter/setter for attribute 'type'.
Returntype : String
Exceptions : none
Caller : general
versioncodeprevnextTop
  Arg [1]    : (optional) String $arg - value to set
Example : none
Description: Getter/setter for attribute 'version'.
The object's version in the external database.
Returntype : String
Exceptions : none
Caller : general
Status : Stable
Methods code
add_synonymdescriptionprevnextTop
sub add_synonym {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    push( @{$self->{synonyms}}, $arg );
  }
}
analysisdescriptionprevnextTop
sub analysis {
   my $self = shift;
  $self->{analysis} = shift if( @_ );
  return $self->{analysis};
}
commentdescriptionprevnextTop
sub comment {
  my $self = shift;
  return $self->description();
}
databasedescriptionprevnextTop
sub database {
  my $self = shift;
  return $self->dbname();
}
db_display_namedescriptionprevnextTop
sub db_display_name {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{db_display_name} = $arg;
  }

  my $name;
  if ($self->{info_type} && $self->{info_type} eq "PROJECTION") {
    $name = "Projected " . $self->{db_display_name};
  } else {
    $name =  $self->{db_display_name};
  }

  return $name;
}
dbnamedescriptionprevnextTop
sub dbname {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{dbname} = $arg;
  } 
  return $self->{dbname};
}
descriptiondescriptionprevnextTop
sub description {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{description} = $arg;
  } 
  return $self->{description};
}
display_iddescriptionprevnextTop
sub display_id {
   my ( $self, $arg ) = @_;
   if( defined $arg ) {
       $self->{display_id} = $arg;
   } 
   return $self->{display_id};
}
display_id_linkabledescriptionprevnextTop
sub display_id_linkable {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{display_id_linkable} = $arg;
  } 
  return $self->{display_id_linkable};
}
flush_synonymsdescriptionprevnextTop
sub flush_synonyms {
  my $self = shift;
  $self->{synonyms} = [];
}
get_all_synonymsdescriptionprevnextTop
sub get_all_synonyms {
  my $self = shift;

  # lazy-load synonyms if required
if (!$self->{synonyms} && $self->{adaptor}) { $self->{synonyms} = $self->{adaptor}->fetch_all_synonyms($self->dbID()); } return $self->{synonyms};
}
get_synonymsdescriptionprevnextTop
sub get_synonyms {
  my $self = shift;

  deprecate("get_synonyms has been renamed get_all_synonyms.");
  return $self->get_all_synonyms;
}

1;
}
info_textdescriptionprevnextTop
sub info_text {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{info_text} = $arg;
  } 
  return $self->{info_text};
}
info_typedescriptionprevnextTop
sub info_type {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{info_type} = $arg;
  }
  return $self->{info_type};
}
linkage_annotationdescriptionprevnextTop
sub linkage_annotation {
  my ( $self, $arg ) = @_;

  $self->{linkage_annotation} = $arg if defined $arg;
  
  return $self->{linkage_annotation};
}
newdescriptionprevnextTop
sub new {
  my ($class, @args) = @_;
  
  my $self = bless {},$class;

  my ( $adaptor, $dbID, $primary_id, $version,
       $dbname, $release, $display_id, $description,
       $primary_id_linkable, $display_id_linkable, $priority,
       $db_display_name, $info_type, $info_text, $type,
       $secondary_db_name, $secondary_db_table, $link_annotation, $analysis) =
    rearrange ( ['ADAPTOR','DBID','PRIMARY_ID','VERSION',
                 'DBNAME','RELEASE','DISPLAY_ID','DESCRIPTION',
		 'PRIMARY_ID_LINKABLE','DISPLAY_ID_LINKABLE','PRIORITY',
		 'DB_DISPLAY_NAME', 'INFO_TYPE', 'INFO_TEXT', 'TYPE',
                 'SECONDARY_DB_NAME', 'SECONDARY_DB_TABLE', 'LINKAGE_ANNOTATION', 'ANALYSIS'], @args );

  $self->{'adaptor'} = $adaptor;
  $self->{'dbID'}    = $dbID;

  if( defined $primary_id ) { $self->primary_id( $primary_id ) }
  if( defined $version ) { $self->version( $version ) } else
    { $self->version( "" ); }
  if( defined $dbname ) { $self->dbname( $dbname ) }
  if( defined $release) { $self->release( $release ) }
  if( defined $display_id) { $self->display_id( $display_id ) }
  if( defined $description) { $self->description($description) }
  if( defined $primary_id_linkable) { $self->primary_id_linkable($primary_id_linkable) }
  if( defined $display_id_linkable) { $self->display_id_linkable($display_id_linkable) }
  if( defined $priority) { $self->priority($priority) }
  if( defined $db_display_name) { $self->db_display_name($db_display_name) }
  if( defined $info_type) { $self->info_type($info_type) }
  if( defined $info_text) { $self->info_text($info_text) }
  if( defined $type) { $self->type($type) }
  if( defined $secondary_db_name) { $self->secondary_db_name($secondary_db_name) }
  if( defined $secondary_db_table) { $self->secondary_db_table($secondary_db_table) }

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


  return $self;
}
new_fastdescriptionprevnextTop
sub new_fast {
  my $class = shift;
  my $hashref = shift;

  bless $hashref, $class;

  return $hashref;
}
optional_iddescriptionprevnextTop
sub optional_id {
  my $self = shift;
  return $self->display_id;
}
primary_iddescriptionprevnextTop
sub primary_id {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{primary_id} = $arg;
  } 
  return $self->{primary_id};
}
primary_id_linkabledescriptionprevnextTop
sub primary_id_linkable {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{primary_id_linkable} = $arg;
  } 
  return $self->{primary_id_linkable};
}
prioritydescriptionprevnextTop
sub priority {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{priority} = $arg;
  } 
  return $self->{priority};
}
releasedescriptionprevnextTop
sub release {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{release} = $arg;
  } 
  return $self->{release};
}
secondary_db_namedescriptionprevnextTop
sub secondary_db_name {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{secondary_db_name} = $arg;
  }
  return $self->{secondary_db_name};
}
secondary_db_tabledescriptionprevnextTop
sub secondary_db_table {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{secondary_db_table} = $arg;
  }
  return $self->{secondary_db_table};
}
statusdescriptionprevnextTop
sub status {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
     $self->{status} = $arg;
  } 
  return $self->{status};
}
typedescriptionprevnextTop
sub type {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{type} = $arg;
  }
  return $self->{type};
}
versiondescriptionprevnextTop
sub version {
  my ( $self, $arg ) = @_;
  if( defined $arg ) {
    $self->{version} = $arg;
  } 
  return $self->{version};
}
General documentation
LICENSETop
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACTTop
  Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.
DEPRECATED METHODSTop