module EnsemblRest::Ontologies
Public Class Methods
ontology_ancestor(id, opts = {})
click to toggle source
Find all ancestors, all terms above, belonging to a given term
# File lib/bio-ensembl-rest/ontologies.rb, line 6 def self.ontology_ancestor(id, opts = {}) return _ontology_id_generic id, 'ancestors_plain', opts end
ontology_ancestor_chart(id, opts = {})
click to toggle source
Reconstruct the entire ancestory of a term from is_a and part_of relationships.
# File lib/bio-ensembl-rest/ontologies.rb, line 12 def self.ontology_ancestor_chart(id, opts = {}) return _ontology_id_generic id, 'ancestors_chart', opts end
ontology_descendents(id, opts = {})
click to toggle source
Find all descendents, all terms below, belonging to a given term.
# File lib/bio-ensembl-rest/ontologies.rb, line 18 def self.ontology_descendents(id, opts = {}) return _ontology_id_generic id, 'descendents', opts end
ontology_id(id, opts = {})
click to toggle source
Search for an ontological term by its namespaced identifier
# File lib/bio-ensembl-rest/ontologies.rb, line 24 def self.ontology_id(id, opts = {}) return _ontology_id_generic id, 'plain', opts end
ontology_name(name, opts = {})
click to toggle source
Search for a list of ontological terms by their name and an optional ontology
# File lib/bio-ensembl-rest/ontologies.rb, line 54 def self.ontology_name(name, opts = {}) opts = EnsemblRest.parse_options opts path = EnsemblRest.build_path "/ontology/name/#{name}", opts if opts['content-type'] == 'ruby' plain_opts = opts.clone plain_opts['content-type'] = 'application/json' return JSON.parse ontology_name name, plain_opts end return EnsemblRest.fetch_data path, opts, 'ontologies' end