odm_api.BETAAnalyticsOmicsQueriesAsUserApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| cell_ratio_as_user | POST /api/v1/as-user/omics/cells/analytics/cell-ratio | [BETA] Compute cell ratio statistics across groups or metadata attributes in single-cell data. |
| differential_expression_as_user | POST /api/v1/as-user/omics/cells/analytics/differential-expression | [BETA] Perform differential gene expression analytics between case and control cell groups |
| gene_summary_as_user | POST /api/v1/as-user/omics/cells/analytics/gene-summary | [BETA] Compute and retrieve descriptive statistics and visual summaries for single-cell data. |
cell_ratio_as_user¶
CRResponse cell_ratio_as_user(cr_request)
[BETA] Compute cell ratio statistics across groups or metadata attributes in single-cell data.
This endpoint calculates cell ratio statistics based on single-cell metadata.
It allows quantifying the proportion of cells that meet specific criteria (countSelected, e.g. expression threshold, cell type, or cluster)
relative to a defined reference group or the total cell population (countAvailable) defined by study, samples, library, or preparation metadata.
countAvailable parameter returns all cells specified in study, sample, library, or preparation queries and filters.
In case exQuery is selected, only cells linked to cell expression will be counted in countSelected parameter.
The endpoint supports filtering by study, sample, library, or preparation metadata and filtering by cell expression or cell metadata fields.
Request and response parameters are subject to change as this feature is in BETA.
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.cr_request import CRRequest
from odm_api.models.cr_response import CRResponse
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.BETAAnalyticsOmicsQueriesAsUserApi(api_client)
cr_request = odm_api.CRRequest() # CRRequest |
try:
# [BETA] Compute cell ratio statistics across groups or metadata attributes in single-cell data.
api_response = api_instance.cell_ratio_as_user(cr_request)
print("The response of BETAAnalyticsOmicsQueriesAsUserApi->cell_ratio_as_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BETAAnalyticsOmicsQueriesAsUserApi->cell_ratio_as_user: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| cr_request | CRRequest |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: application/json
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | Cell ratio result | - |
| 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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
differential_expression_as_user¶
DEResponse differential_expression_as_user(de_request)
[BETA] Perform differential gene expression analytics between case and control cell groups
This endpoint computes differential gene expression between two specified cell groups (case vs control) within single-cell data.
Consult /omics search endpoints to find description of parameters within the cell groups.
The response includes per-gene metrics that characterize expression differences between the two groups:
- Gene name - gene identifier.
- Case cell count - number of cells expressing the gene in the case group.
- Control cell count - number of cells expressing the gene in the control group.
- Average expression (case) - mean expression level across case cells.
- Average expression (control) - mean expression level across control cells.
- Expression difference - numerical difference between average expressions.
- Fold change - ratio of average expressions between case and control groups.
- U statistic - Mann–Whitney U test statistic that measures the difference between Case and Control groups.
- p-value - the probability of observing results as extreme as (or more extreme than) those obtained, assuming that the null hypothesis is true.
Results are sorted by absolute value of fold change in descending order, allowing easy identification of the most differentially expressed genes.
Request and response parameters are subject to change as this feature is in BETA.
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.de_request import DERequest
from odm_api.models.de_response import DEResponse
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.BETAAnalyticsOmicsQueriesAsUserApi(api_client)
de_request = odm_api.DERequest() # DERequest |
try:
# [BETA] Perform differential gene expression analytics between case and control cell groups
api_response = api_instance.differential_expression_as_user(de_request)
print("The response of BETAAnalyticsOmicsQueriesAsUserApi->differential_expression_as_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BETAAnalyticsOmicsQueriesAsUserApi->differential_expression_as_user: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| de_request | DERequest |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: application/json
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | Differential expression result | - |
| 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. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
gene_summary_as_user¶
GSResponse gene_summary_as_user(gs_request)
[BETA] Compute and retrieve descriptive statistics and visual summaries for single-cell data.
This endpoint provides descriptive statistical metrics for gene expression across single-cell datasets. It aggregates and summarizes expression data for each gene to help assess variability, distribution, and intensity of expression within the population of cells.
The computed metrics include:
- Gene name - gene identifier.
- Cell count - number of cells with measurable expression for each gene.
- Mean expression value
- Median expression value
- Quantiles - configurable expression percentiles.
- Histogram (density) - binned distribution of expression levels for visualization.
- Standard deviation - dispersion of expression values.
- Minimum and maximum values - range of expression across cells.
Results are sorted by gene name.
Request and response parameters are subject to change as this feature is in BETA.
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.gs_request import GSRequest
from odm_api.models.gs_response import GSResponse
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.BETAAnalyticsOmicsQueriesAsUserApi(api_client)
gs_request = odm_api.GSRequest() # GSRequest |
try:
# [BETA] Compute and retrieve descriptive statistics and visual summaries for single-cell data.
api_response = api_instance.gene_summary_as_user(gs_request)
print("The response of BETAAnalyticsOmicsQueriesAsUserApi->gene_summary_as_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BETAAnalyticsOmicsQueriesAsUserApi->gene_summary_as_user: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| gs_request | GSRequest |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: application/json
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | Gene summary result | - |
| 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]