module EnsemblREST::Xref
Public Instance Methods
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).
@param [String] symbol Symbol or display name of a gene @param [String] species Species name/alias @param [Hash] options Optional arguments for the service please goto rest.ensembl.org/documentation/info/xref_external @return [JSON] Cross references
# File lib/ensemblrest/xref.rb, line 25 def external(symbol, species = 'human', options = {}) return EnsemblREST.get("xrefs/symbol/#{species}/#{symbol}", {format: 'json'}.merge(options)) end
Perform lookups of Ensembl Identifiers and retrieve their external references in other databases
@param [String] id An Ensembl Stable ID @param [Hash] options Optional arguments for the service please goto rest.ensembl.org/documentation/info/xref_id @return [JSON] Cross references
# File lib/ensemblrest/xref.rb, line 34 def id(id, options = {}) return EnsemblREST.get("xrefs/id/#{id}", {format: 'json'}.merge(options)) end
Performs a lookup based upon the primary accession or display label of an external reference and returning the information we hold about the entry
@param [String] name Symbol or display name of a gene @param [String] species Species name/alias @param [Hash] options Optional arguments for the service please goto rest.ensembl.org/documentation/info/xref_name @return [JSON] Cross references
# File lib/ensemblrest/xref.rb, line 45 def name(name, species = 'human', options = {}) return EnsemblREST.get("xrefs/name/#{species}/#{name}", {format: 'json'}.merge(options)) end