Module: EnsemblREST::Taxonomy

Defined in:
lib/ensemblrest/ontoandtaxo.rb

Class Method Summary collapse

Class Method Details

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

Return the taxonomic classification of a taxon node

Parameters:

Returns:

  • (JSON)

    the taxonomic classification



73
74
75
# File 'lib/ensemblrest/ontoandtaxo.rb', line 73

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

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

Search for a taxonomic term by its identifier or name

Parameters:

Returns:

  • (JSON)

    the taxonomic classification



82
83
84
# File 'lib/ensemblrest/ontoandtaxo.rb', line 82

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

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

Search for a taxonomic id by a non-scientific name

Parameters:

Returns:

  • (JSON)

    the taxonomic classification



91
92
93
# File 'lib/ensemblrest/ontoandtaxo.rb', line 91

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