class Bio::Fetch::EBI

Bio::Fetch::EBI is a client of EBI Dbfetch (www.ebi.ac.uk/Tools/dbfetch/dbfetch).

An instance of this class works the same as:

obj = Bio::Fetch.new("http://www.ebi.ac.uk/Tools/dbfetch/dbfetch")
obj.database = "ena_sequence"

See the documents of Bio::Fetch for more details.

Constants

URL

EBI Dbfetch server URL

Public Class Methods

new(url = URL) click to toggle source

For the usage, see the document of Bio::Fetch.new.

Calls superclass method Bio::Fetch.new
# File lib/bio/io/fetch.rb, line 103
def initialize(url = URL)
  @database = "ena_sequence"
  super
end
query(*args) click to toggle source

Shortcut for using EBI Dbfetch server. You can fetch an entry without creating an instance of Bio::Fetch::EBI. This method uses EBI Dbfetch server www.ebi.ac.uk/Tools/dbfetch/dbfetch .

Example:

puts Bio::Fetch::EBI.query('refseq','NM_123456')
puts Bio::Fetch::EBI.query('ena_sequence','J00231')

Arguments:

  • database: name of database to query (see Bio::Fetch#databases to get list of supported databases)

  • id: single ID or ID list separated by commas or white space

  • style: [raw|html] (default = 'raw')

  • format: name of output format (see Bio::Fetch#formats)

# File lib/bio/io/fetch.rb, line 122
def self.query(*args)
  self.new.fetch(*args)
end