Class: Rafflesia::HomologySearches
- Inherits:
-
Object
- Object
- Rafflesia::HomologySearches
- Defined in:
- lib/rafflesia/homology_searches.rb
Instance Method Summary collapse
-
#create(database_id:, query:, background: nil, database_release_alias: nil, database_release_id: nil, metadata: nil, mode: nil, parameters: nil, query_context_id: nil, search_profile: nil, request_options: {}) ⇒ Rafflesia::EnvelopeHomologySearch
POST /v1/homology_searches.
-
#get(homology_search_id:, include_results: true, request_options: {}) ⇒ Rafflesia::EnvelopeHomologySearch
GET /v1/homology_searches/homology_search_id.
-
#initialize(client) ⇒ HomologySearches
constructor
A new instance of HomologySearches.
Constructor Details
#initialize(client) ⇒ HomologySearches
Returns a new instance of HomologySearches.
9 10 11 |
# File 'lib/rafflesia/homology_searches.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#create(database_id:, query:, background: nil, database_release_alias: nil, database_release_id: nil, metadata: nil, mode: nil, parameters: nil, query_context_id: nil, search_profile: nil, request_options: {}) ⇒ Rafflesia::EnvelopeHomologySearch
POST /v1/homology_searches
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/rafflesia/homology_searches.rb', line 26 def create( database_id:, query:, background: nil, database_release_alias: nil, database_release_id: nil, metadata: nil, mode: nil, parameters: nil, query_context_id: nil, search_profile: nil, request_options: {} ) body = { 'background' => background, 'database_id' => database_id, 'database_release_alias' => database_release_alias, 'database_release_id' => database_release_id, 'metadata' => , 'mode' => mode, 'parameters' => parameters, 'query' => query, 'query_context_id' => query_context_id, 'search_profile' => search_profile }.compact response = @client.request( method: :post, path: '/v1/homology_searches', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeHomologySearch.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#get(homology_search_id:, include_results: true, request_options: {}) ⇒ Rafflesia::EnvelopeHomologySearch
GET /v1/homology_searches/homology_search_id
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/rafflesia/homology_searches.rb', line 68 def get( homology_search_id:, include_results: true, request_options: {} ) params = { 'include_results' => include_results }.compact response = @client.request( method: :get, path: "/v1/homology_searches/#{Rafflesia::Util.encode_path(homology_search_id)}", auth: true, params: params, request_options: ) result = Rafflesia::EnvelopeHomologySearch.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |