odm_api.DataImportViaDirectFileUploadApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| start_import_a_file_multipart | POST /api/v1/jobs/import/file/multipart | Import a file as an attachment, optionally with a separate TSV metadata file via multipart/form-data upload |
| start_import_cells_multipart | POST /api/v1/jobs/import/cells/multipart | Import a group of cell data objects from a TSV file via multipart/form-data upload |
| start_import_expression_multipart | POST /api/v1/jobs/import/expression/multipart | Import a TSV file containing any tabular data, optionally with a separate TSV metadata file via multipart/form-data upload |
| start_import_flow_cytometry_multipart | POST /api/v1/jobs/import/flow-cytometry/multipart | Import a FACS file containing flow-cytometry data, optionally with a separate TSV metadata file via multipart/form-data upload |
| start_import_libraries_multipart | POST /api/v1/jobs/import/libraries/multipart | Import a group of library metadata objects from a TSV file via multipart/form-data upload |
| start_import_preparations_multipart | POST /api/v1/jobs/import/preparations/multipart | Import a group of preparation metadata objects from a TSV file via multipart/form-data upload |
| start_import_samples_multipart | POST /api/v1/jobs/import/samples/multipart | Import a group of sample metadata objects from a TSV file via multipart/form-data upload |
| start_import_variant_multipart | POST /api/v1/jobs/import/variant/multipart | Import a VCF file containing variant data, optionally with a separate TSV metadata file via multipart/form-data |
start_import_a_file_multipart¶
Info start_import_a_file_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_accession=study_accession, data_class=data_class, metadata_file=metadata_file)
Import a file as an attachment, optionally with a separate TSV metadata file via multipart/form-data upload
In order to import a file as an attachment to a study, please fill in the following fields:
data- a file to import as an attachment. The file will be associated with a study and will be searchable by its name and metadata.metadata- an optional metadata file to be used as the original metadata for the created objects. The file must contain a single record describing the uploaded attachment.studyAccession- an accession of a study the file will be associated with.dataClass- file data class with the following possible values:Bulk transcriptomics,Single-cell transcriptomics,Differential abundance (FC, pval, etc.),Pathway analysis,Proteomics,Single-cell proteomics,Metabolomics,Lipidomics,Epigenomics,DNA methylation,Chemoinformatics,Imaging features,Gene panel data,Biomarker data,Physical measures,Blood counts,Other body fluid counts,Long-read sequencing (Nanopore, PacBio),Flow Cytometry (FCS),Spatial transcriptomics,Phenomics,Copy number alterations,Microbiome / Metagenomics,Immune repertoire,Genetic screens (CRISPR / RNAi),Cell imaging,Document,Other.
When job finishes successfully the following result object can be obtained using GET /job/{id}/output request:
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.info import Info
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.DataImportViaDirectFileUploadApi(api_client)
file = None # bytearray | A file to import as an attachment. The file will be associated with a study and will be searchable by its name and metadata.
source_attachment_accession = 'source_attachment_accession_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_name = 'transformation_name_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_version = 'transformation_version_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
study_accession = 'study_accession_example' # str | An accession of a study the file will be associated with. (optional)
data_class = 'data_class_example' # str | A mandatory parameter with the value from a limited set of values (see request description). (optional)
metadata_file = None # bytearray | The metadata file to be used as the original metadata for the created objects. The file must contain a single record describing the uploaded attachment. (optional)
try:
# Import a file as an attachment, optionally with a separate TSV metadata file via multipart/form-data upload
api_response = api_instance.start_import_a_file_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_accession=study_accession, data_class=data_class, metadata_file=metadata_file)
print("The response of DataImportViaDirectFileUploadApi->start_import_a_file_multipart:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataImportViaDirectFileUploadApi->start_import_a_file_multipart: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytearray | A file to import as an attachment. The file will be associated with a study and will be searchable by its name and metadata. | |
| source_attachment_accession | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_name | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_version | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| study_accession | str | An accession of a study the file will be associated with. | [optional] |
| data_class | str | A mandatory parameter with the value from a limited set of values (see request description). | [optional] |
| metadata_file | bytearray | The metadata file to be used as the original metadata for the created objects. The file must contain a single record describing the uploaded attachment. | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_import_cells_multipart¶
Info start_import_cells_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id)
Import a group of cell data objects from a TSV file via multipart/form-data upload
The endpoint initiates a job to import cell data and creates a Cell Group to manage it.
When job finishes successfully the following result object can be obtained using GET /job/{id}/output request:
Embedding constraints:
- UMAP/t-SNE
- Allowed number of dimensions per cell: 0 (absent) or ≥ 2.
- If exactly 1 UMAP/t-SNE dimension is provided, the request is invalid.
-
At most 3 UMAP/t-SNE dimensions are stored; if more than 3 are provided, only the first 3 are kept and the rest are ignored.
-
PCA
- Allowed number of components per cell: 0 (absent) or ≥ 2.
- If exactly 1 PCA component is provided, the request is invalid.
- At most 100 PCA components are stored; components beyond 100 are ignored.
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.info import Info
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.DataImportViaDirectFileUploadApi(api_client)
file = None # bytearray |
source_attachment_accession = 'source_attachment_accession_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_name = 'transformation_name_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_version = 'transformation_version_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
study_id = 'study_id_example' # str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. (optional)
try:
# Import a group of cell data objects from a TSV file via multipart/form-data upload
api_response = api_instance.start_import_cells_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id)
print("The response of DataImportViaDirectFileUploadApi->start_import_cells_multipart:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataImportViaDirectFileUploadApi->start_import_cells_multipart: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytearray | ||
| source_attachment_accession | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_name | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_version | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| study_id | str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_import_expression_multipart¶
Info start_import_expression_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id, previous_version=previous_version, number_of_feature_attributes=number_of_feature_attributes, data_class=data_class, measurement_separator=measurement_separator, metadata_file=metadata_file)
Import a TSV file containing any tabular data, optionally with a separate TSV metadata file via multipart/form-data upload
File¶
This operation necessitates a tabular data file. Consult the user guide for a comprehensive understanding of the file content requirements. The endpoint is capable of handling uploads of any data type, which can be detailed in the parameters section, not only Gene Expression data.
MetadataFile¶
It is also possible to optionally provide a metadata file. This metadata will be used as the original metadata for the created objects. The file is expected to contain single record with metadata describing the uploaded signal file.
File format¶
- Format: Tab-separated format (TSV), attribute names and record values are separated with tabs (
U+0009), lines are separated withCRLFsequence (U+000D U+000A) - Extension:
.zip,.gz,.br,.lz4are supported, treated as archives and get decompressed - Header: the first line is treated as table header that contains attribute names
- Records: the second line contains the values for each of the attributes described in the header line. Values represent single string or list of strings. List values are separated using the "pipe"
|(U+007C) separator. Values are trimmed of whitespace before parsing, and a literal|(U+007C) character may be escaped by repeating it twice. - Skip zeros in original data file: If this option is selected, zeros in the file will be ignored, thus conserving time and space. This option is particularly useful for handling very sparse data such as Single Cell data.
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.info import Info
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.DataImportViaDirectFileUploadApi(api_client)
file = None # bytearray |
source_attachment_accession = 'source_attachment_accession_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_name = 'transformation_name_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_version = 'transformation_version_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
study_id = 'study_id_example' # str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. (optional)
template_id = 'template_id_example' # str | (optional)
previous_version = 'previous_version_example' # str | (optional)
number_of_feature_attributes = 56 # int | Integer value that specifies the number of columns related to the feature in the uploaded data frame, and indicates the starting position of the sample data. This attribute is not needed if the uploaded file is in GCT format. (optional)
data_class = 'data_class_example' # str | A mandatory parameter with the following possible values: `Bulk transcriptomics`, `Single-cell transcriptomics`, `Differential abundance (FC, pval, etc.)`, `Pathway analysis`, `Proteomics`, `Single-cell proteomics`, `Metabolomics`, `Lipidomics`, `Epigenomics`, `DNA methylation`, `Chemoinformatics`, `Imaging features`, `Gene panel data`, `Biomarker data`, `Physical measures`, `Blood counts`, `Other body fluid counts`, `Long-read sequencing (Nanopore, PacBio)`, `Flow Cytometry (FCS)`, `Spatial transcriptomics`, `Phenomics`, `Copy number alterations`, `Microbiome / Metagenomics`, `Immune repertoire`, `Genetic screens (CRISPR / RNAi)`, `Cell imaging`, `Document`, `Other`. In case the parameter is not set the dataClass is automatically defined as `Other`. (optional)
measurement_separator = 'measurement_separator_example' # str | This parameter is necessary when your file contains multiple measurement columns for each sample, library, or preparation. It represents the character that distinguishes the sample/library/preparation name from the measurement name in column headers. Supported separators include `. , : ; _ - / \\\\ |`, with the allowance for multi-character separators. (optional)
metadata_file = None # bytearray | (optional)
try:
# Import a TSV file containing any tabular data, optionally with a separate TSV metadata file via multipart/form-data upload
api_response = api_instance.start_import_expression_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id, previous_version=previous_version, number_of_feature_attributes=number_of_feature_attributes, data_class=data_class, measurement_separator=measurement_separator, metadata_file=metadata_file)
print("The response of DataImportViaDirectFileUploadApi->start_import_expression_multipart:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataImportViaDirectFileUploadApi->start_import_expression_multipart: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytearray | ||
| source_attachment_accession | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_name | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_version | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| study_id | str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. | [optional] |
| template_id | str | [optional] | |
| previous_version | str | [optional] | |
| number_of_feature_attributes | int | Integer value that specifies the number of columns related to the feature in the uploaded data frame, and indicates the starting position of the sample data. This attribute is not needed if the uploaded file is in GCT format. | [optional] |
| data_class | str | A mandatory parameter with the following possible values: `Bulk transcriptomics`, `Single-cell transcriptomics`, `Differential abundance (FC, pval, etc.)`, `Pathway analysis`, `Proteomics`, `Single-cell proteomics`, `Metabolomics`, `Lipidomics`, `Epigenomics`, `DNA methylation`, `Chemoinformatics`, `Imaging features`, `Gene panel data`, `Biomarker data`, `Physical measures`, `Blood counts`, `Other body fluid counts`, `Long-read sequencing (Nanopore, PacBio)`, `Flow Cytometry (FCS)`, `Spatial transcriptomics`, `Phenomics`, `Copy number alterations`, `Microbiome / Metagenomics`, `Immune repertoire`, `Genetic screens (CRISPR / RNAi)`, `Cell imaging`, `Document`, `Other`. In case the parameter is not set the dataClass is automatically defined as `Other`. | [optional] |
| measurement_separator | str | This parameter is necessary when your file contains multiple measurement columns for each sample, library, or preparation. It represents the character that distinguishes the sample/library/preparation name from the measurement name in column headers. Supported separators include `. , : ; _ - / \\ | `, with the allowance for multi-character separators. |
| metadata_file | bytearray | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_import_flow_cytometry_multipart¶
Info start_import_flow_cytometry_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id, previous_version=previous_version, metadata_file=metadata_file)
Import a FACS file containing flow-cytometry data, optionally with a separate TSV metadata file via multipart/form-data upload
This operation necessitates a gated flow cytometry data file, which must be in FACS format. Consult the user guide for a comprehensive understanding of the file content requirements. For flow cytometry data in FCS format use expression endpoint.
When job finishes successfully the following result object
can be obtained using GET /job/{id}/output request:
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.info import Info
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.DataImportViaDirectFileUploadApi(api_client)
file = None # bytearray |
source_attachment_accession = 'source_attachment_accession_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_name = 'transformation_name_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_version = 'transformation_version_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
study_id = 'study_id_example' # str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. (optional)
template_id = 'template_id_example' # str | (optional)
previous_version = 'previous_version_example' # str | (optional)
metadata_file = None # bytearray | (optional)
try:
# Import a FACS file containing flow-cytometry data, optionally with a separate TSV metadata file via multipart/form-data upload
api_response = api_instance.start_import_flow_cytometry_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id, previous_version=previous_version, metadata_file=metadata_file)
print("The response of DataImportViaDirectFileUploadApi->start_import_flow_cytometry_multipart:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataImportViaDirectFileUploadApi->start_import_flow_cytometry_multipart: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytearray | ||
| source_attachment_accession | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_name | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_version | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| study_id | str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. | [optional] |
| template_id | str | [optional] | |
| previous_version | str | [optional] | |
| metadata_file | bytearray | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_import_libraries_multipart¶
Info start_import_libraries_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id)
Import a group of library metadata objects from a TSV file via multipart/form-data upload
When job finishes successfully the following result object can be obtained using GET /job/{id}/output request:
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.info import Info
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.DataImportViaDirectFileUploadApi(api_client)
file = None # bytearray |
source_attachment_accession = 'source_attachment_accession_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_name = 'transformation_name_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_version = 'transformation_version_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
study_id = 'study_id_example' # str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. (optional)
template_id = 'template_id_example' # str | (optional)
try:
# Import a group of library metadata objects from a TSV file via multipart/form-data upload
api_response = api_instance.start_import_libraries_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id)
print("The response of DataImportViaDirectFileUploadApi->start_import_libraries_multipart:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataImportViaDirectFileUploadApi->start_import_libraries_multipart: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytearray | ||
| source_attachment_accession | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_name | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_version | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| study_id | str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. | [optional] |
| template_id | str | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_import_preparations_multipart¶
Info start_import_preparations_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id)
Import a group of preparation metadata objects from a TSV file via multipart/form-data upload
When job finishes successfully the following result object can be obtained using GET /job/{id}/output request:
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.info import Info
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.DataImportViaDirectFileUploadApi(api_client)
file = None # bytearray |
source_attachment_accession = 'source_attachment_accession_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_name = 'transformation_name_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_version = 'transformation_version_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
study_id = 'study_id_example' # str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. (optional)
template_id = 'template_id_example' # str | (optional)
try:
# Import a group of preparation metadata objects from a TSV file via multipart/form-data upload
api_response = api_instance.start_import_preparations_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id)
print("The response of DataImportViaDirectFileUploadApi->start_import_preparations_multipart:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataImportViaDirectFileUploadApi->start_import_preparations_multipart: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytearray | ||
| source_attachment_accession | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_name | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_version | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| study_id | str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. | [optional] |
| template_id | str | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_import_samples_multipart¶
Info start_import_samples_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id)
Import a group of sample metadata objects from a TSV file via multipart/form-data upload
When job finishes successfully the following result object can be obtained using GET /job/{id}/output request:
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.info import Info
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.DataImportViaDirectFileUploadApi(api_client)
file = None # bytearray |
source_attachment_accession = 'source_attachment_accession_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_name = 'transformation_name_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_version = 'transformation_version_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
study_id = 'study_id_example' # str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. (optional)
template_id = 'template_id_example' # str | (optional)
try:
# Import a group of sample metadata objects from a TSV file via multipart/form-data upload
api_response = api_instance.start_import_samples_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id)
print("The response of DataImportViaDirectFileUploadApi->start_import_samples_multipart:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataImportViaDirectFileUploadApi->start_import_samples_multipart: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytearray | ||
| source_attachment_accession | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_name | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_version | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| study_id | str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. | [optional] |
| template_id | str | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_import_variant_multipart¶
Info start_import_variant_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id, previous_version=previous_version, metadata_file=metadata_file)
Import a VCF file containing variant data, optionally with a separate TSV metadata file via multipart/form-data
When job finishes successfully the following result object can be obtained using GET /job/{id}/output request:
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.info import Info
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.DataImportViaDirectFileUploadApi(api_client)
file = None # bytearray |
source_attachment_accession = 'source_attachment_accession_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_name = 'transformation_name_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
transformation_version = 'transformation_version_example' # str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. (optional)
study_id = 'study_id_example' # str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. (optional)
template_id = 'template_id_example' # str | (optional)
previous_version = 'previous_version_example' # str | (optional)
metadata_file = None # bytearray | (optional)
try:
# Import a VCF file containing variant data, optionally with a separate TSV metadata file via multipart/form-data
api_response = api_instance.start_import_variant_multipart(file, source_attachment_accession=source_attachment_accession, transformation_name=transformation_name, transformation_version=transformation_version, study_id=study_id, template_id=template_id, previous_version=previous_version, metadata_file=metadata_file)
print("The response of DataImportViaDirectFileUploadApi->start_import_variant_multipart:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataImportViaDirectFileUploadApi->start_import_variant_multipart: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| file | bytearray | ||
| source_attachment_accession | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_name | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| transformation_version | str | The property is automatically populated by the attachment transformation pipeline and must not be provided during regular multipart uploads. | [optional] |
| study_id | str | The ID (accession) of the study for organising files in the internal storage; linking to the target entity must be done through a separate endpoint. | [optional] |
| template_id | str | [optional] | |
| previous_version | str | [optional] | |
| metadata_file | bytearray | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]