Module: EnsemblREST::Xref
- Defined in:
- lib/ensemblrest/xref.rb
Class Method Summary collapse
-
.external(symbol, species = 'human', options = {}) ⇒ JSON
Looks up an external symbol and returns all Ensembl objects linked to it.
-
.id(id, options = {}) ⇒ JSON
Perform lookups of Ensembl Identifiers and retrieve their external references in other databases.
-
.name(name, species = 'human', options = {}) ⇒ JSON
Performs a lookup based upon the primary accession or display label of an external reference and returning the information we hold about the entry.
Class Method Details
.external(symbol, species = 'human', options = {}) ⇒ JSON
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).
25 26 27 |
# File 'lib/ensemblrest/xref.rb', line 25 def external(symbol, species = 'human', = {}) return EnsemblREST.get("xrefs/symbol/#{species}/#{symbol}", {format: 'json'}.merge()) end |
.id(id, options = {}) ⇒ JSON
Perform lookups of Ensembl Identifiers and retrieve their external references in other databases
34 35 36 |
# File 'lib/ensemblrest/xref.rb', line 34 def id(id, = {}) return EnsemblREST.get("xrefs/id/#{id}", {format: 'json'}.merge()) end |
.name(name, species = 'human', options = {}) ⇒ JSON
Performs a lookup based upon the primary accession or display label of an external reference and returning the information we hold about the entry
45 46 47 |
# File 'lib/ensemblrest/xref.rb', line 45 def name(name, species = 'human', = {}) return EnsemblREST.get("xrefs/name/#{species}/#{name}", {format: 'json'}.merge()) end |