Class: Ensembl::Core::MiscFeature
- Inherits:
-
DBConnection
- Object
- ActiveRecord::Base
- DBConnection
- Ensembl::Core::MiscFeature
- Includes:
- Sliceable
- Defined in:
- lib/ensembl/core/activerecord.rb
Overview
DESCRIPTION
The MiscFeature class provides an interface to the misc_feature table. The actual type of feature is stored in the MiscSet class.
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
#TODO
Class Method Summary collapse
- .find_all_by_attrib_type_value(code, value) ⇒ Object
- .find_by_attrib_type_value(code, value) ⇒ Object
Methods included from Sliceable
#length, #project, #seq, #slice, #start, #stop, #strand, #transform
Methods inherited from DBConnection
Class Method Details
.find_all_by_attrib_type_value(code, value) ⇒ Object
948 949 950 951 952 953 954 955 956 957 |
# File 'lib/ensembl/core/activerecord.rb', line 948 def self.find_all_by_attrib_type_value(code, value) code_id = AttribType.find_by_code(code) misc_attribs = MiscAttrib.find_all_by_attrib_type_id_and_value(code_id, value) answers = Array.new misc_attribs.each do |ma| answers.push(MiscFeature.find_all_by_misc_feature_id(ma.misc_feature_id)) end answers.flatten! return answers end |
.find_by_attrib_type_value(code, value) ⇒ Object
944 945 946 |
# File 'lib/ensembl/core/activerecord.rb', line 944 def self.find_by_attrib_type_value(code, value) return self.find_all_by_attrib_type_value(code, value)[0] end |