class Ensembl::Variation::Variation
The Variation
class represents single nucleotide polymorhisms (SNP) or variations and provides information like the names (IDs), the validation status and the allele information.
BUG: fields like validation_status and consequence_type are created using SET option directly in MySQL. These fields are bad interpreted by ActiveRecord
, returning always 0.
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
v = Variation.find_by_name('rs10111') v.alleles.each do |a| puts a.allele, a.frequency end variations = Variation.fetch_all_by_source('dbSNP') # many records variations.each do |v| puts v.name end
Public Class Methods
fetch_all_by_source(source)
click to toggle source
# File lib/bio-ensembl/variation/activerecord.rb, line 419 def self.fetch_all_by_source(source) variations = Source.find_by_name(source).variations end