XrefsetQueriesApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| Create | POST /api/v1/xrefsets | Import a new xrefset file |
| DeleteFile | DELETE /api/v1/xrefsets/{id} | Delete a xrefset with all related data. Only users who uploaded the xrefset are allowed to delete it. |
| GetDetailsByAccession | GET /api/v1/xrefsets/{id}/metadata | Retrieve xrefset details |
| SearchEntries | GET /api/v1/xrefsets/entries | Retrieve a list of entries across all xrefsets for given sourceId and targetId |
| SearchEntriesWithinFile | GET /api/v1/xrefsets/{id}/entries | Retrieve a list of entries for the given xrefset and given sourceId and targetId |
Create¶
XrefSetCreateResponse Create(body = var.body)
Import a new xrefset file
Example¶
library(odmApi)
# Import a new xrefset file
#
# prepare function argument(s)
var_body <- XrefSetCreateRequest$new("gene-transcript", "dataLink_example", 123) # XrefSetCreateRequest | Request body for creating a new xrefset. ## Important: The length of 'sourceId' strings is limited to 255 characters. Ensure that the provided values adhere to this limitation to avoid data truncation. (Optional)
api_instance <- XrefsetQueriesApi$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$Create(body = var_bodydata_file = "result.txt")
result <- api_instance$Create(body = var_body)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| body | XrefSetCreateRequest | Request body for creating a new xrefset. ## Important: The length of 'sourceId' strings is limited to 255 characters. Ensure that the provided values adhere to this limitation to avoid data truncation. | [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 |
|---|---|---|
| 200 | successful operation | - |
| 201 | The objects were successfully created. The returned value is a list of created objects. | - |
| 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 work with the xrefset. | - |
| 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. | - |
DeleteFile¶
DeleteFile(id)
Delete a xrefset with all related data. Only users who uploaded the xrefset are allowed to delete it.
Example¶
library(odmApi)
# Delete a xrefset with all related data. Only users who uploaded the xrefset are allowed to delete it.
#
# prepare function argument(s)
var_id <- "id_example" # character | xrefset ID
api_instance <- XrefsetQueriesApi$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")
api_instance$DeleteFile(var_id)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | character | xrefset ID |
Return type¶
void (empty response body)
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: Not defined
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 204 | Xrefset file successfully marked for deletion, mappings have been removed | - |
| 400 | Invalid data in the request. See the 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 work with the xrefset. | - |
| 404 | The xrefset does not exist. | - |
| 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. | - |
GetDetailsByAccession¶
XrefSetMetadata GetDetailsByAccession(id)
Retrieve xrefset details
Example¶
library(odmApi)
# Retrieve xrefset details
#
# prepare function argument(s)
var_id <- "id_example" # character | xrefset ID
api_instance <- XrefsetQueriesApi$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$GetDetailsByAccession(var_iddata_file = "result.txt")
result <- api_instance$GetDetailsByAccession(var_id)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | character | xrefset ID |
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 | Object containing xrefset details, including user submitted metadata and system info | - |
| 400 | Invalid data in the request. See the 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). | - |
| 404 | The xrefset does not exist. | - |
| 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. | - |
SearchEntries¶
XrefSetSearchResult SearchEntries(source_id = var.source_id, target_id = var.target_id, cursor = var.cursor, page_limit = var.page_limit)
Retrieve a list of entries across all xrefsets for given sourceId and targetId
Conditions It is possible to supply a list of values for \"targetId\" and \"sourceId\". If non-empty lists of values for \"targetId\" and \"sourceId\" are supplied, the following search rule is applied: (sourceId = \"S1\" OR .. sourceId = \"Sn\") AND (targetId = \"T1\" OR .. targetId = \"Tm\"). ## Important: The length of 'sourceId' strings is limited to 255 characters. Ensure that the provided values adhere to this limitation to avoid data truncation.¶
Example¶
library(odmApi)
# Retrieve a list of entries across all xrefsets for given sourceId and targetId
#
# prepare function argument(s)
var_source_id <- c("inner_example") # array[character] | Supply sourceId in the format \"sourceId\". For transcript-gene mapping this is gene ID, e.g. \"ENSG00000146648\" (Optional)
var_target_id <- c("inner_example") # array[character] | Supply targetId in the format \"targetId\". For transcript-gene mapping this is transcript ID, e.g. \"ENST00000617423.4\" (Optional)
var_cursor <- "cursor_example" # character | The page tag to resume results from (see paging above). (Optional)
var_page_limit <- 56 # integer | This parameter determines the number of results to retrieve per page, with the default set at 2000. (Optional)
api_instance <- XrefsetQueriesApi$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$SearchEntries(source_id = var_source_id, target_id = var_target_id, cursor = var_cursor, page_limit = var_page_limitdata_file = "result.txt")
result <- api_instance$SearchEntries(source_id = var_source_id, target_id = var_target_id, cursor = var_cursor, page_limit = var_page_limit)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| source_id | list( character ) | Supply sourceId in the format \"sourceId\". For transcript-gene mapping this is gene ID, e.g. \"ENSG00000146648\" | [optional] |
| target_id | list( character ) | Supply targetId in the format \"targetId\". For transcript-gene mapping this is transcript ID, e.g. \"ENST00000617423.4\" | [optional] |
| cursor | character | The page tag to resume results from (see paging above). | [optional] |
| page_limit | integer | This parameter determines the number of results to retrieve per page, with the default set at 2000. | [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 | Json object with the cursor and json array of retrieved xrefset data. Response entries are ordered by xrefset ID and then by source ID. | - |
| 400 | Invalid data in the request. See the 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). | - |
| 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. | - |
SearchEntriesWithinFile¶
XrefSetSearchResult SearchEntriesWithinFile(id, source_id = var.source_id, target_id = var.target_id, cursor = var.cursor, page_limit = var.page_limit)
Retrieve a list of entries for the given xrefset and given sourceId and targetId
Conditions It is possible to supply a list of values for \"targetId\" and \"sourceId\". If non-empty lists of values for \"targetId\" and \"sourceId\" are supplied, the following search rule is applied: (sourceId = \"S1\" OR .. sourceId = \"Sn\") AND (targetId = \"T1\" OR .. targetId = \"Tm\").¶
Example¶
library(odmApi)
# Retrieve a list of entries for the given xrefset and given sourceId and targetId
#
# prepare function argument(s)
var_id <- "id_example" # character | xrefset ID
var_source_id <- c("inner_example") # array[character] | Supply sourceId in the format \"sourceId\". For transcript-gene mapping this is gene ID, e.g. \"ENSG00000146648\" (Optional)
var_target_id <- c("inner_example") # array[character] | Supply targetId in the format \"targetId\". For transcript-gene mapping this is transcript ID, e.g. \"ENST00000617423.4\" (Optional)
var_cursor <- "cursor_example" # character | The page tag to resume results from (see paging above). (Optional)
var_page_limit <- 56 # integer | This parameter determines the number of results to retrieve per page, with the default set at 2000. (Optional)
api_instance <- XrefsetQueriesApi$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$SearchEntriesWithinFile(var_id, source_id = var_source_id, target_id = var_target_id, cursor = var_cursor, page_limit = var_page_limitdata_file = "result.txt")
result <- api_instance$SearchEntriesWithinFile(var_id, source_id = var_source_id, target_id = var_target_id, cursor = var_cursor, page_limit = var_page_limit)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | character | xrefset ID | |
| source_id | list( character ) | Supply sourceId in the format \"sourceId\". For transcript-gene mapping this is gene ID, e.g. \"ENSG00000146648\" | [optional] |
| target_id | list( character ) | Supply targetId in the format \"targetId\". For transcript-gene mapping this is transcript ID, e.g. \"ENST00000617423.4\" | [optional] |
| cursor | character | The page tag to resume results from (see paging above). | [optional] |
| page_limit | integer | This parameter determines the number of results to retrieve per page, with the default set at 2000. | [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 | Json object with the cursor and json array of retrieved xrefset data. Response entries are ordered by xrefset ID and then by source ID. | - |
| 400 | Invalid data in the request. See the 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). | - |
| 404 | The xrefset does not exist. | - |
| 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. | - |