class Ensembl::Variation::TranscriptVariation

The TranscriptVariation class gives information about the position of a VariationFeature, mapped on an annotated 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.

@example

vf = Variation.find_by_name('rs10111').variation_feature
vf.transcript_variations.each do |tv|
  puts tv.peptide_allele_string, tv.transcript.stable_id    
end

The TranscriptVariation class gives information about the position of a VariationFeature, mapped on an annotated 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.

@example

vf = Variation.find_by_name('rs10111').variation_feature
vf.transcript_variations.each do |tv|
  puts tv.peptide_allele_string, tv.transcript.stable_id    
end

Public Instance Methods

consequence_type() click to toggle source
# File lib/bio-ensembl/variation/variation_feature.rb, line 354
def consequence_type # workaround as ActiveRecord do not parse SET field in MySQL
  "#{attributes_before_type_cast['consequence_type']}" 
end
consequence_types() click to toggle source
# File lib/bio-ensembl/variation/variation_feature62.rb, line 428
def consequence_types # workaround as ActiveRecord do not parse SET field in MySQL
  "#{attributes_before_type_cast['consequence_types']}" 
end
transcript() click to toggle source
# File lib/bio-ensembl/variation/variation_feature.rb, line 358
def transcript
  host,user,password,db_name,port,species,release = Ensembl::Variation::DBConnection.get_info
  if !Ensembl::Core::DBConnection.connected? then     
      Ensembl::Core::DBConnection.connect(species,release.to_i,:username => user, :password => password,:host => host, :port => port)    
  end
  
  begin # this changed from release 58
    return Ensembl::Core::Transcript.find_by_stable_id(self.transcript_stable_id)
  rescue NoMethodError  
    return Ensembl::Core::Transcript.find(self.transcript_id)
  end
  
end