Skip to content

odm_api.XrefsetQueriesApi

All URIs are relative to http://localhost

Method HTTP request Description
create POST /api/v1/xrefsets Import a new xrefset file
delete_file DELETE /api/v1/xrefsets/{id} Delete a xrefset with all related data. Only users who uploaded the xrefset are allowed to delete it.
get_details_by_accession GET /api/v1/xrefsets/{id}/metadata Retrieve xrefset details
search_entries GET /api/v1/xrefsets/entries Retrieve a list of entries across all xrefsets for given sourceId and targetId
search_entries_within_file GET /api/v1/xrefsets/{id}/entries Retrieve a list of entries for the given xrefset and given sourceId and targetId

create

XrefSetCreateResponse create(body=body)

Import a new xrefset file

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.xref_set_create_request import XrefSetCreateRequest
from odm_api.models.xref_set_create_response import XrefSetCreateResponse
from odm_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = odm_api.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Access-token
configuration.api_key['Access-token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Access-token'] = 'Bearer'

# Configure API key authorization: Genestack-API-Token
configuration.api_key['Genestack-API-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Genestack-API-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with odm_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = odm_api.XrefsetQueriesApi(api_client)
    body = odm_api.XrefSetCreateRequest() # 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)

    try:
        # Import a new xrefset file
        api_response = api_instance.create(body=body)
        print("The response of XrefsetQueriesApi->create:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling XrefsetQueriesApi->create: %s\n" % e)

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

XrefSetCreateResponse

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. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_file

delete_file(id)

Delete a xrefset with all related data. Only users who uploaded the xrefset are allowed to delete it.

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = odm_api.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Access-token
configuration.api_key['Access-token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Access-token'] = 'Bearer'

# Configure API key authorization: Genestack-API-Token
configuration.api_key['Genestack-API-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Genestack-API-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with odm_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = odm_api.XrefsetQueriesApi(api_client)
    id = 'id_example' # str | xrefset ID

    try:
        # Delete a xrefset with all related data. Only users who uploaded the xrefset are allowed to delete it.
        api_instance.delete_file(id)
    except Exception as e:
        print("Exception when calling XrefsetQueriesApi->delete_file: %s\n" % e)

Parameters

Name Type Description Notes
id str 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. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_details_by_accession

XrefSetMetadata get_details_by_accession(id)

Retrieve xrefset details

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.xref_set_metadata import XrefSetMetadata
from odm_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = odm_api.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Access-token
configuration.api_key['Access-token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Access-token'] = 'Bearer'

# Configure API key authorization: Genestack-API-Token
configuration.api_key['Genestack-API-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Genestack-API-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with odm_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = odm_api.XrefsetQueriesApi(api_client)
    id = 'id_example' # str | xrefset ID

    try:
        # Retrieve xrefset details
        api_response = api_instance.get_details_by_accession(id)
        print("The response of XrefsetQueriesApi->get_details_by_accession:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling XrefsetQueriesApi->get_details_by_accession: %s\n" % e)

Parameters

Name Type Description Notes
id str xrefset ID

Return type

XrefSetMetadata

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. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

search_entries

XrefSetSearchResult search_entries(source_id=source_id, target_id=target_id, cursor=cursor, page_limit=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

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.xref_set_search_result import XrefSetSearchResult
from odm_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = odm_api.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Access-token
configuration.api_key['Access-token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Access-token'] = 'Bearer'

# Configure API key authorization: Genestack-API-Token
configuration.api_key['Genestack-API-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Genestack-API-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with odm_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = odm_api.XrefsetQueriesApi(api_client)
    source_id = ['source_id_example'] # List[str] | Supply sourceId in the format \"sourceId\". For transcript-gene mapping this is gene ID, e.g. \"ENSG00000146648\" (optional)
    target_id = ['target_id_example'] # List[str] | Supply targetId in the format \"targetId\". For transcript-gene mapping this is transcript ID, e.g. \"ENST00000617423.4\" (optional)
    cursor = 'cursor_example' # str | The page tag to resume results from (see paging above). (optional)
    page_limit = 56 # int | This parameter determines the number of results to retrieve per page, with the default set at 2000. (optional)

    try:
        # Retrieve a list of entries across all xrefsets for given sourceId and targetId
        api_response = api_instance.search_entries(source_id=source_id, target_id=target_id, cursor=cursor, page_limit=page_limit)
        print("The response of XrefsetQueriesApi->search_entries:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling XrefsetQueriesApi->search_entries: %s\n" % e)

Parameters

Name Type Description Notes
source_id List[str] Supply sourceId in the format \"sourceId\". For transcript-gene mapping this is gene ID, e.g. \"ENSG00000146648\" [optional]
target_id List[str] Supply targetId in the format \"targetId\". For transcript-gene mapping this is transcript ID, e.g. \"ENST00000617423.4\" [optional]
cursor str The page tag to resume results from (see paging above). [optional]
page_limit int This parameter determines the number of results to retrieve per page, with the default set at 2000. [optional]

Return type

XrefSetSearchResult

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. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

search_entries_within_file

XrefSetSearchResult search_entries_within_file(id, source_id=source_id, target_id=target_id, cursor=cursor, page_limit=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

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.xref_set_search_result import XrefSetSearchResult
from odm_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = odm_api.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Access-token
configuration.api_key['Access-token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Access-token'] = 'Bearer'

# Configure API key authorization: Genestack-API-Token
configuration.api_key['Genestack-API-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Genestack-API-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with odm_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = odm_api.XrefsetQueriesApi(api_client)
    id = 'id_example' # str | xrefset ID
    source_id = ['source_id_example'] # List[str] | Supply sourceId in the format \"sourceId\". For transcript-gene mapping this is gene ID, e.g. \"ENSG00000146648\" (optional)
    target_id = ['target_id_example'] # List[str] | Supply targetId in the format \"targetId\". For transcript-gene mapping this is transcript ID, e.g. \"ENST00000617423.4\" (optional)
    cursor = 'cursor_example' # str | The page tag to resume results from (see paging above). (optional)
    page_limit = 56 # int | This parameter determines the number of results to retrieve per page, with the default set at 2000. (optional)

    try:
        # Retrieve a list of entries for the given xrefset and given sourceId and targetId
        api_response = api_instance.search_entries_within_file(id, source_id=source_id, target_id=target_id, cursor=cursor, page_limit=page_limit)
        print("The response of XrefsetQueriesApi->search_entries_within_file:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling XrefsetQueriesApi->search_entries_within_file: %s\n" % e)

Parameters

Name Type Description Notes
id str xrefset ID
source_id List[str] Supply sourceId in the format \"sourceId\". For transcript-gene mapping this is gene ID, e.g. \"ENSG00000146648\" [optional]
target_id List[str] Supply targetId in the format \"targetId\". For transcript-gene mapping this is transcript ID, e.g. \"ENST00000617423.4\" [optional]
cursor str The page tag to resume results from (see paging above). [optional]
page_limit int This parameter determines the number of results to retrieve per page, with the default set at 2000. [optional]

Return type

XrefSetSearchResult

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. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]