Class: Ensembl::Core::MiscFeature

Inherits:
DBConnection show all
Includes:
Sliceable
Defined in:
lib/ensembl/core/activerecord.rb

Overview

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.

Examples:

#TODO

Class Method Summary collapse

Methods included from Sliceable

#length, #project, #seq, #slice, #start, #stop, #strand, #transform

Methods inherited from DBConnection

connect, ensemblgenomes_connect

Methods inherited from DBRegistry::Base

generic_connect, get_info, get_name_from_db

Class Method Details

.find_all_by_attrib_type_value(code, value) ⇒ Object



946
947
948
949
950
951
952
953
954
955
# File 'lib/ensembl/core/activerecord.rb', line 946

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



942
943
944
# File 'lib/ensembl/core/activerecord.rb', line 942

def self.find_by_attrib_type_value(code, value)
  return self.find_all_by_attrib_type_value(code, value)[0]
end