Class: Ensembl::Variation::TranscriptVariation
- Inherits:
-
DBConnection
- Object
- ActiveRecord::Base
- DBRegistry::Base
- DBConnection
- Ensembl::Variation::TranscriptVariation
- Defined in:
- lib/ensembl/variation/variation.rb
Overview
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.
Instance Method Summary collapse
-
#consequence_type ⇒ Object
workaround as ActiveRecord do not parse SET field in MySQL.
- #transcript ⇒ Object
Methods inherited from DBConnection
connect, ensemblgenomes_connect
Methods inherited from DBRegistry::Base
generic_connect, get_info, get_name_from_db
Instance Method Details
#consequence_type ⇒ Object
workaround as ActiveRecord do not parse SET field in MySQL
379 380 381 |
# File 'lib/ensembl/variation/variation.rb', line 379 def consequence_type # workaround as ActiveRecord do not parse SET field in MySQL "#{attributes_before_type_cast['consequence_type']}" end |
#transcript ⇒ Object
383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/ensembl/variation/variation.rb', line 383 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 |