Skip to content

odm_api.VariantSPoTAsUserApi

All URIs are relative to http://localhost

Method HTTP request Description
get_all_variants_as_user GET /api/v1/as-user/variants Retrieve multiple variant data and metadata objects
get_variant_as_user GET /api/v1/as-user/variants/{id} Retrieve a single variant object by ID (itemId)
get_variant_by_version_as_user GET /api/v1/as-user/variants/{id}/versions/{version} Retrieve a single variant object by run ID and its version
get_variant_group_as_user GET /api/v1/as-user/variants/group/{id} Retrieve a single variant group by ID (groupId)
get_variant_group_by_run_as_user GET /api/v1/as-user/variants/group/by/run/{id} Retrieve a single group object by run ID (runId)
get_variant_versions_as_user GET /api/v1/as-user/variants/{id}/versions Retrieve a list of variant object versions by run ID (runId)
search_variant_groups_as_user GET /api/v1/as-user/variants/group Retrieve groups that match a query
search_variant_runs_as_user GET /api/v1/as-user/variants/runs/by/group/{id} Retrieve run objects related to the given group

get_all_variants_as_user

VariantResponse get_all_variants_as_user(response_format=response_format, filter=filter, query=query, search_specific_terms=search_specific_terms, variant_region=variant_region, variant_feature=variant_feature, variant_id=variant_id, variant_filter=variant_filter, variant_info=variant_info, run_filter=run_filter, run_source_filter=run_source_filter, use_versions=use_versions, returned_metadata_fields=returned_metadata_fields, page_limit=page_limit, cursor=cursor)

Retrieve multiple variant data and metadata objects

Retrieve all variant data and metadata objects that match a query.

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 (\).

Metadata filters

Metadata filters are key-value pairs joined by an operator. The = operator matches literal values/string. The != operator matches anything except the literal value/string. The < or > operators match numerical results that are less or greater than the supplied value. Strings containing whitespace need to be quoted with (").

Combinations

Metadata queries/filters for the same parameter can be combined with &&, AND, || and OR operators, using white-space to separate out the terms and operators. Parentheses ( ) can be used for complex expressions.

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 together with a cursor tag. To retrieve the next page of results please supply this cursor tag to resume the query from your previous result and get the next page. If there are no more results you will just retrieve an empty result.

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.response_format import ResponseFormat
from odm_api.models.variant_response import VariantResponse
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.VariantSPoTAsUserApi(api_client)
    response_format = odm_api.ResponseFormat() # 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)
    filter = 'filter_example' # str | Filter by variant metadata (key-value metadata pair(s)). E.g. `\"Variant Source\"=dbSNP`. (optional)
    query = 'query_example' # str | Search for variant objects via a full text query over all variant metadata. E.g. `dbSNP`. Queries matching dictionary terms are automatically expanded to include synonyms. (optional)
    search_specific_terms = True # bool | If the full-text query term is present in an ODM dictionary, enabling this parameter will modify the query to include child terms of the full-text query.  For example, the search query \"Body fluid\" can be expanded to include the term \"Blood\" (a child term of  \"Body fluid\") so files containing either \"Body fluid\" or  \"Blood\"  in their metadata will be returned in the search results.  The parent-child relationship is defined by the key \"broaders\" or \"subClassOf\" in the dictionary.  If the full query term is not present in a dictionary then this parameter has no effect. (optional)
    variant_region = ['variant_region_example'] # List[str] | Specify a chromosome interval to find genes between these positions. E.g. `2:233364596-233385916`. Multiple intervals can be provided as a list. (optional)
    variant_feature = ['variant_feature_example'] # List[str] | Specify the name of the reference gene associated with a specific location in the reference genome which corresponds to the VCF file (variant group) from which the variant information is derived. By providing the gene name, such as `TP53`, variants located within the same genomic region as the specified gene will be retrieved. Multiple genes can be provided as a list. (optional)
    variant_id = ['variant_id_example'] # List[str] | One or more specific variation IDs can be specified. E.g. `rs838705` (optional)
    variant_filter = 'variant_filter_example' # str | The parameter allows to retrieve gene variants based on the filters defined in the vcf file. If not specified, all variants are returned.    1. pass - return gene variants which passed all filters   2. noPass - return gene variants which failed one or more filters (optional)
    variant_info = 'variant_info_example' # str | Filter by vcf `INFO` fields. E.g. to filter all variants annotated in dbSNP add `exists(info.DB)`. Use `!exists(INFO.KEY)` to exclude variants having the key from the search results. Provide `info.key=value` pair to search for an exact match or `info.key!=value` to exclude it from the search. Due to the limits of precision in floating point numbers, we use a small range of 0.0000001 to identify close matches. This means any differences smaller than that won't be detected. For more precise results, please use range queries. Combine multiple filters for `INFO` fields using `AND` (`&&`), `OR` (`||`) logical operators and parentheses (optional)
    run_filter = ['run_filter_example'] # List[str] | Autogenerated numeric ID that corresponds to a column and is used to link data from the same run to a sample. Multiple values can be provided as a list. (optional)
    run_source_filter = ['run_source_filter_example'] # List[str] | Column name from the file to which all data for a sample is related. Multiple values can be provided as a list to retrieve data from multiple columns. (optional)
    use_versions = 'use_versions_example' # str | 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 = 'returned_metadata_fields_example' # str | 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)
    page_limit = 56 # int | 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)
    cursor = 'cursor_example' # str | The page tag to resume results from (see paging above). (optional)

    try:
        # Retrieve multiple variant data and metadata objects
        api_response = api_instance.get_all_variants_as_user(response_format=response_format, filter=filter, query=query, search_specific_terms=search_specific_terms, variant_region=variant_region, variant_feature=variant_feature, variant_id=variant_id, variant_filter=variant_filter, variant_info=variant_info, run_filter=run_filter, run_source_filter=run_source_filter, use_versions=use_versions, returned_metadata_fields=returned_metadata_fields, page_limit=page_limit, cursor=cursor)
        print("The response of VariantSPoTAsUserApi->get_all_variants_as_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VariantSPoTAsUserApi->get_all_variants_as_user: %s\n" % e)

Parameters

Name Type Description Notes
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]
filter str Filter by variant metadata (key-value metadata pair(s)). E.g. `\"Variant Source\"=dbSNP`. [optional]
query str Search for variant objects via a full text query over all variant metadata. E.g. `dbSNP`. Queries matching dictionary terms are automatically expanded to include synonyms. [optional]
search_specific_terms bool If the full-text query term is present in an ODM dictionary, enabling this parameter will modify the query to include child terms of the full-text query. For example, the search query \"Body fluid\" can be expanded to include the term \"Blood\" (a child term of \"Body fluid\") so files containing either \"Body fluid\" or \"Blood\" in their metadata will be returned in the search results. The parent-child relationship is defined by the key \"broaders\" or \"subClassOf\" in the dictionary. If the full query term is not present in a dictionary then this parameter has no effect. [optional]
variant_region List[str] Specify a chromosome interval to find genes between these positions. E.g. `2:233364596-233385916`. Multiple intervals can be provided as a list. [optional]
variant_feature List[str] Specify the name of the reference gene associated with a specific location in the reference genome which corresponds to the VCF file (variant group) from which the variant information is derived. By providing the gene name, such as `TP53`, variants located within the same genomic region as the specified gene will be retrieved. Multiple genes can be provided as a list. [optional]
variant_id List[str] One or more specific variation IDs can be specified. E.g. `rs838705` [optional]
variant_filter str The parameter allows to retrieve gene variants based on the filters defined in the vcf file. If not specified, all variants are returned. 1. pass - return gene variants which passed all filters 2. noPass - return gene variants which failed one or more filters [optional]
variant_info str Filter by vcf `INFO` fields. E.g. to filter all variants annotated in dbSNP add `exists(info.DB)`. Use `!exists(INFO.KEY)` to exclude variants having the key from the search results. Provide `info.key=value` pair to search for an exact match or `info.key!=value` to exclude it from the search. Due to the limits of precision in floating point numbers, we use a small range of 0.0000001 to identify close matches. This means any differences smaller than that won't be detected. For more precise results, please use range queries. Combine multiple filters for `INFO` fields using `AND` (`&&`), `OR` (`
run_filter List[str] Autogenerated numeric ID that corresponds to a column and is used to link data from the same run to a sample. Multiple values can be provided as a list. [optional]
run_source_filter List[str] Column name from the file to which all data for a sample is related. Multiple values can be provided as a list to retrieve data from multiple columns. [optional]
use_versions str 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 str 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]
page_limit int 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]
cursor str The page tag to resume results from (see paging above). [optional]

Return type

VariantResponse

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 Retrieved variant data. -
400 Variant data 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. -

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

get_variant_as_user

GetVariantAsCurator200Response get_variant_as_user(id, response_format=response_format, returned_metadata_fields=returned_metadata_fields)

Retrieve a single variant object by ID (itemId)

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.get_variant_as_curator200_response import GetVariantAsCurator200Response
from odm_api.models.response_format import ResponseFormat
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.VariantSPoTAsUserApi(api_client)
    id = 'id_example' # str | Variant object unique identifier (itemId).
    response_format = odm_api.ResponseFormat() # 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)
    returned_metadata_fields = 'returned_metadata_fields_example' # str | 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)

    try:
        # Retrieve a single variant object by ID (itemId)
        api_response = api_instance.get_variant_as_user(id, response_format=response_format, returned_metadata_fields=returned_metadata_fields)
        print("The response of VariantSPoTAsUserApi->get_variant_as_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VariantSPoTAsUserApi->get_variant_as_user: %s\n" % e)

Parameters

Name Type Description Notes
id str Variant object unique identifier (itemId).
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]
returned_metadata_fields str 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

GetVariantAsCurator200Response

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

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

get_variant_by_version_as_user

object get_variant_by_version_as_user(id, version, response_format=response_format, returned_metadata_fields=returned_metadata_fields)

Retrieve a single variant object by run ID and its version

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.response_format import ResponseFormat
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.VariantSPoTAsUserApi(api_client)
    id = 'id_example' # str | Variant object run ID (runId).
    version = 'version_example' # str | Unique version of the variant object.
    response_format = odm_api.ResponseFormat() # 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)
    returned_metadata_fields = 'returned_metadata_fields_example' # str | 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)

    try:
        # Retrieve a single variant object by run ID and its version
        api_response = api_instance.get_variant_by_version_as_user(id, version, response_format=response_format, returned_metadata_fields=returned_metadata_fields)
        print("The response of VariantSPoTAsUserApi->get_variant_by_version_as_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VariantSPoTAsUserApi->get_variant_by_version_as_user: %s\n" % e)

Parameters

Name Type Description Notes
id str Variant object run ID (runId).
version str Unique version of the variant 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]
returned_metadata_fields str 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

object

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

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

get_variant_group_as_user

VariantMetadataWithId get_variant_group_as_user(id, response_format=response_format, returned_metadata_fields=returned_metadata_fields)

Retrieve a single variant group by ID (groupId)

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.response_format import ResponseFormat
from odm_api.models.variant_metadata_with_id import VariantMetadataWithId
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.VariantSPoTAsUserApi(api_client)
    id = 'id_example' # str | Variant group identifier (groupId).
    response_format = odm_api.ResponseFormat() # 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)
    returned_metadata_fields = 'returned_metadata_fields_example' # str | 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)

    try:
        # Retrieve a single variant group by ID (groupId)
        api_response = api_instance.get_variant_group_as_user(id, response_format=response_format, returned_metadata_fields=returned_metadata_fields)
        print("The response of VariantSPoTAsUserApi->get_variant_group_as_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VariantSPoTAsUserApi->get_variant_group_as_user: %s\n" % e)

Parameters

Name Type Description Notes
id str Variant group identifier (groupId).
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]
returned_metadata_fields str 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

VariantMetadataWithId

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

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

get_variant_group_by_run_as_user

VariantMetadataWithId get_variant_group_by_run_as_user(id, response_format=response_format, returned_metadata_fields=returned_metadata_fields)

Retrieve a single group object by run ID (runId)

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.response_format import ResponseFormat
from odm_api.models.variant_metadata_with_id import VariantMetadataWithId
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.VariantSPoTAsUserApi(api_client)
    id = 'id_example' # str | Unique identifier (runId) of the run.
    response_format = odm_api.ResponseFormat() # 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)
    returned_metadata_fields = 'returned_metadata_fields_example' # str | 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)

    try:
        # Retrieve a single group object by run ID (runId)
        api_response = api_instance.get_variant_group_by_run_as_user(id, response_format=response_format, returned_metadata_fields=returned_metadata_fields)
        print("The response of VariantSPoTAsUserApi->get_variant_group_by_run_as_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VariantSPoTAsUserApi->get_variant_group_by_run_as_user: %s\n" % e)

Parameters

Name Type Description Notes
id str Unique identifier (runId) of the run.
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]
returned_metadata_fields str 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

VariantMetadataWithId

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

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

get_variant_versions_as_user

List[CommitInfo] get_variant_versions_as_user(id)

Retrieve a list of variant object versions by run ID (runId)

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.commit_info import CommitInfo
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.VariantSPoTAsUserApi(api_client)
    id = 'id_example' # str | Variant object run ID (runId).

    try:
        # Retrieve a list of variant object versions by run ID (runId)
        api_response = api_instance.get_variant_versions_as_user(id)
        print("The response of VariantSPoTAsUserApi->get_variant_versions_as_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VariantSPoTAsUserApi->get_variant_versions_as_user: %s\n" % e)

Parameters

Name Type Description Notes
id str Variant object run ID (runId).

Return type

List[CommitInfo]

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 list of object versions. -
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_variant_groups_as_user

ListResponse search_variant_groups_as_user(response_format=response_format, filter=filter, query=query, search_specific_terms=search_specific_terms, returned_metadata_fields=returned_metadata_fields, use_versions=use_versions, page_offset=page_offset, page_limit=page_limit)

Retrieve groups that match a query

Retrieve all group metadata objects that match a query.

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 (\).

Metadata filters

Metadata filters are key-value pairs joined by an operator. The = operator matches literal values/string. The != operator matches anything except the literal value/string. The < or > operators match numerical results that are less or greater than the supplied value. Strings containing whitespace need to be quoted with (").

Combinations

Metadata queries/filters for the same parameter can be combined with &&, AND, || and OR operators, using white-space to separate out the terms and operators. Parentheses ( ) can be used for complex expressions.

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 return all results iterate through pages using pageOffset values of n*pageLimit until the resultsExhausted response field is true.

List operation

This endpoint can be called with no query parameter. Doing so returns a list of all data objects.

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.list_response import ListResponse
from odm_api.models.response_format import ResponseFormat
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.VariantSPoTAsUserApi(api_client)
    response_format = odm_api.ResponseFormat() # 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)
    filter = 'filter_example' # str | Filter by variant metadata (key-value metadata pair(s)). E.g. `\"Variant Source\"=dbSNP`. (optional)
    query = 'query_example' # str | Search for variant objects via a full text query over all variant metadata. E.g. `dbSNP`. Queries matching dictionary terms are automatically expanded to include synonyms. (optional)
    search_specific_terms = True # bool | If the full-text query term is present in an ODM dictionary, enabling this parameter will modify the query to include child terms of the full-text query.  For example, the search query \"Body fluid\" can be expanded to include the term \"Blood\" (a child term of  \"Body fluid\") so files containing either \"Body fluid\" or  \"Blood\"  in their metadata will be returned in the search results.  The parent-child relationship is defined by the key \"broaders\" or \"subClassOf\" in the dictionary.  If the full query term is not present in a dictionary then this parameter has no effect. (optional)
    returned_metadata_fields = 'returned_metadata_fields_example' # str | 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)
    use_versions = 'use_versions_example' # str | 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)
    page_offset = 56 # int | 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)
    page_limit = 56 # int | 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)

    try:
        # Retrieve groups that match a query
        api_response = api_instance.search_variant_groups_as_user(response_format=response_format, filter=filter, query=query, search_specific_terms=search_specific_terms, returned_metadata_fields=returned_metadata_fields, use_versions=use_versions, page_offset=page_offset, page_limit=page_limit)
        print("The response of VariantSPoTAsUserApi->search_variant_groups_as_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VariantSPoTAsUserApi->search_variant_groups_as_user: %s\n" % e)

Parameters

Name Type Description Notes
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]
filter str Filter by variant metadata (key-value metadata pair(s)). E.g. `\"Variant Source\"=dbSNP`. [optional]
query str Search for variant objects via a full text query over all variant metadata. E.g. `dbSNP`. Queries matching dictionary terms are automatically expanded to include synonyms. [optional]
search_specific_terms bool If the full-text query term is present in an ODM dictionary, enabling this parameter will modify the query to include child terms of the full-text query. For example, the search query \"Body fluid\" can be expanded to include the term \"Blood\" (a child term of \"Body fluid\") so files containing either \"Body fluid\" or \"Blood\" in their metadata will be returned in the search results. The parent-child relationship is defined by the key \"broaders\" or \"subClassOf\" in the dictionary. If the full query term is not present in a dictionary then this parameter has no effect. [optional]
returned_metadata_fields str 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]
use_versions str 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]
page_offset int 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]
page_limit int 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]

Return type

ListResponse

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

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

search_variant_runs_as_user

RunsResponse search_variant_runs_as_user(id, cursor=cursor, page_limit=page_limit)

Retrieve run objects related to the given group

Paging

For performance reasons this endpoint returns results in "pages" of limited size together with a cursor tag. To retrieve the next page of results please supply this cursor tag to resume the query from your previous result and get the next page. If there are no more results you will just retrieve an empty result.

Example

  • Api Key Authentication (Access-token):
  • Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.runs_response import RunsResponse
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.VariantSPoTAsUserApi(api_client)
    id = 'id_example' # str | Unique identifier (accession) of the object.
    cursor = 'cursor_example' # str | The page tag to resume results from (see paging above). (optional)
    page_limit = 56 # int | 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)

    try:
        # Retrieve run objects related to the given group
        api_response = api_instance.search_variant_runs_as_user(id, cursor=cursor, page_limit=page_limit)
        print("The response of VariantSPoTAsUserApi->search_variant_runs_as_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VariantSPoTAsUserApi->search_variant_runs_as_user: %s\n" % e)

Parameters

Name Type Description Notes
id str Unique identifier (accession) of the object.
cursor str The page tag to resume results from (see paging above). [optional]
page_limit int 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]

Return type

RunsResponse

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

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