VariantIntegrationAsCuratorApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| CreateVariantGroupSampleGroupLinkAsCurator | POST /api/v1/as-curator/integration/link/variant/group/{sourceId}/to/sample/group/{targetId} | Create a link between a group of variant objects and a group of sample objects |
| CreateVariantSampleLinkAsCurator | POST /api/v1/as-curator/integration/link/variant/{sourceId}/to/sample/{targetId} | Create a link between a variant object and a sample |
| DeleteVariantGroupSampleGroupLinkAsCurator | DELETE /api/v1/as-curator/integration/link/variant/group/{sourceId}/to/sample/group/{targetId} | Delete link between a group of variant objects and a group of sample objects |
| DeleteVariantSampleLinkAsCurator | DELETE /api/v1/as-curator/integration/link/variant/{sourceId}/to/sample/{targetId} | Delete link between a variant object and a sample |
| GetVariantBySampleAsCurator | GET /api/v1/as-curator/integration/link/variant/by/sample/{id} | Retrieve variant run-level data by querying related sample ID (accession) |
| GetVariantGroupsByStudyAsCurator | GET /api/v1/as-curator/integration/link/variant/group/by/study/{id} | Retrieve group metadata by querying study ID (accession) |
| GetVariantRunToSamplePairsAsCurator | GET /api/v1/as-curator/integration/link/variant/run-to-samples/by/group/{id} | Retrieve run-sample pairs by group id. Pagination is based on unique runs, not unique pairs. |
CreateVariantGroupSampleGroupLinkAsCurator¶
CreateVariantGroupSampleGroupLinkAsCurator(source_id, target_id, linking_attribute = var.linking_attribute)
Create a link between a group of variant objects and a group of sample objects
Create a link between a group of variant objects and a group of sample objects. A variant object can be linked to one object only. If a variant object is already linked to another object, this link will be deleted and a new link with the specified object will be created. Variant objects of the same group can only be linked to objects of the same study. Users can specify a custom metadata field for linking omics data to samples via the “linkingAttribute” parameter, if not specified the “Sample Source ID“ sample metadata attribute will be used by default.
Example¶
library(odmApi)
# Create a link between a group of variant objects and a group of sample objects
#
# prepare function argument(s)
var_source_id <- "source_id_example" # character | The ID (accession) of the group of run-level objects (corresponding to the column in a VCF file)
var_target_id <- "target_id_example" # character | The ID (accession) of the sample group object
var_linking_attribute <- "linking_attribute_example" # character | Metadata field containing sample IDs to link omics data to samples. The template applied to the study must contain this field in the sample section. (Optional)
api_instance <- VariantIntegrationAsCuratorApi$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$CreateVariantGroupSampleGroupLinkAsCurator(var_source_id, var_target_id, linking_attribute = var_linking_attribute)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| source_id | character | The ID (accession) of the group of run-level objects (corresponding to the column in a VCF file) | |
| target_id | character | The ID (accession) of the sample group object | |
| linking_attribute | character | Metadata field containing sample IDs to link omics data to samples. The template applied to the study must contain this field in the sample section. | [optional] |
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 |
|---|---|---|
| 200 | Not all signal data were linked to the samples. | - |
| 204 | All signal data were linked to the samples from the specified sample group. | - |
| 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 | Sample group, signal group or samples to the link were not found, or the specified linking attribute was not found. | - |
| 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. | - |
CreateVariantSampleLinkAsCurator¶
CreateVariantSampleLinkAsCurator(source_id, target_id)
Create a link between a variant object and a sample
Create a link between a variant object and a sample. A variant object can be linked to one object only. If a variant object is already linked to another object, this link will be deleted and a new link with the specified object will be created. Variant objects of the same group can only be linked to objects of the same study.
Example¶
library(odmApi)
# Create a link between a variant object and a sample
#
# prepare function argument(s)
var_source_id <- "source_id_example" # character | The ID (accession) of the run-level object (corresponding to the column in a VCG/GCT file)
var_target_id <- "target_id_example" # character | The ID (accession) of the sample object
api_instance <- VariantIntegrationAsCuratorApi$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$CreateVariantSampleLinkAsCurator(var_source_id, var_target_id)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| source_id | character | The ID (accession) of the run-level object (corresponding to the column in a VCG/GCT file) | |
| target_id | character | The ID (accession) of the sample object |
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 | Link created. | - |
| 400 | Link cannot be created. | - |
| 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. | - |
DeleteVariantGroupSampleGroupLinkAsCurator¶
DeleteVariantGroupSampleGroupLinkAsCurator(source_id, target_id)
Delete link between a group of variant objects and a group of sample objects
Delete link between a group of variant objects and a group of sample objects
Example¶
library(odmApi)
# Delete link between a group of variant objects and a group of sample objects
#
# prepare function argument(s)
var_source_id <- "source_id_example" # character | The ID (accession) of the group of run-level objects (corresponding to the column in a VCF file)
var_target_id <- "target_id_example" # character | The ID (accession) of the sample group object
api_instance <- VariantIntegrationAsCuratorApi$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$DeleteVariantGroupSampleGroupLinkAsCurator(var_source_id, var_target_id)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| source_id | character | The ID (accession) of the group of run-level objects (corresponding to the column in a VCF file) | |
| target_id | character | The ID (accession) of the sample group object |
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 | Link deleted. | - |
| 400 | Link cannot be deleted. | - |
| 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. | - |
DeleteVariantSampleLinkAsCurator¶
DeleteVariantSampleLinkAsCurator(source_id, target_id)
Delete link between a variant object and a sample
Delete link between a variant object and a sample
Example¶
library(odmApi)
# Delete link between a variant object and a sample
#
# prepare function argument(s)
var_source_id <- "source_id_example" # character | The ID (accession) of the run-level object (corresponding to the column in a VCG/GCT file)
var_target_id <- "target_id_example" # character | The ID (accession) of the sample object
api_instance <- VariantIntegrationAsCuratorApi$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$DeleteVariantSampleLinkAsCurator(var_source_id, var_target_id)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| source_id | character | The ID (accession) of the run-level object (corresponding to the column in a VCG/GCT file) | |
| target_id | character | The ID (accession) of the sample object |
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 | Link deleted. | - |
| 400 | Link cannot be deleted. | - |
| 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. | - |
GetVariantBySampleAsCurator¶
ListResponse GetVariantBySampleAsCurator(id, response_format = var.response_format, page_limit = var.page_limit, page_offset = var.page_offset, use_versions = var.use_versions, returned_metadata_fields = var.returned_metadata_fields)
Retrieve variant run-level data by querying related sample ID (accession)
Versioning Specific versions of omics data files (eg. GCT) can be queried via the useVersions parameter. Different versions of an omics data file are associated via their CHAIN_ID metadata value. This CHAIN_ID can be supplied to the useVersions parameter along with the version number or specific omics data file accessions to include them in the query. If nothing is supplied to the useVersions parameter then only the active version (which is usually the last one imported) is queried. This acts as a filter before the rest of the query is carried out. Example usage: useVersions=* (query all versions, including those without CHAIN_IDs) useVersions=v2 (query the second version. If there is no second version then the data file is not queried) useVersions=v1,v0 (query the first version and any data files without CHAIN_IDs(v0) ) useVersions=GSVC002:v3 (for omics data files with a CHAIN_ID of GSCV002 query the third version) useVersions=GSVC002:GSF00494,GSF000496 (for omics data files with a CHAIN_ID of GSCV002 query only the specific accessions GSF00494 and GSF000496) Rules for multiple CHAIN_IDs can be supplied to the parameter using the ; separator. ## 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 using pageOffset values of n * pageLimit until a page returns fewer results than the page limit, which indicates there are no more results.¶
Example¶
library(odmApi)
# Retrieve variant run-level data by querying related sample ID (accession)
#
# prepare function argument(s)
var_id <- "id_example" # character | Unique identifier (accession) of the object.
var_response_format <- ResponseFormat$new() # ResponseFormat | Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. (Optional)
var_page_limit <- 56 # integer | Maximum number of results to return. This value must be between 0 and 2000 (inclusive). (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)
var_use_versions <- "use_versions_example" # character | Specify which versions of omics data files are used in the query. By default the active version is used. See Versioning above. Syntax: \\* or `v<version number>` or `<CHAIN_ID>`:`v<version number>` or `<CHAIN_ID>`:`<accession1,accession2,..>` (Optional)
var_returned_metadata_fields <- "returned_metadata_fields_example" # character | The parameter defines amount of metadata attributes to return: 1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. (Optional)
api_instance <- VariantIntegrationAsCuratorApi$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$GetVariantBySampleAsCurator(var_id, response_format = var_response_format, page_limit = var_page_limit, page_offset = var_page_offset, use_versions = var_use_versions, returned_metadata_fields = var_returned_metadata_fieldsdata_file = "result.txt")
result <- api_instance$GetVariantBySampleAsCurator(var_id, response_format = var_response_format, page_limit = var_page_limit, page_offset = var_page_offset, use_versions = var_use_versions, returned_metadata_fields = var_returned_metadata_fields)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | character | Unique identifier (accession) of the object. | |
| response_format | ResponseFormat | Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. | [optional] |
| page_limit | integer | Maximum number of results to return. This value must be between 0 and 2000 (inclusive). | [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] |
| use_versions | character | Specify which versions of omics data files are used in the query. By default the active version is used. See Versioning above. Syntax: \* or `v<version number>` or `<CHAIN_ID>`:`v<version number>` or `<CHAIN_ID>`:`<accession1,accession2,..>` | [optional] |
| returned_metadata_fields | Enum [minimal_data, extended_data_included, original_data_included] | The parameter defines amount of metadata attributes to return: 1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/json, text/tab-separated-values
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is a list of objects. | - |
| 400 | Entities cannot be retrieved. | - |
| 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. | - |
GetVariantGroupsByStudyAsCurator¶
array[MetadataWithId] GetVariantGroupsByStudyAsCurator(id, response_format = var.response_format, use_versions = var.use_versions, returned_metadata_fields = var.returned_metadata_fields)
Retrieve group metadata by querying study ID (accession)
Versioning Specific versions of omics data files (eg. GCT) can be queried via the useVersions parameter. Different versions of an omics data file are associated via their CHAIN_ID metadata value. This CHAIN_ID can be supplied to the useVersions parameter along with the version number or specific omics data file accessions to include them in the query. If nothing is supplied to the useVersions parameter then only the active version (which is usually the last one imported) is queried. This acts as a filter before the rest of the query is carried out. Example usage: useVersions=* (query all versions, including those without CHAIN_IDs) useVersions=v2 (query the second version. If there is no second version then the data file is not queried) useVersions=v1,v0 (query the first version and any data files without CHAIN_IDs(v0) ) useVersions=GSVC002:v3 (for omics data files with a CHAIN_ID of GSCV002 query the third version) useVersions=GSVC002:GSF00494,GSF000496 (for omics data files with a CHAIN_ID of GSCV002 query only the specific accessions GSF00494 and GSF000496) Rules for multiple CHAIN_IDs can be supplied to the parameter using the ; separator.¶
Example¶
library(odmApi)
# Retrieve group metadata by querying study ID (accession)
#
# prepare function argument(s)
var_id <- "id_example" # character | Unique identifier (accession) of the object.
var_response_format <- ResponseFormat$new() # ResponseFormat | Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. (Optional)
var_use_versions <- "use_versions_example" # character | Specify which versions of omics data files are used in the query. By default the active version is used. See Versioning above. Syntax: \\* or `v<version number>` or `<CHAIN_ID>`:`v<version number>` or `<CHAIN_ID>`:`<accession1,accession2,..>` (Optional)
var_returned_metadata_fields <- "returned_metadata_fields_example" # character | The parameter defines amount of metadata attributes to return: 1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. (Optional)
api_instance <- VariantIntegrationAsCuratorApi$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$GetVariantGroupsByStudyAsCurator(var_id, response_format = var_response_format, use_versions = var_use_versions, returned_metadata_fields = var_returned_metadata_fieldsdata_file = "result.txt")
result <- api_instance$GetVariantGroupsByStudyAsCurator(var_id, response_format = var_response_format, use_versions = var_use_versions, returned_metadata_fields = var_returned_metadata_fields)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | character | Unique identifier (accession) of the object. | |
| response_format | ResponseFormat | Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. | [optional] |
| use_versions | character | Specify which versions of omics data files are used in the query. By default the active version is used. See Versioning above. Syntax: \* or `v<version number>` or `<CHAIN_ID>`:`v<version number>` or `<CHAIN_ID>`:`<accession1,accession2,..>` | [optional] |
| returned_metadata_fields | Enum [minimal_data, extended_data_included, original_data_included] | The parameter defines amount of metadata attributes to return: 1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. | [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 the object. | - |
| 400 | The supplied object ID is invalid. | - |
| 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. | - |
GetVariantRunToSamplePairsAsCurator¶
ListResponse GetVariantRunToSamplePairsAsCurator(id, page_limit = var.page_limit, page_offset = var.page_offset)
Retrieve run-sample pairs by group id. Pagination is based on unique runs, not unique pairs.
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 using pageOffset values of n * pageLimit until a page returns fewer results than the page limit, which indicates there are no more results.¶
Example¶
library(odmApi)
# Retrieve run-sample pairs by group id. Pagination is based on unique runs, not unique pairs.
#
# prepare function argument(s)
var_id <- "id_example" # character | Unique identifier (accession) of the object.
var_page_limit <- 56 # integer | Maximum number of results to return. This value must be between 0 and 2000 (inclusive). (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 <- VariantIntegrationAsCuratorApi$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$GetVariantRunToSamplePairsAsCurator(var_id, page_limit = var_page_limit, page_offset = var_page_offsetdata_file = "result.txt")
result <- api_instance$GetVariantRunToSamplePairsAsCurator(var_id, page_limit = var_page_limit, page_offset = var_page_offset)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | character | Unique identifier (accession) of the object. | |
| page_limit | integer | Maximum number of results to return. This value must be between 0 and 2000 (inclusive). | [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. | - |
| 400 | Entities cannot be retrieved. | - |
| 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. | - |