ReferenceGenomeApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| GetReferenceGenomeByAccession | GET /api/v1/reference-genomes/{id} | Retrieve a single Reference Genome object by ID (accession) |
| SearchReferenceGenomes | GET /api/v1/reference-genomes | List or search for Reference Genome objects |
| Upload | POST /api/v1/reference-genomes | Upload reference genome to ODM |
GetReferenceGenomeByAccession¶
RGItem GetReferenceGenomeByAccession(id)
Retrieve a single Reference Genome object by ID (accession)
Example¶
library(odmApi)
# Retrieve a single Reference Genome object by ID (accession)
#
# prepare function argument(s)
var_id <- "id_example" # character | Unique identifier (Genestack accession) of Reference Genome object.
api_instance <- ReferenceGenomeApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GetReferenceGenomeByAccession(var_iddata_file = "result.txt")
result <- api_instance$GetReferenceGenomeByAccession(var_id)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | character | Unique identifier (Genestack accession) of Reference Genome object. |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is the object. | - |
| 401 | User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). | - |
| 404 | No object exists with the given ID. | - |
| 500 | An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. | - |
SearchReferenceGenomes¶
ListResponse SearchReferenceGenomes(organism = var.organism, assembly = var.assembly, release = var.release, query = var.query, page_limit = var.page_limit, page_offset = var.page_offset)
List or search for Reference Genome objects
Retrieve Reference Genome metadata objects by searching/listing Reference Genome metadata. ## Metadata full-text queries Single words can be supplied as is, otherwise use speech marks (\") to quote queries that include whitespace. Speech marks and backslash characters in the query need to be escaped with a backslash (\\). ## Paging For performance reasons, this endpoint returns results in \"pages\" of limited size. In order to retrieve all matching results the client needs to request multiple pages starting from an offset to the first result. You can do this using the pageOffset query parameter. A value of 0 (the default) instructs the server to return the first page of results, 100 would return a page of results starting from the 101st result and so on. To retrieve all results, iterate through pages by increasing the offset in multiples of limit (e.g., offset = n * limit), until all results have been retrieved. The total number of pages can be calculated by dividing the total number of results by the limit. ## List operation This endpoint can be called without any query parameters. When called this way, it returns a list of all Reference Genome objects.
Example¶
library(odmApi)
# List or search for Reference Genome objects
#
# prepare function argument(s)
var_organism <- "organism_example" # character | Scientific name of an organism (species) used in reference genome file (e.g. `Homo sapiens`). (Optional)
var_assembly <- "assembly_example" # character | Major version (for example, `GRCh38`). (Optional)
var_release <- "release_example" # character | Ensembl reference genome minor version (for example, `75` or `109`). (Optional)
var_query <- "query_example" # character | Search for reference genome via a full-text query over all reference genome metadata fields (e.g. `GRCh38`). (Optional)
var_page_limit <- 56 # integer | Maximum number of results to return per page (see Paging above). This value must be between 0 and 2000 (inclusive). The default is 2000. (Optional)
var_page_offset <- 56 # integer | Show the page {pageOffset + 1} results from the start of the results. E.g. 100 will show a page of results starting from the 101st result. The default value is 0. (Optional)
api_instance <- ReferenceGenomeApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$SearchReferenceGenomes(organism = var_organism, assembly = var_assembly, release = var_release, query = var_query, page_limit = var_page_limit, page_offset = var_page_offsetdata_file = "result.txt")
result <- api_instance$SearchReferenceGenomes(organism = var_organism, assembly = var_assembly, release = var_release, query = var_query, page_limit = var_page_limit, page_offset = var_page_offset)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| organism | character | Scientific name of an organism (species) used in reference genome file (e.g. `Homo sapiens`). | [optional] |
| assembly | character | Major version (for example, `GRCh38`). | [optional] |
| release | character | Ensembl reference genome minor version (for example, `75` or `109`). | [optional] |
| query | character | Search for reference genome via a full-text query over all reference genome metadata fields (e.g. `GRCh38`). | [optional] |
| page_limit | integer | Maximum number of results to return per page (see Paging above). This value must be between 0 and 2000 (inclusive). The default is 2000. | [optional] |
| page_offset | integer | Show the page {pageOffset + 1} results from the start of the results. E.g. 100 will show a page of results starting from the 101st result. The default value is 0. | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is a list of objects. | - |
| 401 | User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). | - |
| 500 | An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. | - |
Upload¶
AccessionResponse Upload(body = var.body)
Upload reference genome to ODM
In order to import reference genome file, please fill in the following fields: * annotationUrl - link to the non-vertebrae organism or any custom reference genome in .gtf format, archived in .gz format. Note: if any of the parameters below are not corresponding to the available Ensembl data (for example, organism name or assembly is changed), the link must be provided. * organism - scientific name (default: Homo sapiens). Please see the list of available organisms here. Note: for some specific cases (Canis lupus breeds, Mus musculus strains, etc.) please see the species folders name in the Ensembl FTP (release 113) to provide the same organism name as shown in the list. * assembly - major version (for example, GRCh38). Please see the list of available assemblies here. * release - Ensembl reference genome minor version (for example, 75 or 109). * name - customized reference genome title that is used for linkage variant files. By default is combined from species, assembly and release parameters: {species} reference genome {assembly}.{release}. Reference genome will be available after initialisation. Please track initialisation task status.
Example¶
library(odmApi)
# Upload reference genome to ODM
#
# prepare function argument(s)
var_body <- UploadRGRequest$new("organism_example", "assembly_example", "release_example", "annotationUrl_example", "name_example") # UploadRGRequest | (Optional)
api_instance <- ReferenceGenomeApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$Upload(body = var_bodydata_file = "result.txt")
result <- api_instance$Upload(body = var_body)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| body | UploadRGRequest | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: application/json
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 201 | The object was successfully created. | - |
| 400 | The object cannot be created. This error occurs when the supplied data or metadata are incorrect. Please see error message for details. | - |
| 401 | User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). | - |
| 403 | Not enough permissions to call method. | - |
| 500 | An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. | - |