class Ensembl::Core::Translation

The Translation class provides an interface to the translation table. This table contains the translation start and stop positions and exons for a given Transcript

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.

@example

#TODO

Public Class Methods

find_by_stable_id(stable_id) click to toggle source

The Translation#find_by_stable_id class method fetches a Translation object based on its stable ID (i.e. the “ENSP” accession number). If the name is not found, it returns nil.

# File lib/bio-ensembl/core/activerecord.rb, line 1412
def self.find_by_stable_id(stable_id)
  translation_stable_id = TranslationStableId.find_by_stable_id(stable_id)
  if translation_stable_id.nil?
    return nil
  else
    return translation_stable_id.translation
  end
end

Public Instance Methods

display_label() click to toggle source

The Translation#display_label method returns the default name of the translation.

# File lib/bio-ensembl/core/activerecord.rb, line 1402
def display_label
  return Xref.find(self.display_xref_id).display_label
end
Also aliased as: display_name, label, name
display_name()
Alias for: display_label
label()
Alias for: display_label
name()
Alias for: display_label
stable_id() click to toggle source

The Translation#stable_id method returns the stable ID of the translation.

@return [String] Ensembl stable ID

# File lib/bio-ensembl/core/activerecord.rb, line 1397
def stable_id
  return self.translation_stable_id.stable_id
end