Class: Bio::Fetch::EBI
- Inherits:
-
Bio::Fetch
- Object
- Bio::Fetch
- Bio::Fetch::EBI
- Defined in:
- lib/bio/io/fetch.rb
Overview
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.
Constant Summary collapse
- URL =
EBI Dbfetch server URL
"http://www.ebi.ac.uk/Tools/dbfetch/dbfetch".freeze
Instance Attribute Summary
Attributes inherited from Bio::Fetch
Class Method Summary collapse
-
.query(*args) ⇒ Object
Shortcut for using EBI Dbfetch server.
Instance Method Summary collapse
-
#initialize(url = URL) ⇒ EBI
constructor
For the usage, see the document of Bio::Fetch.new.
Methods inherited from Bio::Fetch
#databases, #fetch, #formats, #get_by_id, #maxids
Constructor Details
Class Method Details
.query(*args) ⇒ Object
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)
122 123 124 |
# File 'lib/bio/io/fetch.rb', line 122 def self.query(*args) self.new.fetch(*args) end |