Class: Ensembl::Variation::DBConnection

Inherits:
DBRegistry::Base show all
Defined in:
lib/bio-ensembl/db_connection.rb

Overview

The Ensembl::Variation::DBConnection is the actual connection established with the Ensembl server.

Class Method Summary collapse

Methods inherited from DBRegistry::Base

generic_connect, get_info, get_name_from_db

Class Method Details

.connect(species, release = Ensembl::ENSEMBL_RELEASE, args = {}) ⇒ Object

The Ensembl::Variation::DBConnection#connect method makes the connection to the Ensembl variation database for a given species. By default, it connects to release 50 for that species. You could use a lower number, but some parts of the API might not work, or worse: give the wrong results.

Examples:

# Connect to release 50 of human
Ensembl::Variation::DBConnection.connect('homo_sapiens')

# Connect to release 42 of chicken
Ensembl::Variation::DBConnection.connect('gallus_gallus')

Parameters:

  • species (String)

    Species to connect to. Must be in snake_case

  • ensembl_release. (Integer)

    Release to connect to (default = 60)



192
193
194
# File 'lib/bio-ensembl/db_connection.rb', line 192

def self.connect(species, release = Ensembl::ENSEMBL_RELEASE, args = {})
  self.generic_connect('variation',species, release, args)
end

.ensemblgenomes_connect(species, release = Ensembl::ENSEMBL_RELEASE, args = {}) ⇒ Object



196
197
198
199
# File 'lib/bio-ensembl/db_connection.rb', line 196

def self.ensemblgenomes_connect(species, release = Ensembl::ENSEMBL_RELEASE, args={})
  args[:ensembl_genomes] = true
  self.generic_connect('variation',species,release,args)
end