Skip to content

Your slides stay with you

Route · Your slides stay with you

Keep original slide images inside your own environment.

DeepSpot-H runs locally. Aurora receives the derived tissue representations, their positions and quality information for molecular prediction. No image is uploaded through this workflow.

Privacy and retention explains the submitted data and how it is handled.

1. Install the local step

It runs on a CPU. A GPU is used when there is one. Without one the run is slower and it still runs.

The embed extra installs what DeepSpot-H runs on. Your key lets the package ask the service which release of the weights to use, so every machine computes the same numbers.

pip install "auroraomics[embed]"

On a machine with no GPU, ask for the CPU build as well:

pip install "auroraomics[embed]" --extra-index-url https://download.pytorch.org/whl/cpu  # no CUDA libraries

2. Sign in and check the local setup

Get access and sign in. Choose a release that accepts local representations from the API catalogue, then set MODEL to its identifier:

auroraomics doctor --model "$MODEL" --allow-download

This checks compatibility and downloads the local weights. Use --tiles with your tile count if you also want an estimate of processing time.

3. Embed the tiles locally

Two values are yours: patch_um, the tile size the model's card states, and mpp, the slide's own resolution from its metadata. The package settles everything else. Each tile is judged before DeepSpot-H runs on it, and the verdict travels in the file.

Not executed — needs a slide and DeepSpot-H

This site is built on a machine without either.

import auroraomics as ao

with ao.Client() as client:
    card = next(m for m in client.models() if "embeddings" in m["accepts"]["observations"])
    encoder = ao.resolve_encoder(client.encoders())
    settings = client.qc_thresholds()

with ao.open_slide("slide.svs") as slide:
    report = ao.embed_tiles(
        slide,
        "sample.npz",
        mpp=slide.mpp,
        patch_um=card["input_spec"]["patch_um"],
        encoder=encoder,
        thresholds=settings,
        allow_download=False,
    )
print(report.rows, "tiles embedded;", report.rejected_by_reason)

The file records the release that produced it, and the service checks that against the model. A file the model cannot read is refused before the job is charged, and the refusal names what to fix.

DeepSpot-H turns each tile of your slide into one embedding. It can run in your environment or on Aurora infrastructure. DeepSpot-M turns those embeddings into spatial gene expression. It runs on Aurora infrastructure.

4. Submit the file

The submission is the same as for tiles, with embeddings as the observation kind. It needs a key.

The Python client reads the stored key and submits your file.

Not executed — needs the hosted API

This build holds no key, so it makes no submission.

from auroraomics.client import Client

client = Client()                                   # reads the stored key
card = next(m for m in client.models() if "embeddings" in m["accepts"]["observations"])
job = client.predict(model=card["id"], observation="sample.npz", kind="embeddings").wait()
job.download("result.h5ad")

The same submission from the shell is one command, and it waits.

auroraomics submit --model "$MODEL" --observation embeddings=sample.npz --wait --output result.h5ad

5. Read the result

The result is one .h5ad. A submission carrying patches or embeddings returns one with the same layout.

It carries one row per tile, in the order of your file, and every gene as a column. Your coordinates are under obsm["spatial"]. What you get back explains how to explore it.