Python package reference¶
Prepare H&E slides on your own machine, submit them to Aurora, and read the spatial gene expression it predicts.
These pages were built from version 0.1.0.dev7 of the package, which is unreleased. The last published version is 0.1.0.dev6, and a call on these pages may be missing from it. auroraomics --version prints the one you have.
The reference covers the public calls used in the guides. On your machine it opens a slide, checks and packs its tiles, embeds them and writes a result. Packing reads the service's quality standard without a key; embedding needs one. From Python, a shell or an agent it calls the hosted API with a key.
Install and prepare a slide walks through the basic workflow.
A plain install carries everything the documented path needs, and no deep-learning framework. Embedding tiles on your own machine takes the embed extra.
To send a slide without writing code, upload it on the website with Aurora Direct. From code, import auroraomics as ao gives you these names:
| Name | What it is |
|---|---|
ao.AuroraomicsError |
Base for everything this package raises deliberately. |
ao.Client |
A credential, a deployment, and the public API over both. |
ao.Job |
One prediction job: its last known state, and the ways to move it forward. |
ao.QcThresholds |
Quality settings supplied by Aurora for checking tiles. |
ao.Tile |
One tile: an RGB uint8 image and its position on the slide. |
ao.bulk_rna |
Prepare a bulk RNA profile as the table the bulk_rna covariate takes. |
ao.embed_tiles |
Embed the tiles of one slide and write the embeddings container. |
ao.login |
Sign in with an emailed code, accept the Terms, and store an API key on this machine. |
ao.open_slide |
Open a slide at full resolution, ready to be cut into tiles. |
ao.pack_tiles |
Write the tiles that pass quality control into one archive. |
ao.qc_tile |
Check whether a tile is suitable for prediction and report the result. |
ao.read_archive |
Validate an archive and return it, open for reading. |
ao.resolve_encoder |
Select a compatible local image model from Aurora's catalogue. |
ao.subsample_spatial_square |
Choose at most max_items of the given points, as a boolean mask. |
ao.write_result |
Write one result file and return its path. |
Opening a slide¶
The first step of both journeys: open the file, read its resolution, and hand back something the packers can cut, decoding only the squares they ask for.
auroraomics.slide ¶
SlideError ¶
Bases: AuroraomicsError, ValueError
Slide ¶
open_slide ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
The slide file. Any pyramidal or plain TIFF this package's reader can
open, which includes the |
required |
mpp
|
float | None
|
Micrometres per pixel, when the caller knows it. It OVERRIDES what the file records, because a converted file can carry a resolution its converter invented, and it is required when the file records none — this refuses rather than assuming a value. What the file recorded is still read, and kept on the slide as
|
None
|
series
|
int
|
Which image in the file. |
0
|
Returns:
| Type | Description |
|---|---|
Slide
|
Open. Use it as a context manager, or close it when the packing is done. |
Raises:
| Type | Description |
|---|---|
SlideError
|
If the reader is not installed, the file cannot be opened, the series is not a colour image, or no resolution was recorded and none was given. |
Warns:
| Type | Description |
|---|---|
UserWarning
|
If the file is stored as one compressed segment, or in segments so coarse that no two windows can share a decode. Those are the layouts where a window costs most of the image, and the ones this cannot make cheap. The module's own page lists the three layouts, what each costs, and the memory map that routes around this one. |
Quality control¶
Whether a tile is worth predicting on. Every tile a model reads has passed this check, and a rejected tile reports why.
Packing tiles¶
Build the patches archive a prediction takes, and check one you have
received.
auroraomics.pack ¶
PackError ¶
Bases: AuroraomicsError, ValueError
ArchiveError ¶
Bases: AuroraomicsError, ValueError
Tile
dataclass
¶
PackReport
dataclass
¶
Rejection
dataclass
¶
PatchArchive ¶
pack_tiles ¶
pack_tiles(tiles: Any, out_zip: str | Path, *, mpp: float, thresholds: QcThresholds, patch_um: float | None = None, centers: Iterable[tuple[int, int]] | None = None, resize_px: int | None = None, thumbnail: ndarray | None = None, max_items: int | None = None) -> PackReport
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tiles
|
Any
|
A slide: anything with a Or the tiles themselves: any iterable of Tile, consumed lazily and one at a time, for a caller who cuts them from something this package cannot open. |
required |
out_zip
|
str | Path
|
Where to write. An existing file is replaced. |
required |
mpp
|
float
|
Micrometres per pixel of the tiles, at the resolution they were cut. Recorded for every tile: without it a tile is a picture of unknown physical size and no model can be matched to it. |
required |
patch_um
|
float | None
|
The physical edge of one tile, in micrometres. Required when cutting from a slide and meaningless otherwise — tiles you hand in are already cut, and a size declared over them would be a second opinion about their own pixels — so passing it with tiles is refused rather than ignored. It is a property of the model you intend to submit to, not of your slide: it is what makes tiles cut from scans at two different resolutions the same measurement. |
None
|
centers
|
Iterable[tuple[int, int]] | None
|
Tile centres as |
None
|
resize_px
|
int | None
|
The square, in pixels, the model reads each tile at, which the model's
card states beside |
None
|
thresholds
|
QcThresholds
|
Quality-control floors, from the service that will run the submission (Client.qc_thresholds). Required, with no default: they are the service's, and the same for every model. They are recorded in the archive, so the file says which floors made it. |
required |
thumbnail
|
ndarray | None
|
An optional RGB overview image, written as the container's thumbnail. Any metadata it carries is dropped, as for every tile. |
None
|
max_items
|
int | None
|
The most tiles to write. Omitted, the cap the shipped registry states for this input kind — the number the service refuses OVER rather than trimming to, so a slide that would produce an archive no submission can carry stops here rather than after the upload. Pass a number for a deployment whose cap differs. The bound lives on this side and not in read_archive because this function has exactly one kind of caller: whoever is building a submission. Nothing on the serving side packs, so a cap here can never fire in front of a service's own refusal and take its wording with it. |
None
|
Returns:
| Type | Description |
|---|---|
PackReport
|
Counts, plus one Rejection per dropped tile naming the threshold that dropped it. A caller that gets an unexpectedly small archive can see immediately whether the slide was empty, a centre was off the edge, or a threshold was wrong. |
Warns:
| Type | Description |
|---|---|
UserWarning
|
When the slide file records a resolution that cuts a different tile from the one this run declares, and when the model's square is given and each tile will be enlarged three times or more to reach it. |
Raises:
| Type | Description |
|---|---|
PackError
|
If |
read_archive ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_items
|
int | None
|
The most tiles this archive may hold, or |
None
|
Raises:
| Type | Description |
|---|---|
ArchiveError
|
On the first failure, naming what failed. |
Embedding tiles locally¶
The embeddings observation: run DeepSpot-H over your tiles and send a short
row of numbers per tile. Needs the embed extra and a key. The path is
Your slides stay with you.
auroraomics.embed ¶
EmbedError ¶
Bases: AuroraomicsError, RuntimeError
EncoderRefused ¶
Bases: EmbedError
EncoderUnavailable ¶
Bases: EmbedError
NetworkRefused ¶
Bases: EncoderUnavailable
Encoder
dataclass
¶
EmbedReport
dataclass
¶
embed_tiles ¶
Returns:
| Type | Description |
|---|---|
EmbedReport
|
Counts, and the resolved encoder. A caller who gets an unexpectedly small file can see at once whether the slide was mostly glass, the centres were off the edge, or a threshold was wrong. |
Warns:
| Type | Description |
|---|---|
UserWarning
|
When the slide file records a resolution that cuts a different patch from the one this run declares, and when each patch will be enlarged three times or more to reach the square the encoder reads, naming the factor: enlarging adds no detail the scan did not record. |
Raises:
| Type | Description |
|---|---|
EncoderRefused
|
The encoder is known but this package will not run it, and the message says why. |
EncoderUnavailable
|
The weights are not on this machine and could not be fetched. |
Subsampling¶
When a slide yields more tiles than one submission takes, choose one dense region. A scatter of tiles leaves holes between them. Check tile quality says how.
auroraomics.subsample ¶
subsample_spatial_square ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Coordinates of each candidate spot, in the same units (pixels), one entry per spot. |
required |
y
|
ndarray
|
Coordinates of each candidate spot, in the same units (pixels), one entry per spot. |
required |
max_items
|
int
|
The budget. When there are no more points than this, every point is kept and no work is done. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
A boolean mask over the input order: |
Writing a result¶
The standard .h5ad, written with h5py alone and streamed batch by batch, so
that a matrix larger than memory can still be written.
auroraomics.h5ad ¶
ResultError ¶
Bases: AuroraomicsError, ValueError
write_result ¶
write_result(path: str | Path, *, obs: Mapping[str, Any] | None = None, var: Mapping[str, Any] | None = None, x: Any = None, obs_index: Sequence[Any] | None = None, var_index: Sequence[Any] | None = None, spatial: Any = None, uns: Mapping[str, Any] | None = None, layers: Mapping[str, Any] | None = None, obs_index_name: str = _DEFAULT_INDEX_NAME, var_index_name: str | None = None, dtype: Any = np.float32, compression: str | None = 'gzip') -> Path
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Where to write. An existing file is replaced. |
required |
obs
|
Mapping[str, Any] | None
|
The per-spot and per-gene tables, as mappings of column name to a one-dimensional sequence. Text columns are stored as text; everything else keeps its numpy dtype. |
None
|
var
|
Mapping[str, Any] | None
|
The per-spot and per-gene tables, as mappings of column name to a one-dimensional sequence. Text columns are stored as text; everything else keeps its numpy dtype. |
None
|
x
|
Any
|
The expression matrix: either a two-dimensional array, or an iterable
of row batches covering every observation in order. The iterable form
is what makes a matrix larger than memory writable — see
|
None
|
obs_index
|
Sequence[Any] | None
|
Row and column names. Default to the positions as strings. |
None
|
var_index
|
Sequence[Any] | None
|
Row and column names. Default to the positions as strings. |
None
|
var_index_name
|
str | None
|
The name |
None
|
spatial
|
Any
|
An |
None
|
uns
|
Mapping[str, Any] | None
|
Free-form provenance, nested mappings allowed. |
None
|
layers
|
Mapping[str, Any] | None
|
Extra matrices of the same shape as |
None
|
dtype
|
Any
|
The element type the matrix is stored as. Single precision by default, which is what the tools that read a result expect: half precision halves the file, is not enough precision for the statistics these matrices get fed to, and is refused outright by several of them. |
float32
|
compression
|
str | None
|
Passed to HDF5. |
'gzip'
|
Other formats¶
The same result as a SpatialData store or a folder Seurat loads. Result file reference shows both in use.
auroraomics.export ¶
ExportError ¶
Bases: AuroraomicsError, ValueError
ExportUnavailable ¶
Bases: AuroraomicsError, RuntimeError
to_spatialdata ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
Any
|
The path of a result file, or the |
required |
Returns:
| Type | Description |
|---|---|
SpatialData
|
Two elements. |
write_zarr ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
Any
|
The path of a result file, or the |
required |
path
|
str | Path
|
The store to create, a directory conventionally named |
required |
write_seurat_dir ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
Any
|
The path of a result file, or the |
required |
path
|
str | Path
|
The folder to create. It must not exist yet: nothing already there is replaced. |
required |
After prediction¶
What a model's card asks to be applied to a result after prediction, applied the same way the service applies it. A result you finish locally and one the service returns therefore read alike.
auroraomics.postprocess ¶
PostprocessError ¶
Bases: AuroraomicsError, RuntimeError
EntryUnknown ¶
Bases: PostprocessError
InputUnavailable ¶
Bases: PostprocessError
resolve ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
card
|
Mapping[str, Any]
|
The model card the result was produced under. |
required |
Returns:
| Type | Description |
|---|---|
tuple
|
One entry per name the card listed, in that order; empty for a card that asks for nothing. Each carries the name the card used, which is what apply_card reports back. |
Raises:
| Type | Description |
|---|---|
EntryUnknown
|
The card names a step this release does not implement. |
PostprocessError
|
The card's list is not a list of names, or names one thing twice. |
apply_card ¶
apply_card(path: str | Path, *, card: Mapping[str, Any], covariates: Mapping[str, Any] | None = None, model: Callable[[], Iterator[ndarray]] | None = None, compression: str | None = 'gzip') -> tuple[str, ...]
transform_into_output_space ¶
transform_into_output_space(card: Mapping[str, Any], profile: Mapping[str, float]) -> dict[str, float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
card
|
Mapping[str, Any]
|
The model card the numbers are to be comparable with. |
required |
profile
|
Mapping[str, float]
|
The sample's profile, by gene, in linear units. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, float]
|
The same genes, in the card's space. |
Raises:
| Type | Description |
|---|---|
PostprocessError
|
The card does not state its space, or states one this release cannot apply, or the profile sums to nothing. A refusal, not an approximation: a plausible number in the wrong space is wrong for every gene and looks exactly like a right one. |
Spatial structure¶
Whether a gene's predicted expression varies with place, scored per gene from one result and its coordinates.
auroraomics.spatial ¶
neighbours_within ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coords
|
ndarray
|
|
required |
radius
|
float
|
The neighbourhood, in that unit. A pair at exactly the radius is a pair. |
required |
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
|
Spots are hashed into square cells of side ``radius``; a pair within the
|
|
radius is then in the same cell or in adjacent ones, so only those are
|
|
compared. Linear in the number of spots for the grids and lattices tiles
|
|
come on; the worst case is every spot in one cell, which is the quadratic
|
|
comparison a caller would have written anyway.
|
|
morans_i ¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
ndarray
|
|
required |
coords
|
ndarray
|
|
required |
radius
|
float
|
The neighbourhood: every other spot within this distance, in the coordinates' unit, weighs one. For tiles on a grid, the stride gives four neighbours and the stride times the square root of two gives eight. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
|
The statistic is ``(N_w / S0) * sum_ij w_ij z_i z_j / sum_i z_i^2`` with
|
|
``z`` each gene centred over the spots that have a neighbour, ``w`` one for
|
|
each ordered pair within the radius, ``S0`` the number of those pairs and
|
|
``N_w`` the number of spots with a neighbour. Spots with no neighbour are
|
|
left out of both the centring and the sums, so an isolated tile neither
|
|
contributes a pattern nor dilutes one.
|
|
Bulk RNA¶
Revisit existing bulk RNA findings in their tissue context, using sample-matched profiles to inform predicted gene maps. Without a bulk profile, Aurora predicts from the slide alone.
This module prepares the one table the service accepts from a long or wide table or a GDC gene-counts file. Bulk RNA is the guide.
auroraomics.bulk ¶
BulkRnaError ¶
Bases: AuroraomicsError, ValueError
BulkRnaReport
dataclass
¶
bulk_rna ¶
bulk_rna(source: str | Path | Mapping[str, Any], out: str | Path, *, units: str, card: Mapping[str, Any], resolve: Resolver, sample: str | None = None) -> BulkRnaReport
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str | Path | Mapping[str, Any]
|
A CSV or TSV file in any of three layouts — long (one row per gene), wide (genes across the header, one row per sample) or a GDC STAR gene-counts file — or a mapping of gene name to value. |
required |
out
|
str | Path
|
Where to write the prepared table. A |
required |
units
|
str
|
|
required |
sample
|
str | None
|
For a wide table with several sample rows, the first-column value of the row to take. |
None
|
card
|
Mapping[str, Any]
|
The model's card, as the service serves it
(Client.model_card). Required:
it decides whether the model takes bulk RNA at all, and its
|
required |
resolve
|
Resolver
|
How a symbol becomes the Ensembl id a result is keyed by:
Client.resolve_keys, or any
callable taking a list of names and answering |
required |
Returns:
| Type | Description |
|---|---|
BulkRnaReport
|
Counts of what was written, resolved, passed through and dropped, plus the coverage measured and against what. |
Genes¶
The model's gene symbols mapped to Ensembl stable gene identifiers, which is
what every result's var index is keyed by. One committed table, resolved in
the same order as the service. The concept is on What you get back.
| Fact | Value |
|---|---|
| Genes on the served axis | 19,336 |
| Symbols in the model's vocabulary but not on the axis | 2 |
| Ensembl release | 116 |
| Built from sources fetched | 2026-09-05 |
The symbols the axis leaves out, and why:
| Symbol | Why it is not on the axis |
|---|---|
IQCA1 |
no HGNC record and no gene named IQCA1 in Ensembl 116; the model predicts it, and no source can identify it, so it is not on the served axis |
IQCD |
no HGNC record and no gene named IQCD in Ensembl 116; the model predicts it, and no source can identify it, so it is not on the served axis |
auroraomics.genes ¶
GeneError ¶
Bases: AuroraomicsError, ValueError
Gene
dataclass
¶
Failures¶
Every refusal this package raises descends from one root, so a whole journey
fits in a single except. Each root keeps its builtin base as well, so a
clause already written against ValueError still catches.
auroraomics.errors ¶
AuroraomicsError ¶
Bases: Exception
ArgumentRefused ¶
Bases: AuroraomicsError, ValueError
Contract values¶
The shared container layouts, caps and result layout, as data. Nothing in this package re-types a number the service also reads, and client code need not either.
auroraomics.contracts ¶
ContractError ¶
Bases: AuroraomicsError, RuntimeError
VendoredDocuments ¶
What the service runs¶
The list of models from their cards, and a pre-flight check on an archive's tile size. Asking for a local prediction returns a refusal: the model runs on the service.
auroraomics.runtimes ¶
auroraomics.runtimes.deepspotm ¶
PredictError ¶
Bases: AuroraomicsError, RuntimeError
ModelRefused ¶
Bases: PredictError
InputMismatch ¶
Bases: PredictError
LocalRuntimeUnavailable ¶
Bases: PredictError
Model
dataclass
¶
check_archive ¶
check_archive(archive: str | Path | PatchArchive, *, model: str | Mapping[str, Any] | Model, cards: Iterable[Mapping[str, Any]] = ()) -> int
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
archive
|
str | Path | PatchArchive
|
A |
required |
model
|
str | Mapping[str, Any] | Model
|
A card, an id, or a resolved model — the three things a caller actually has at this point, and all three answer.
Anything else is an ArgumentRefused naming what it was and what the three forms are — including the whole catalogue, which is a list of cards rather than one and is the near miss worth saying out loud. |
required |
cards
|
Iterable[Mapping[str, Any]]
|
The served catalogue, from |
()
|
Returns:
| Type | Description |
|---|---|
int
|
The tile edge, in pixels, that the card's physical size implies at this archive's resolution — which is what the archive's tiles measure, or the call would have raised. |
Raises:
| Type | Description |
|---|---|
ModelRefused
|
No public card carries that id, or its card is not one this release can say anything definite about — see served_refusal. NOT because the card has no local runtime: none of them has one, and this call is about an archive rather than about where a model runs. |
ArgumentRefused
|
|
InputMismatch
|
The archive is not the input the card describes. |
predict_local ¶
Raises:
| Type | Description |
|---|---|
LocalRuntimeUnavailable
|
Always. There is no install that changes this and no flag that enables
it: the model is not distributed, so there is nothing here to enable.
The exception is a
PredictError, so a caller
with one |
The API client¶
Submit a prediction, follow the job, download the result. A plain install has it. The whole flow is on From slide to result. Every route is in the API reference, which the client is generated from.
auroraomics.client.api ¶
BAD_NAME_REFUSALS
module-attribute
¶
RouteNotInSchema ¶
Bases: ClientError
Client ¶
mint_key ¶
upload ¶
upload(source: str | Path | Any, *, kind: str, filename: str | None = None, on_progress=None, timeout: float | None = None) -> UploadVerdict
start_upload ¶
start_upload(source: str | Path | Any, *, kind: str, filename: str | None = None) -> uploads_module.StartedUpload
predict ¶
predict(*, model: str, observation: PackReport | EmbedReport | str | Path | Any = None, kind: str | None = None, covariates: Mapping[str, Any] | None = None, land_in_workspace: bool = False, idempotency_key: str | None = None, observations: Mapping[str, Any] | None = None) -> Job
login ¶
login(email: str, *, accept_terms: Callable[[TermsOut], bool] | None = None, code: str | None = None, prompt=None, base_url: str | None = None, name: str = '', scopes=None, path: Path | None = None, client: Client | None = None) -> credentials.StoredCredential
auroraomics.client.jobs ¶
TERMINAL_STATES
module-attribute
¶
Job ¶
wait ¶
wait(*, timeout: float | None = DEFAULT_TIMEOUT_SECONDS, on_poll: Callable[['Job'], None] | None = None, stop: Stop | None = None, raise_on_failure: bool = True) -> 'Job'
next_delay ¶
next_delay(*, retry_after: float | None, eta_seconds: int | None, backoff: float) -> tuple[float, float]
auroraomics.client.uploads ¶
CHUNK_CHECKSUM_STATUS
module-attribute
¶
UploadProtocol
dataclass
¶
Source
dataclass
¶
StartedUpload
dataclass
¶
send ¶
send(http: Http, *, on_progress: Progress | None = None, timeout: float | None = None) -> UploadVerdict
tree_hash_of_file ¶
committed_offset ¶
start_upload ¶
upload_file ¶
upload_file(http: Http, source: Any, *, kind: str, filename: str | None = None, on_progress: Progress | None = None, timeout: float | None = None) -> UploadVerdict
auroraomics.client.credentials ¶
auroraomics.client.errors ¶
GROUP_BY_STATUS
module-attribute
¶
GROUP_BY_STATUS: dict[int, type[ApiError]] = {401: NotAuthorizedError, 403: NotAuthorizedError, 404: NotFoundError, 409: ConflictError, 410: ConflictError, 413: LimitExceededError, 422: InvalidRequestError, 429: LimitExceededError, 500: ServiceError, 503: ServiceError}
AuroraomicsError ¶
Bases: Exception
ClientError ¶
Bases: AuroraomicsError
CredentialsError ¶
Bases: ClientError
ProtocolError ¶
Bases: ClientError
WaitTimeout ¶
Bases: ClientError
TermsDeclined ¶
Bases: ClientError
TransportError ¶
Bases: AuroraomicsError
ApiError ¶
Bases: AuroraomicsError
JobFailedError ¶
Bases: AuroraomicsError
The command line¶
The same client from a shell: --json on every command, exit codes derived
from the error catalogue, and no interactive prompt without a
terminal.
| Subcommand | What it does |
|---|---|
auroraomics login |
sign in, accept the Terms, and store an API key |
auroraomics doctor |
check the install, the credential and the service |
auroraomics models |
the models this deployment serves |
auroraomics genes |
search or resolve gene identifiers |
auroraomics submit |
submit a prediction |
auroraomics jobs |
list your jobs, or show one |
auroraomics download |
download a finished job's result |
auroraomics export |
write a result for SpatialData or Seurat |
auroraomics mcp |
serve the tools over stdio for an agent |
auroraomics.cli ¶
EXIT_MEANINGS
module-attribute
¶
EXIT_MEANINGS: dict[int, str] = {EXIT_OK: 'success', EXIT_ERROR: 'an unexpected failure', EXIT_USAGE: 'the command line was wrong, or a prompt was needed with no terminal', EXIT_AUTH: 'not authenticated, not approved, or missing a scope', EXIT_NOT_FOUND: 'no such resource for this credential', EXIT_CONFLICT: 'the resource is in the wrong state', EXIT_LIMIT: 'a size, quota or rate bound was hit', EXIT_INVALID: 'the input does not satisfy the contract', EXIT_UNAVAILABLE: 'the service or the runtime is unavailable', EXIT_JOB_FAILED: 'the job failed or was canceled', EXIT_TIMEOUT: 'a wait ran out of budget; the job is untouched', EXIT_PENDING: 'programmatic access is requested and pending; wait for the email'}
EXIT_BY_GROUP
module-attribute
¶
EXIT_BY_GROUP: dict[type[ApiError], int] = {errors.NotAuthorizedError: EXIT_AUTH, errors.NotFoundError: EXIT_NOT_FOUND, errors.ConflictError: EXIT_CONFLICT, errors.LimitExceededError: EXIT_LIMIT, errors.InvalidRequestError: EXIT_INVALID, errors.ServiceError: EXIT_UNAVAILABLE}
WAITING_IS_WHAT_A_TIMEOUT_BOUNDS
module-attribute
¶
WAITING_IS_WHAT_A_TIMEOUT_BOUNDS = 'without it this command returns as soon as the job is queued, so there is no wait for a deadline to cut short'
NEEDS_WAIT
module-attribute
¶
NEEDS_WAIT: dict[str, dict[str, str]] = {'submit': {'output': 'without it this command returns while the job is still queued, and a queued job has no result to write', 'timeout': WAITING_IS_WHAT_A_TIMEOUT_BOUNDS}, 'jobs': {'timeout': WAITING_IS_WHAT_A_TIMEOUT_BOUNDS}, 'download': {'timeout': WAITING_IS_WHAT_A_TIMEOUT_BOUNDS}}
OUTPUT_NEEDS_WAIT
module-attribute
¶
ACCESS_DECIDED_AT_MINT
module-attribute
¶
ACCESS_DECIDED_AT_MINT = "Programmatic access is granted per account, and the service applies the grant when the key is minted — the LAST of this command's round trips. So an account that does not hold it is emailed a sign-in code and asked for it like any other, and learns where it stands once that code has been verified. There is no cheaper check to make first: the flag the code exchange hands back is the web application's own approval, which is a different grant, and the route that reports this one needs the key this command exists to create."
TERMS_INCLUDE
module-attribute
¶
STORED_KEY_BELONGS
module-attribute
¶
STORED_KEY_BELONGS = 'It belongs to the account it was minted for, which may not be this one, and `auroraomics doctor` and every other command go on using it.'
REMOVE_STORED_FILE
module-attribute
¶
UNSET_STORED_ENV
module-attribute
¶
LOGIN_FOR_A_NEW_KEY
module-attribute
¶
LOGIN_FOR_A_NEW_KEY = 'Run `auroraomics login` with the address of the account this key was minted for: it shows the current Terms and, once you accept them, stores a new key in place of this one.'
EXPORT_FORMATS
module-attribute
¶
CATALOGUED_KIND
module-attribute
¶
servable_kinds ¶
For an agent¶
The same client as MCP tools over stdio, started with auroraomics mcp.
Needs the mcp extra and a stored key: run auroraomics login once, or set
AURORAOMICS_API_KEY. An agent can do exactly what a person can do with that
key. From slide to result has the client
configuration.
| Tool | What it does |
|---|---|
list_models |
List the models this deployment serves, with what each one accepts. |
submit |
Submit a prediction and return the job it created, without waiting. |
get_job |
Read one job: its state, queue position, ETA and events. |
download_result |
Write a finished job's result to path and report where it went. |
resolve_genes |
Resolve symbols and aliases to the Ensembl ids every result is keyed by. |
auroraomics.mcp.tools ¶
auroraomics.mcp.server ¶
INSTRUCTIONS
module-attribute
¶
INSTRUCTIONS = 'Predict spatial gene expression from H&E images. Submit a prediction with `submit`, follow it with `get_job` until it ends, and write the result to a file with `download_result`.'
Installation options¶
| Import as | auroraomics |
| Version documented here | 0.1.0.dev7 |
| Python | >=3.10 |
| Licence | PolyForm-Noncommercial-1.0.0 |