All URIs are relative to http://localhost:8080
| Method | HTTP request | Description |
|---|---|---|
| add_compounds | POST /api/projects/{projectId}/compounds | Import Compounds and its contained features. |
| delete_compound | DELETE /api/projects/{projectId}/compounds/{compoundId} | Delete compound (group of ion identities) with the given identifier (and the included features) from the specified project-space. |
| get_compound | GET /api/projects/{projectId}/compounds/{compoundId} | Get compound (group of ion identities) with the given identifier from the specified project-space. |
| get_compounds | GET /api/projects/{projectId}/compounds | List of all available compounds (group of ion identities) in the given project-space. |
| get_compounds_paged | GET /api/projects/{projectId}/compounds/page | Page of available compounds (group of ion identities) in the given project-space. |
List[Compound] add_compounds(project_id, compound_import, profile=profile, opt_fields=opt_fields, opt_fields_features=opt_fields_features)
Import Compounds and its contained features.
Import Compounds and its contained features. Compounds and Features must not exist in the project. Otherwise, they will exist twice.
import PySirius
from PySirius.models.aligned_feature_opt_field import AlignedFeatureOptField
from PySirius.models.compound import Compound
from PySirius.models.compound_import import CompoundImport
from PySirius.models.compound_opt_field import CompoundOptField
from PySirius.models.instrument_profile import InstrumentProfile
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.CompoundsApi(api_client)
project_id = 'project_id_example' # str | project-space to import into.
compound_import = [PySirius.CompoundImport()] # List[CompoundImport] | the compound data to be imported
profile = PySirius.InstrumentProfile() # InstrumentProfile | profile describing the instrument used to measure the data. Used to merge spectra. (optional)
opt_fields = ["none"] # List[CompoundOptField] | set of optional fields to be included. Use 'none' to override defaults. (optional) (default to ["none"])
opt_fields_features = ["none"] # List[AlignedFeatureOptField] | set of optional fields of the nested features to be included. Use 'none' to override defaults. (optional) (default to ["none"])
try:
# Import Compounds and its contained features.
api_response = api_instance.add_compounds(project_id, compound_import, profile=profile, opt_fields=opt_fields, opt_fields_features=opt_fields_features)
print("The response of CompoundsApi->add_compounds:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CompoundsApi->add_compounds: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | project-space to import into. | |
| compound_import | List[CompoundImport] | the compound data to be imported | |
| profile | InstrumentProfile | profile describing the instrument used to measure the data. Used to merge spectra. | [optional] |
| opt_fields | List[CompoundOptField] | set of optional fields to be included. Use 'none' to override defaults. | [optional] [default to ["none"]] |
| opt_fields_features | List[AlignedFeatureOptField] | set of optional fields of the nested features to be included. Use 'none' to override defaults. | [optional] [default to ["none"]] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | the Compounds that have been imported with specified optional fields | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_compound(project_id, compound_id)
Delete compound (group of ion identities) with the given identifier (and the included features) from the specified project-space.
Delete compound (group of ion identities) with the given identifier (and the included features) from the specified project-space.
import PySirius
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.CompoundsApi(api_client)
project_id = 'project_id_example' # str | project-space to delete from.
compound_id = 'compound_id_example' # str | identifier of the compound to delete.
try:
# Delete compound (group of ion identities) with the given identifier (and the included features) from the specified project-space.
api_instance.delete_compound(project_id, compound_id)
except Exception as e:
print("Exception when calling CompoundsApi->delete_compound: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | project-space to delete from. | |
| compound_id | str | identifier of the compound to delete. |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Compound get_compound(project_id, compound_id, ms_data_search_prepared=ms_data_search_prepared, opt_fields=opt_fields, opt_fields_features=opt_fields_features)
Get compound (group of ion identities) with the given identifier from the specified project-space.
Get compound (group of ion identities) with the given identifier from the specified project-space.
import PySirius
from PySirius.models.aligned_feature_opt_field import AlignedFeatureOptField
from PySirius.models.compound import Compound
from PySirius.models.compound_opt_field import CompoundOptField
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.CompoundsApi(api_client)
project_id = 'project_id_example' # str | project-space to read from.
compound_id = 'compound_id_example' # str | identifier of the compound (group of ion identities) to access.
ms_data_search_prepared = False # bool | Returns all fragment spectra in a preprocessed form as used for fast Cosine/Modified Cosine computation. Gives you spectra compatible with SpectralLibraryMatch peak assignments and reference spectra. (optional) (default to False)
opt_fields = ["none"] # List[CompoundOptField] | set of optional fields to be included. Use 'none' only to override defaults. (optional) (default to ["none"])
opt_fields_features = ["none"] # List[AlignedFeatureOptField] | (optional) (default to ["none"])
try:
# Get compound (group of ion identities) with the given identifier from the specified project-space.
api_response = api_instance.get_compound(project_id, compound_id, ms_data_search_prepared=ms_data_search_prepared, opt_fields=opt_fields, opt_fields_features=opt_fields_features)
print("The response of CompoundsApi->get_compound:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CompoundsApi->get_compound: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | project-space to read from. | |
| compound_id | str | identifier of the compound (group of ion identities) to access. | |
| ms_data_search_prepared | bool | Returns all fragment spectra in a preprocessed form as used for fast Cosine/Modified Cosine computation. Gives you spectra compatible with SpectralLibraryMatch peak assignments and reference spectra. | [optional] [default to False] |
| opt_fields | List[CompoundOptField] | set of optional fields to be included. Use 'none' only to override defaults. | [optional] [default to ["none"]] |
| opt_fields_features | List[AlignedFeatureOptField] | [optional] [default to ["none"]] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Compounds with additional optional fields (if specified). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[Compound] get_compounds(project_id, ms_data_search_prepared=ms_data_search_prepared, opt_fields=opt_fields, opt_fields_features=opt_fields_features)
List of all available compounds (group of ion identities) in the given project-space.
List of all available compounds (group of ion identities) in the given project-space.
import PySirius
from PySirius.models.aligned_feature_opt_field import AlignedFeatureOptField
from PySirius.models.compound import Compound
from PySirius.models.compound_opt_field import CompoundOptField
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.CompoundsApi(api_client)
project_id = 'project_id_example' # str | project-space to read from.
ms_data_search_prepared = False # bool | Returns all fragment spectra in a preprocessed form as used for fast Cosine/Modified Cosine computation. Gives you spectra compatible with SpectralLibraryMatch peak assignments and reference spectra. (optional) (default to False)
opt_fields = ["none"] # List[CompoundOptField] | set of optional fields to be included. Use 'none' only to override defaults. (optional) (default to ["none"])
opt_fields_features = ["none"] # List[AlignedFeatureOptField] | (optional) (default to ["none"])
try:
# List of all available compounds (group of ion identities) in the given project-space.
api_response = api_instance.get_compounds(project_id, ms_data_search_prepared=ms_data_search_prepared, opt_fields=opt_fields, opt_fields_features=opt_fields_features)
print("The response of CompoundsApi->get_compounds:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CompoundsApi->get_compounds: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | project-space to read from. | |
| ms_data_search_prepared | bool | Returns all fragment spectra in a preprocessed form as used for fast Cosine/Modified Cosine computation. Gives you spectra compatible with SpectralLibraryMatch peak assignments and reference spectra. | [optional] [default to False] |
| opt_fields | List[CompoundOptField] | set of optional fields to be included. Use 'none' only to override defaults. | [optional] [default to ["none"]] |
| opt_fields_features | List[AlignedFeatureOptField] | [optional] [default to ["none"]] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Compounds with additional optional fields (if specified). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PagedModelCompound get_compounds_paged(project_id, page=page, size=size, sort=sort, ms_data_search_prepared=ms_data_search_prepared, opt_fields=opt_fields, opt_fields_features=opt_fields_features)
Page of available compounds (group of ion identities) in the given project-space.
Page of available compounds (group of ion identities) in the given project-space.
import PySirius
from PySirius.models.aligned_feature_opt_field import AlignedFeatureOptField
from PySirius.models.compound_opt_field import CompoundOptField
from PySirius.models.paged_model_compound import PagedModelCompound
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.CompoundsApi(api_client)
project_id = 'project_id_example' # str | project-space to read from.
page = 0 # int | Zero-based page index (0..N) (optional) (default to 0)
size = 20 # int | The size of the page to be returned (optional) (default to 20)
sort = ['sort_example'] # List[str] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)
ms_data_search_prepared = False # bool | Returns all fragment spectra in a preprocessed form as used for fast Cosine/Modified Cosine computation. Gives you spectra compatible with SpectralLibraryMatch peak assignments and reference spectra. (optional) (default to False)
opt_fields = ["none"] # List[CompoundOptField] | set of optional fields to be included. Use 'none' only to override defaults. (optional) (default to ["none"])
opt_fields_features = ["none"] # List[AlignedFeatureOptField] | (optional) (default to ["none"])
try:
# Page of available compounds (group of ion identities) in the given project-space.
api_response = api_instance.get_compounds_paged(project_id, page=page, size=size, sort=sort, ms_data_search_prepared=ms_data_search_prepared, opt_fields=opt_fields, opt_fields_features=opt_fields_features)
print("The response of CompoundsApi->get_compounds_paged:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CompoundsApi->get_compounds_paged: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | project-space to read from. | |
| page | int | Zero-based page index (0..N) | [optional] [default to 0] |
| size | int | The size of the page to be returned | [optional] [default to 20] |
| sort | List[str] | Sorting criteria in the format: property,(asc | desc). Default sort order is ascending. Multiple sort criteria are supported. |
| ms_data_search_prepared | bool | Returns all fragment spectra in a preprocessed form as used for fast Cosine/Modified Cosine computation. Gives you spectra compatible with SpectralLibraryMatch peak assignments and reference spectra. | [optional] [default to False] |
| opt_fields | List[CompoundOptField] | set of optional fields to be included. Use 'none' only to override defaults. | [optional] [default to ["none"]] |
| opt_fields_features | List[AlignedFeatureOptField] | [optional] [default to ["none"]] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Compounds with additional optional fields (if specified). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]