Module: EnsemblREST::Ontology
- Defined in:
- lib/ensemblrest/ontoandtaxo.rb
Class Method Summary collapse
-
.ancestors(id, options = {}) ⇒ JSON
Reconstruct the entire ancestry of a term from is_a and part_of relationships.
-
.ancestors_chart(id, options = {}) ⇒ JSON
Reconstruct the entire ancestry of a term from is_a and part_of relationships.
-
.descendants(id, options = {}) ⇒ JSON
Find all the terms descended from a given term.
-
.id(name, options = {}) ⇒ JSON
Search for an ontological term by its namespaced identifier.
-
.name(name, options = {}) ⇒ JSON
Search for a list of ontological terms by their name.
Class Method Details
.ancestors(id, options = {}) ⇒ JSON
Reconstruct the entire ancestry of a term from is_a and part_of relationships
23 24 25 |
# File 'lib/ensemblrest/ontoandtaxo.rb', line 23 def ancestors(id, = {}) return EnsemblREST.get("ontology/ancestors/#{id}", {format: 'json'}.merge()) end |
.ancestors_chart(id, options = {}) ⇒ JSON
Reconstruct the entire ancestry of a term from is_a and part_of relationships.
32 33 34 |
# File 'lib/ensemblrest/ontoandtaxo.rb', line 32 def ancestors_chart(id, = {}) return EnsemblREST.get("ontology/ancestors/chart/#{id}", {format: 'json'}.merge()) end |
.descendants(id, options = {}) ⇒ JSON
Find all the terms descended from a given term. By default searches are conducted within the namespace of the given identifier
41 42 43 |
# File 'lib/ensemblrest/ontoandtaxo.rb', line 41 def descendants(id, = {}) return EnsemblREST.get("ontology/descendants/#{id}", {format: 'json'}.merge()) end |
.id(name, options = {}) ⇒ JSON
Search for an ontological term by its namespaced identifier
50 51 52 |
# File 'lib/ensemblrest/ontoandtaxo.rb', line 50 def id(name, = {}) return EnsemblREST.get("ontology/id/#{name}", {format: 'json'}.merge()) end |
.name(name, options = {}) ⇒ JSON
Search for a list of ontological terms by their name
59 60 61 |
# File 'lib/ensemblrest/ontoandtaxo.rb', line 59 def name(name, = {}) return EnsemblREST.get("ontology/name/#{URI.escape(name)}", {format: 'json'}.merge()) end |