Class: Ensembl::Core::Xref

Inherits:
DBConnection
  • Object
show all
Defined in:
lib/ensembl/core/activerecord.rb

Overview

DESCRIPTION

The Xref class provides an interface to the xref table. This table contains external references for objects in the database.

This class uses ActiveRecord to access data in the Ensembl database. See the general documentation of the Ensembl module for more information on what this means and what methods are available.

USAGE

gene = Gene.find(1)
gene.xrefs.each do |xref|
  puts xref.display_label + "\t" + xref.description
end

Instance Method Summary collapse

Methods inherited from DBConnection

connect

Instance Method Details

#to_sObject



1499
1500
1501
# File 'lib/ensembl/core/activerecord.rb', line 1499

def to_s
  return self.external_db.db_name.to_s + ":" + self.display_label
end