Class: Ensembl::Core::Exon
- Inherits:
-
DBConnection
- Object
- ActiveRecord::Base
- DBConnection
- Ensembl::Core::Exon
- Includes:
- Sliceable
- Defined in:
- lib/ensembl/core/activerecord.rb
Overview
DESCRIPTION
The Exon class describes an exon.
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.
This class includes the mixin Sliceable, which means that it is mapped to a SeqRegion object and a Slice can be created for objects of this class. See Sliceable and Slice for more information.
USAGE
seq_region = SeqRegion.find(1)
puts seq_region.exons.length
Instance Method Summary collapse
-
#seq ⇒ Object
DESCRIPTION The Exon#seq method returns the sequence of the exon.
- #stable_id ⇒ Object
Methods included from Sliceable
#length, #project, #slice, #start, #stop, #strand, #transform
Methods inherited from DBConnection
Instance Method Details
#seq ⇒ Object
DESCRIPTION
The Exon#seq method returns the sequence of the exon.
674 675 676 677 |
# File 'lib/ensembl/core/activerecord.rb', line 674 def seq slice = Ensembl::Core::Slice.new(self.seq_region, seq_region_start, seq_region_end, seq_region_strand) return slice.seq end |
#stable_id ⇒ Object
668 669 670 |
# File 'lib/ensembl/core/activerecord.rb', line 668 def stable_id return self.exon_stable_id.stable_id end |