Class Ensembl::Core::Translation
In: lib/ensembl/core/activerecord.rb
Parent: DBConnection

DESCRIPTION

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.

USAGE

 #TODO

Methods

External Aliases

translation_attribs -> attribs

Public Class methods

DESCRIPTION

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.

[Source]

      # File lib/ensembl/core/activerecord.rb, line 1427
1427:       def self.find_by_stable_id(stable_id)
1428:         translation_stable_id = TranslationStableId.find_by_stable_id(stable_id)
1429:         if translation_stable_id.nil?
1430:           return nil
1431:         else
1432:           return translation_stable_id.translation
1433:         end
1434:       end

Public Instance methods

DESCRIPTION

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

[Source]

      # File lib/ensembl/core/activerecord.rb, line 1416
1416:       def display_label
1417:         return Xref.find(self.display_xref_id).display_label
1418:       end
display_name()

Alias for display_label

label()

Alias for display_label

name()

Alias for display_label

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


Arguments:none
Returns:String

[Source]

      # File lib/ensembl/core/activerecord.rb, line 1410
1410:       def stable_id
1411:         return self.translation_stable_id.stable_id
1412:       end

[Validate]