Module: Sylfy::Service::ENSEMBL::REST::Xrefs

Defined in:
lib/sylfy/service/ensemblrest/xrefs.rb

Constant Summary collapse

SERVICENAME =
'xrefs'

Class Method Summary collapse

Class Method Details

.id(id, option = {}) ⇒ array of Hash

Perform lookups of Ensembl Identifiers and retrieve their external cross references in other databases

Parameters:

Returns:

  • (array of Hash)

    results



27
28
29
30
31
# File 'lib/sylfy/service/ensemblrest/xrefs.rb', line 27

def id(id, option = {})
  option_type = [:all_levels, :callback, :db_type, :external_db, :object_type, :species]
  get_path = "/#{SERVICENAME}/id/#{id}"
  return Sylfy::Service::ENSEMBLREST::service(get_path, option_type, option)
end

.name(species, name, option = {}) ⇒ array of Hash

Performs a lookup based upon the primary accession or display label of an external reference and returning the information we hold about the entry

Parameters:

Returns:

  • (array of Hash)

    results



44
45
46
47
48
# File 'lib/sylfy/service/ensemblrest/xrefs.rb', line 44

def name(species, name, option = {})
  option_type = [:callback, :db_type, :external_db]
  get_path = "/#{SERVICENAME}/name/#{species}/#{name}"
  return Sylfy::Service::ENSEMBLREST::service(get_path, option_type, option)
end

.symbol(species, symbol, option = {}) ⇒ array of Hash

Looks up an external symbol and returns all Ensembl objects linked to it. This can be a display name for a gene/transcript/translation, a synonym or an externally linked reference. If a Gene’s transcript is linked to the supplied symbol the service will return both Gene and Transcript (it supports transient links).

Parameters:

Returns:

  • (array of Hash)

    results



64
65
66
67
68
# File 'lib/sylfy/service/ensemblrest/xrefs.rb', line 64

def symbol(species, symbol, option = {})
  option_type = [:callback, :db_type, :external_db, :object_type]
  get_path = "/#{SERVICENAME}/symbol/#{species}/#{symbol}"
  return Sylfy::Service::ENSEMBLREST::service(get_path, option_type, option)
end