Module: EnsemblREST::Lookup

Defined in:
lib/ensemblrest/lookup.rb

Class Method Summary collapse

Class Method Details

.id(id, options = {}) ⇒ JSON

Find the species and database for a single identifier

Parameters:

Returns:

  • (JSON)

    Cross references



31
32
33
# File 'lib/ensemblrest/lookup.rb', line 31

def id(id, options = {})
	return EnsemblREST.get("lookup/id/#{id}", {format: 'json'}.merge(options))
end

.id_post(ids, options = {}) ⇒ JSON

Find the species and database for several identifiers. IDs that are not found are returned with no data.

Parameters:

Returns:

  • (JSON)

    Cross references



50
51
52
# File 'lib/ensemblrest/lookup.rb', line 50

def id_post(ids, options = {})
	return EnsemblREST.post("lookup/id", {'ids' => ids}, {format: 'json'}.merge(options))
end

.symbol(symbol, species = 'human', options = {}) ⇒ JSON

Find the species and database for a symbol in a linked external database

Parameters:

  • symbol (String)

    A name or symbol from an annotation source has been linked to a genetic feature

  • species (String) (defaults to: 'human')

    Species name/alias

  • options (Hash) (defaults to: {})

    Optional arguments for the service please goto rest.ensembl.org/documentation/info/symbol_lookup

Returns:

  • (JSON)

    Cross references



22
23
24
# File 'lib/ensemblrest/lookup.rb', line 22

def symbol(symbol, species = 'human', options = {})
	return EnsemblREST.get("lookup/symbol/#{species}/#{symbol}", {format: 'json'}.merge(options))
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.

Parameters:

  • symbols (String)

    An array of names or symbols from an annotation source has been linked to a genetic feature

  • species (String) (defaults to: 'human')

    Species name/alias

  • options (Hash) (defaults to: {})

    Optional arguments for the service please goto rest.ensembl.org/documentation/info/symbol_post

Returns:

  • (JSON)

    Cross references



41
42
43
# File 'lib/ensemblrest/lookup.rb', line 41

def symbol_post(symbols, species = 'human', options = {})
	return EnsemblREST.post("lookup/symbol/#{species}", {'symbols' => symbols}, {format: 'json'}.merge(options))
end