Module: EnsemblREST::Info

Defined in:
lib/ensemblrest/info.rb

Class Method Summary collapse

Class Method Details

.analysis(species = 'human', options = {}) ⇒ JSON

List the names of analyses involved in generating Ensembl data.

Parameters:

Returns:

  • (JSON)

    List the names of analyses



22
23
24
# File 'lib/ensemblrest/info.rb', line 22

def analysis(species = 'human', options = {})
	return EnsemblREST.get("info/analysis/#{species}", {format: 'json'}.merge(options))
end

.assembly_info(species = 'human', options = {}) ⇒ JSON

List the currently available assemblies for a species.

Parameters:

Returns:

  • (JSON)

    List the currently available assemblies



31
32
33
# File 'lib/ensemblrest/info.rb', line 31

def assembly_info(species = 'human', options = {})
	return EnsemblREST.get("info/assembly/#{species}", {format: 'json'}.merge(options))
end

.assembly_stats(region_name, species = 'human', options = {}) ⇒ JSON

Returns information about the specified toplevel sequence region for the given species.

Parameters:

  • region_name (String)

    The (top level) sequence region name.

  • species (String) (defaults to: 'human')

    Species name/alias

  • options (Hash) (defaults to: {})

    Optional arguments for the service please goto rest.ensembl.org/documentation/info/assembly_stats

Returns:

  • (JSON)

    Returns information about the specified toplevel sequence region



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

def assembly_stats(region_name, species = 'human', options = {})
	return EnsemblREST.get("info/assembly/#{species}/#{region_name}", {format: 'json'}.merge(options))
end

.biotypes(species = 'human', options = {}) ⇒ JSON

List the functional classifications of gene models that Ensembl associates with a particular species. Useful for restricting the type of genes/transcripts retrieved by other endpoints.

Parameters:

Returns:

  • (JSON)

    List the currently available assemblies



51
52
53
# File 'lib/ensemblrest/info.rb', line 51

def biotypes(species = 'human', options = {})
	return EnsemblREST.get("info/biotypes/#{species}", {format: 'json'}.merge(options))
end

.compara_methods(options = {}) ⇒ JSON

List all compara analyses available (an analysis defines the type of comparative data).

Parameters:

Returns:

  • (JSON)

    List all compara analyses



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

def compara_methods(options = {})
	return EnsemblREST.get("info/compara/methods", {format: 'json'}.merge(options))
end

.compara_species_sets(method, options = {}) ⇒ JSON

List all collections of species analysed with the specified compara method.

Parameters:

Returns:

  • (JSON)

    List the currently available assemblies



68
69
70
# File 'lib/ensemblrest/info.rb', line 68

def compara_species_sets(method, options = {})
	return EnsemblREST.get("info/compara/species_sets/#{method}", {format: 'json'}.merge(options))
end

.comparas(options = {}) ⇒ JSON

Lists all available comparative genomics databases and their data release.

Parameters:

Returns:

  • (JSON)

    List all compara analyses



76
77
78
# File 'lib/ensemblrest/info.rb', line 76

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

.data(options = {}) ⇒ JSON

Shows the data releases available on this REST server. May return more than one release (unfrequent non-standard Ensembl configuration).

Parameters:

Returns:

  • (JSON)

    Shows the data releases available on this REST server



84
85
86
# File 'lib/ensemblrest/info.rb', line 84

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

.external_dbs(species = 'human', options = {}) ⇒ JSON

Lists all available external sources for a species.

Parameters:

Returns:

  • (JSON)

    Lists all available external sources



93
94
95
# File 'lib/ensemblrest/info.rb', line 93

def external_dbs(species = 'human', options = {})
	return EnsemblREST.get("info/external_dbs/#{species}", {format: 'json'}.merge(options))
end

.ping(options = {}) ⇒ Boolean

Checks if the service is alive.

Parameters:

Returns:

  • (Boolean)

    True/False



101
102
103
104
105
106
107
108
# File 'lib/ensemblrest/info.rb', line 101

def ping(options = {})
	begin
		EnsemblREST.get("info/ping", {format: 'json'}.merge(options))
		return true
	rescue  EnsemblREST::ServiceNotFound
		return false
	end
end

.rest(options = {}) ⇒ String

Shows the current version of the Ensembl REST API.

Parameters:

Returns:

  • (String)

    version of this REST server



114
115
116
# File 'lib/ensemblrest/info.rb', line 114

def rest(options = {})
	return EnsemblREST.get("info/rest", {format: 'json'}.merge(options))["release"]
end

.software(options = {}) ⇒ String

Shows the current version of the Ensembl API used by the REST server.

Parameters:

Returns:

  • (String)

    the current version of the Ensembl API



122
123
124
# File 'lib/ensemblrest/info.rb', line 122

def software(options = {})
	return EnsemblREST.get("info/software", {format: 'json'}.merge(options))["release"]
end

.species(options = {}) ⇒ String

Lists all available species, their aliases, available adaptor groups and data release.

Parameters:

Returns:

  • (String)

    Lists all available species



130
131
132
# File 'lib/ensemblrest/info.rb', line 130

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