Module: Sylfy::Service::ENSEMBL::REST::Genetree

Defined in:
lib/sylfy/service/ensemblrest/comparative.rb

Constant Summary collapse

SERVICENAME =
'genetree'

Class Method Summary collapse

Class Method Details

.id(id, option = {}) ⇒ array of Hash

Retrieves Gene Tree dumps for a given Gene Tree stable identifier

Parameters:

Returns:

  • (array of Hash)

    results



67
68
69
70
71
72
# File 'lib/sylfy/service/ensemblrest/comparative.rb', line 67

def id(id, option = {})
  option_type = [:aligned, :nh_format , :sequence]
  get_path = "/#{SERVICENAME}/id/#{id}"
  option['Content-Type'] = 'text/x-nh'
  return Sylfy::Service::ENSEMBLREST::service(get_path, option_type, option)
end

.member(id, option = {}) ⇒ array of Hash

Retrieves the Gene Tree that contains the given stable identifier

Parameters:

Returns:

  • (array of Hash)

    results



82
83
84
85
86
87
# File 'lib/sylfy/service/ensemblrest/comparative.rb', line 82

def member(id, option = {})
  option_type = [:db_type, :object_type , :species]
  get_path = "/#{SERVICENAME}/member/id/#{id}"
  option['Content-Type'] = 'text/x-phyloxml+xml'
  return Sylfy::Service::ENSEMBLREST::service(get_path, option_type, option)
end

.symbol(species, symbol, option = {}) ⇒ array of Hash

Retrieves a Gene Tree containing the Gene identified by the given symbol

Parameters:

Returns:

  • (array of Hash)

    results



99
100
101
102
103
104
# File 'lib/sylfy/service/ensemblrest/comparative.rb', line 99

def symbol(species, symbol, option = {})
  option_type = [:db_type, :external_db, :object_type]
  get_path = "/#{SERVICENAME}/member/symbol/#{species}/#{symbol}"
  option['Content-Type'] = 'text/x-phyloxml+xml'
  return Sylfy::Service::ENSEMBLREST::service(get_path, option_type, option)
end