Module: EnsemblREST::Ontology

Defined in:
lib/ensemblrest/ontoandtaxo.rb

Class Method Summary collapse

Class Method Details

.ancestors(id, options = {}) ⇒ JSON

Reconstruct the entire ancestry of a term from is_a and part_of relationships

Parameters:

Returns:

  • (JSON)

    the entire ancestry of a term



23
24
25
# File 'lib/ensemblrest/ontoandtaxo.rb', line 23

def ancestors(id, options = {})
	return EnsemblREST.get("ontology/ancestors/#{id}", {format: 'json'}.merge(options))
end

.ancestors_chart(id, options = {}) ⇒ JSON

Reconstruct the entire ancestry of a term from is_a and part_of relationships.

Parameters:

Returns:

  • (JSON)

    the entire ancestry of a term



32
33
34
# File 'lib/ensemblrest/ontoandtaxo.rb', line 32

def ancestors_chart(id, options = {})
	return EnsemblREST.get("ontology/ancestors/chart/#{id}", {format: 'json'}.merge(options))
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

Parameters:

Returns:

  • (JSON)

    the terms descended from a given term



41
42
43
# File 'lib/ensemblrest/ontoandtaxo.rb', line 41

def descendants(id, options = {})
	return EnsemblREST.get("ontology/descendants/#{id}", {format: 'json'}.merge(options))
end

.id(name, options = {}) ⇒ JSON

Search for an ontological term by its namespaced identifier

Parameters:

Returns:

  • (JSON)

    an ontological term



50
51
52
# File 'lib/ensemblrest/ontoandtaxo.rb', line 50

def id(name, options = {})
	return EnsemblREST.get("ontology/id/#{name}", {format: 'json'}.merge(options))
end

.name(name, options = {}) ⇒ JSON

Search for a list of ontological terms by their name

Parameters:

Returns:

  • (JSON)

    a list of ontological terms



59
60
61
# File 'lib/ensemblrest/ontoandtaxo.rb', line 59

def name(name, options = {})
	return EnsemblREST.get("ontology/name/#{URI.escape(name)}", {format: 'json'}.merge(options))
end