Module: EnsemblREST::Lookup
- Defined in:
- lib/ensemblrest/lookup.rb
Class Method Summary collapse
-
.id(id, options = {}) ⇒ JSON
Find the species and database for a single identifier.
-
.id_post(ids, options = {}) ⇒ JSON
Find the species and database for several identifiers.
-
.symbol(symbol, species = 'human', options = {}) ⇒ JSON
Find the species and database for a symbol in a linked external database.
-
.symbol_post(symbols, species = 'human', options = {}) ⇒ JSON
Find the species and database for a set of symbols in a linked external database.
Class Method Details
.id(id, options = {}) ⇒ JSON
Find the species and database for a single identifier
31 32 33 |
# File 'lib/ensemblrest/lookup.rb', line 31 def id(id, = {}) return EnsemblREST.get("lookup/id/#{id}", {format: 'json'}.merge()) end |
.id_post(ids, options = {}) ⇒ JSON
Find the species and database for several identifiers. IDs that are not found are returned with no data.
50 51 52 |
# File 'lib/ensemblrest/lookup.rb', line 50 def id_post(ids, = {}) return EnsemblREST.post("lookup/id", {'ids' => ids}, {format: 'json'}.merge()) end |
.symbol(symbol, species = 'human', options = {}) ⇒ JSON
Find the species and database for a symbol in a linked external database
22 23 24 |
# File 'lib/ensemblrest/lookup.rb', line 22 def symbol(symbol, species = 'human', = {}) return EnsemblREST.get("lookup/symbol/#{species}/#{symbol}", {format: 'json'}.merge()) end |
.symbol_post(symbols, species = 'human', options = {}) ⇒ JSON
Find the species and database for a set of symbols in a linked external database. Unknown symbols are omitted from the response.
41 42 43 |
# File 'lib/ensemblrest/lookup.rb', line 41 def symbol_post(symbols, species = 'human', = {}) return EnsemblREST.post("lookup/symbol/#{species}", {'symbols' => symbols}, {format: 'json'}.merge()) end |