Skip to content

get_read_set async

get_read_set(
    id: ReadSetId,
    sequence_store_id: SequenceStoreId,
    part_number: int,
    *,
    config_overrides: Optional[AsyncOmicsClientConfig] = None,
    file: Optional[ReadSetFile] = None,
) -> AsyncGenerator[GetReadSetResponse]

Retrieves detailed information from parts of a read set and returns the read set in the same format that it was uploaded. You must have read sets uploaded to your sequence store in order to run this operation.

Parameters:

  • id (ReadSetId) –

    The read set's ID.

  • sequence_store_id (SequenceStoreId) –

    The read set's sequence store ID.

  • file (Optional[ReadSetFile], default: None ) –

    The file to retrieve.

  • part_number (int) –

    The part number to retrieve.

Raises:

Source code in docs_src/capo_omics/_services/async_omics.py
@asynccontextmanager
async def get_read_set(
    self,
    id: "capo_omics.types.read_set_id.ReadSetId",
    sequence_store_id: "capo_omics.types.sequence_store_id.SequenceStoreId",
    part_number: int,
    *,
    config_overrides: Optional[AsyncOmicsClientConfig] = None,
    file: Optional["capo_omics.types.read_set_file.ReadSetFile"] = None,
) -> "AsyncGenerator[capo_omics.types.get_read_set_response.GetReadSetResponse]":
    """<p>Retrieves detailed information from parts of a read set and returns the read set in the same format that it was uploaded. You must have read sets uploaded to your sequence store in order to run this operation.</p>

    Args:
        id: <p>The read set's ID.</p>
        sequence_store_id: <p>The read set's sequence store ID.</p>
        file: <p>The file to retrieve.</p>
        part_number: <p>The part number to retrieve.</p>

    Raises:
        capo_omics.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_omics.errors.conflict_exception.ConflictException: <p>The request cannot be applied to the target resource in its current state.</p>
        capo_omics.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred. Try the request again.</p>
        capo_omics.errors.range_not_satisfiable_exception.RangeNotSatisfiableException: <p>The ranges specified in the request are not valid.</p>
        capo_omics.errors.request_timeout_exception.RequestTimeoutException: <p>The request timed out.</p>
        capo_omics.errors.resource_not_found_exception.ResourceNotFoundException: <p>The target resource was not found in the current Region.</p>
        capo_omics.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_omics.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_omics.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_omics.types.get_read_set_request.GetReadSetRequest]",
    ) -> AsyncOperationResponse[
        "capo_omics.types.get_read_set_response.GetReadSetResponse"
    ]:
        import capo_omics._operations.omics.get_read_set

        (
            output,
            http_response,
        ) = await capo_omics._operations.omics.get_read_set.async_get_read_set(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_omics.types.get_read_set_response.GetReadSetResponse",
    ) -> dict[str, Any]:
        import capo_omics.types.get_read_set_response

        return capo_omics.types.get_read_set_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetReadSet", redact_output=_redact_output),
    )
    input_: capo_omics.types.get_read_set_request.GetReadSetRequest = {
        "id": id,
        "sequence_store_id": sequence_store_id,
        "part_number": part_number,
    }
    if file is not None:
        input_["file"] = file

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    try:
        yield response.output
    finally:
        await response.response.aclose()